diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 87d219c2e84..a60c0666419 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1005,14 +1005,14 @@ module ts { getSourceFiles(): SourceFile[]; /** - * Emits the javascript and declaration files. If targetSourceFile is not specified, then - * the javascript and declaration files will be produced for all the files in this program. - * If targetSourceFile is specified, then only the javascript and declaration for that + * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then + * the JavaScript and declaration files will be produced for all the files in this program. + * If targetSourceFile is specified, then only the JavaScript and declaration for that * specific file will be generated. * * If writeFile is not specified then the writeFile callback from the compiler host will be - * used for writing the javascript and declaration files. Otherwise, the writeFile parameter - * will be invoked when writing the javascript and declaration files. + * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter + * will be invoked when writing the JavaScript and declaration files. */ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; diff --git a/src/services/services.ts b/src/services/services.ts index 4c5fb5ce679..188a1bfcb03 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2371,7 +2371,7 @@ module ts { } function isJavaScript(fileName: string) { - return fileExtensionIs(fileName, ".tsjs"); + return fileExtensionIs(fileName, ".js"); } /** @@ -2562,7 +2562,7 @@ module ts { } /// Completion - function getValidCompletionEntryDisplayName(symbol: Symbol, target: ScriptTarget): string { + function getValidCompletionEntryDisplayNameForSymbol(symbol: Symbol, target: ScriptTarget): string { let displayName = symbol.getName(); if (displayName && displayName.length > 0) { let firstCharCode = displayName.charCodeAt(0); @@ -2573,7 +2573,8 @@ module ts { return undefined; } - if (displayName && displayName.length >= 2 && firstCharCode === displayName.charCodeAt(displayName.length - 1) && + if (displayName && displayName.length >= 2 && + firstCharCode === displayName.charCodeAt(displayName.length - 1) && (firstCharCode === CharacterCodes.singleQuote || firstCharCode === CharacterCodes.doubleQuote)) { // If the user entered name for the symbol was quoted, removing the quotes is not enough, as the name could be an // invalid identifier name. We need to check if whatever was inside the quotes is actually a valid identifier name. @@ -2585,7 +2586,6 @@ module ts { isValid = isIdentifierPart(displayName.charCodeAt(i), target); } - if (isValid) { return unescapeIdentifier(displayName); } @@ -2594,11 +2594,29 @@ module ts { return undefined; } + function getValidCompletionEntryDisplayName(displayName: string, target: ScriptTarget): string { + let firstCharCode = displayName.charCodeAt(0); + if (displayName && displayName.length >= 2 && + firstCharCode === displayName.charCodeAt(displayName.length - 1) && + (firstCharCode === CharacterCodes.singleQuote || firstCharCode === CharacterCodes.doubleQuote)) { + // If the user entered name for the symbol was quoted, removing the quotes is not enough, as the name could be an + // invalid identifier name. We need to check if whatever was inside the quotes is actually a valid identifier name. + displayName = displayName.substring(1, displayName.length - 1); + } + + let isValid = isIdentifierStart(displayName.charCodeAt(0), target); + for (let i = 1, n = displayName.length; isValid && i < n; i++) { + isValid = isIdentifierPart(displayName.charCodeAt(i), target); + } + + return isValid ? unescapeIdentifier(displayName) : undefined; + } + function createCompletionEntry(symbol: Symbol, typeChecker: TypeChecker, location: Node): CompletionEntry { // Try to get a valid display name for this symbol, if we could not find one, then ignore it. // We would like to only show things that can be added after a dot, so for instance numeric properties can // not be accessed with a dot (a.1 <- invalid) - let displayName = getValidCompletionEntryDisplayName(symbol, program.getCompilerOptions().target); + let displayName = getValidCompletionEntryDisplayNameForSymbol(symbol, program.getCompilerOptions().target); if (!displayName) { return undefined; } @@ -2685,11 +2703,22 @@ module ts { let isNewIdentifierLocation: boolean; if (isRightOfDot) { - if (!tryGetMemberCompletionEntries()) { - return undefined; + if (isJavaScript(fileName)) { + // If this is JavaScript, then just present a simple identifier list. + if (!tryGetJavaScriptMemberCompletionEntries()) { + return undefined; + } + } + else { + if (!tryGetTypeScriptMemberCompletionEntries()) { + return undefined; + } } } else { + // For JavaScript or TypeScript, if we're not after a dot, then just try to get the + // global symbols in scope. These results should be valid for either language as + // the set of symbols that can be referenced from this location. if (!tryGetGlobalCompletionEntries()) { return undefined; } @@ -2707,7 +2736,31 @@ module ts { entries: activeCompletionSession.entries }; - function tryGetMemberCompletionEntries(): boolean { + function tryGetJavaScriptMemberCompletionEntries(): boolean { + let allIdentifiers: Map = {}; + for (let sourceFile of program.getSourceFiles()) { + let nameTable = getNameTable(sourceFile); + for (let name in nameTable) { + allIdentifiers[name] = name; + } + } + + var target = program.getCompilerOptions().target; + for (let name in allIdentifiers) { + let displayName = getValidCompletionEntryDisplayName(name, target); + if (displayName) { + activeCompletionSession.entries.push({ + name: displayName, + kind: ScriptElementKind.unknown, + kindModifiers: "" + }); + } + } + + return true; + } + + function tryGetTypeScriptMemberCompletionEntries(): boolean { // Right of dot member completion list let symbols: Symbol[] = []; isMemberCompletion = true; @@ -2741,7 +2794,7 @@ module ts { }); } - getCompletionEntriesFromSymbols(symbols, activeCompletionSession); + getCompletionEntriesFromSymbols(symbols); return true; } @@ -2761,7 +2814,7 @@ module ts { if (contextualTypeMembers && contextualTypeMembers.length > 0) { // Add filtered items to the completion list let filteredMembers = filterContextualMembersList(contextualTypeMembers, containingObjectLiteral.properties); - getCompletionEntriesFromSymbols(filteredMembers, activeCompletionSession); + getCompletionEntriesFromSymbols(filteredMembers); } } else if (getAncestor(previousToken, SyntaxKind.ImportClause)) { @@ -2774,7 +2827,7 @@ module ts { Debug.assert(importDeclaration !== undefined); let exports = typeInfoResolver.getExportsOfExternalModule(importDeclaration); let filteredExports = filterModuleExports(exports, importDeclaration); - getCompletionEntriesFromSymbols(filteredExports, activeCompletionSession); + getCompletionEntriesFromSymbols(filteredExports); } } else { @@ -2786,13 +2839,14 @@ module ts { let symbolMeanings = SymbolFlags.Type | SymbolFlags.Value | SymbolFlags.Namespace | SymbolFlags.Alias; let symbols = typeInfoResolver.getSymbolsInScope(node, symbolMeanings); - getCompletionEntriesFromSymbols(symbols, activeCompletionSession); + getCompletionEntriesFromSymbols(symbols); } return true; } - function getCompletionEntriesFromSymbols(symbols: Symbol[], session: CompletionSession): void { + function getCompletionEntriesFromSymbols(symbols: Symbol[]): void { + let session = activeCompletionSession; let start = new Date().getTime(); forEach(symbols, symbol => { let entry = createCompletionEntry(symbol, session.typeChecker, location); @@ -5073,8 +5127,13 @@ module ts { function getEmitOutput(fileName: string): EmitOutput { synchronizeHostData(); - let sourceFile = getValidSourceFile(fileName); + // If the option is set to not emit on errors, and there are any errors, then we don't + // want to proceed. + if (program.getCompilerOptions().noEmitOnError && getPreEmitDiagnostics(program).length > 0) { + return { outputFiles: [], emitSkipped: true }; + } + let sourceFile = getValidSourceFile(fileName); let outputFiles: OutputFile[] = []; function writeFile(fileName: string, data: string, writeByteOrderMark: boolean) { diff --git a/tests/baselines/reference/APISample_compile.js b/tests/baselines/reference/APISample_compile.js index 575c2bdaf36..4ea2a7a7bed 100644 --- a/tests/baselines/reference/APISample_compile.js +++ b/tests/baselines/reference/APISample_compile.js @@ -801,14 +801,14 @@ declare module "typescript" { interface Program extends ScriptReferenceHost { getSourceFiles(): SourceFile[]; /** - * Emits the javascript and declaration files. If targetSourceFile is not specified, then - * the javascript and declaration files will be produced for all the files in this program. - * If targetSourceFile is specified, then only the javascript and declaration for that + * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then + * the JavaScript and declaration files will be produced for all the files in this program. + * If targetSourceFile is specified, then only the JavaScript and declaration for that * specific file will be generated. * * If writeFile is not specified then the writeFile callback from the compiler host will be - * used for writing the javascript and declaration files. Otherwise, the writeFile parameter - * will be invoked when writing the javascript and declaration files. + * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter + * will be invoked when writing the JavaScript and declaration files. */ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; diff --git a/tests/baselines/reference/APISample_compile.types b/tests/baselines/reference/APISample_compile.types index 336d70aa1a1..d0ba1e8457b 100644 --- a/tests/baselines/reference/APISample_compile.types +++ b/tests/baselines/reference/APISample_compile.types @@ -2440,14 +2440,14 @@ declare module "typescript" { >SourceFile : SourceFile /** - * Emits the javascript and declaration files. If targetSourceFile is not specified, then - * the javascript and declaration files will be produced for all the files in this program. - * If targetSourceFile is specified, then only the javascript and declaration for that + * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then + * the JavaScript and declaration files will be produced for all the files in this program. + * If targetSourceFile is specified, then only the JavaScript and declaration for that * specific file will be generated. * * If writeFile is not specified then the writeFile callback from the compiler host will be - * used for writing the javascript and declaration files. Otherwise, the writeFile parameter - * will be invoked when writing the javascript and declaration files. + * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter + * will be invoked when writing the JavaScript and declaration files. */ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; >emit : (targetSourceFile?: SourceFile, writeFile?: WriteFileCallback) => EmitResult diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index e7145e24070..6e6665e3d40 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -832,14 +832,14 @@ declare module "typescript" { interface Program extends ScriptReferenceHost { getSourceFiles(): SourceFile[]; /** - * Emits the javascript and declaration files. If targetSourceFile is not specified, then - * the javascript and declaration files will be produced for all the files in this program. - * If targetSourceFile is specified, then only the javascript and declaration for that + * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then + * the JavaScript and declaration files will be produced for all the files in this program. + * If targetSourceFile is specified, then only the JavaScript and declaration for that * specific file will be generated. * * If writeFile is not specified then the writeFile callback from the compiler host will be - * used for writing the javascript and declaration files. Otherwise, the writeFile parameter - * will be invoked when writing the javascript and declaration files. + * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter + * will be invoked when writing the JavaScript and declaration files. */ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; diff --git a/tests/baselines/reference/APISample_linter.types b/tests/baselines/reference/APISample_linter.types index a40848b9e4c..839e41a62f4 100644 --- a/tests/baselines/reference/APISample_linter.types +++ b/tests/baselines/reference/APISample_linter.types @@ -2586,14 +2586,14 @@ declare module "typescript" { >SourceFile : SourceFile /** - * Emits the javascript and declaration files. If targetSourceFile is not specified, then - * the javascript and declaration files will be produced for all the files in this program. - * If targetSourceFile is specified, then only the javascript and declaration for that + * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then + * the JavaScript and declaration files will be produced for all the files in this program. + * If targetSourceFile is specified, then only the JavaScript and declaration for that * specific file will be generated. * * If writeFile is not specified then the writeFile callback from the compiler host will be - * used for writing the javascript and declaration files. Otherwise, the writeFile parameter - * will be invoked when writing the javascript and declaration files. + * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter + * will be invoked when writing the JavaScript and declaration files. */ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; >emit : (targetSourceFile?: SourceFile, writeFile?: WriteFileCallback) => EmitResult diff --git a/tests/baselines/reference/APISample_transform.js b/tests/baselines/reference/APISample_transform.js index da8fe979d17..ed852980b0c 100644 --- a/tests/baselines/reference/APISample_transform.js +++ b/tests/baselines/reference/APISample_transform.js @@ -833,14 +833,14 @@ declare module "typescript" { interface Program extends ScriptReferenceHost { getSourceFiles(): SourceFile[]; /** - * Emits the javascript and declaration files. If targetSourceFile is not specified, then - * the javascript and declaration files will be produced for all the files in this program. - * If targetSourceFile is specified, then only the javascript and declaration for that + * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then + * the JavaScript and declaration files will be produced for all the files in this program. + * If targetSourceFile is specified, then only the JavaScript and declaration for that * specific file will be generated. * * If writeFile is not specified then the writeFile callback from the compiler host will be - * used for writing the javascript and declaration files. Otherwise, the writeFile parameter - * will be invoked when writing the javascript and declaration files. + * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter + * will be invoked when writing the JavaScript and declaration files. */ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; diff --git a/tests/baselines/reference/APISample_transform.types b/tests/baselines/reference/APISample_transform.types index b694678d4cb..589af2369f7 100644 --- a/tests/baselines/reference/APISample_transform.types +++ b/tests/baselines/reference/APISample_transform.types @@ -2536,14 +2536,14 @@ declare module "typescript" { >SourceFile : SourceFile /** - * Emits the javascript and declaration files. If targetSourceFile is not specified, then - * the javascript and declaration files will be produced for all the files in this program. - * If targetSourceFile is specified, then only the javascript and declaration for that + * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then + * the JavaScript and declaration files will be produced for all the files in this program. + * If targetSourceFile is specified, then only the JavaScript and declaration for that * specific file will be generated. * * If writeFile is not specified then the writeFile callback from the compiler host will be - * used for writing the javascript and declaration files. Otherwise, the writeFile parameter - * will be invoked when writing the javascript and declaration files. + * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter + * will be invoked when writing the JavaScript and declaration files. */ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; >emit : (targetSourceFile?: SourceFile, writeFile?: WriteFileCallback) => EmitResult diff --git a/tests/baselines/reference/APISample_watcher.js b/tests/baselines/reference/APISample_watcher.js index f380994eba8..c0f6f52e774 100644 --- a/tests/baselines/reference/APISample_watcher.js +++ b/tests/baselines/reference/APISample_watcher.js @@ -870,14 +870,14 @@ declare module "typescript" { interface Program extends ScriptReferenceHost { getSourceFiles(): SourceFile[]; /** - * Emits the javascript and declaration files. If targetSourceFile is not specified, then - * the javascript and declaration files will be produced for all the files in this program. - * If targetSourceFile is specified, then only the javascript and declaration for that + * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then + * the JavaScript and declaration files will be produced for all the files in this program. + * If targetSourceFile is specified, then only the JavaScript and declaration for that * specific file will be generated. * * If writeFile is not specified then the writeFile callback from the compiler host will be - * used for writing the javascript and declaration files. Otherwise, the writeFile parameter - * will be invoked when writing the javascript and declaration files. + * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter + * will be invoked when writing the JavaScript and declaration files. */ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; diff --git a/tests/baselines/reference/APISample_watcher.types b/tests/baselines/reference/APISample_watcher.types index 06329de5c96..78261fffa91 100644 --- a/tests/baselines/reference/APISample_watcher.types +++ b/tests/baselines/reference/APISample_watcher.types @@ -2709,14 +2709,14 @@ declare module "typescript" { >SourceFile : SourceFile /** - * Emits the javascript and declaration files. If targetSourceFile is not specified, then - * the javascript and declaration files will be produced for all the files in this program. - * If targetSourceFile is specified, then only the javascript and declaration for that + * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then + * the JavaScript and declaration files will be produced for all the files in this program. + * If targetSourceFile is specified, then only the JavaScript and declaration for that * specific file will be generated. * * If writeFile is not specified then the writeFile callback from the compiler host will be - * used for writing the javascript and declaration files. Otherwise, the writeFile parameter - * will be invoked when writing the javascript and declaration files. + * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter + * will be invoked when writing the JavaScript and declaration files. */ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; >emit : (targetSourceFile?: SourceFile, writeFile?: WriteFileCallback) => EmitResult diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics1.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics1.ts index e73b487347a..5fbe669de30 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics1.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics1.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// import a = b; verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics10.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics10.ts index d5bf9e142d7..ecefb25d218 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics10.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics10.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// function F() { } verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics11.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics11.ts index 060dfa4c01a..da468d59f3b 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics11.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics11.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// function F(): number { } verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics12.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics12.ts index 4a73b44725d..89e459d2a5b 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics12.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics12.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// declare var v; verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics13.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics13.ts index 2717e23aba9..c3c0fc9ef7b 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics13.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics13.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// var v: () => number; verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics14.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics14.ts index c67659379fc..5e7c2010480 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics14.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics14.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// Foo(); verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics15.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics15.ts index 756e17d9a34..2c7d87a74e2 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics15.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics15.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// function F(public p) { } verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics16.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics16.ts index 1ce8f3a767d..3bc3030e2b1 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics16.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics16.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// function F(p?) { } verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics17.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics17.ts index fad657f9b50..39b67b13ea8 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics17.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics17.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// function F(a: number) { } verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics18.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics18.ts index 6c2578d6e85..96dc2bce892 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics18.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics18.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// class C { v } verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics19.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics19.ts index 6dc83c38327..efbe1694419 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics19.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics19.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// enum E { } verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics2.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics2.ts index e239577e5e4..abf9f693b0c 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics2.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics2.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// export = b; verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts index cf5f16b827a..d0f6cef468e 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// var v = undefined; verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts index c27308cd27c..4e424281dfd 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// class C { } verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts index 8505798e230..80e8873b01a 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// public class C { } verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts index 9fd183b9e69..411bef8a82f 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// class C implements D { } verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics6.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics6.ts index 09cd23ffbf6..f86d26ba723 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics6.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics6.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// interface I { } verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics7.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics7.ts index 77c0b1f4e0d..ccd9450f49b 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics7.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics7.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// module M { } verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts index c0a27621539..11105a44197 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// type a = b; verify.getSemanticDiagnostics(`[ diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics9.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics9.ts index 6b7eed188fe..81016fd8ba7 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics9.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics9.ts @@ -1,7 +1,7 @@ /// // @allowNonTsExtensions: true -// @Filename: a.tsjs +// @Filename: a.js //// public function F() { } verify.getSemanticDiagnostics(`[