MCPcopy Create free account
hub / github.com/microsoft/typescript-go / IsCheckJSEnabledForFile

Function IsCheckJSEnabledForFile

internal/ast/utilities.go:2863–2868  ·  view source on GitHub ↗
(sourceFile *SourceFile, compilerOptions *core.CompilerOptions)

Source from the content-addressed store, hash-verified

2861}
2862
2863func IsCheckJSEnabledForFile(sourceFile *SourceFile, compilerOptions *core.CompilerOptions) bool {
2864 if sourceFile.CheckJsDirective != nil {
2865 return sourceFile.CheckJsDirective.Enabled
2866 }
2867 return compilerOptions.CheckJs == core.TSTrue
2868}
2869
2870func IsPlainJSFile(file *SourceFile, checkJs core.Tristate) bool {
2871 return file != nil && (file.ScriptKind == core.ScriptKindJS || file.ScriptKind == core.ScriptKindJSX) && file.CheckJsDirective == nil && checkJs == core.TSUnknown

Calls

no outgoing calls

Tested by

no test coverage detected