diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 4a62c2a408f..cdf68cb2dfa 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -1311,12 +1311,13 @@ namespace ts { * the same key with the given 'makeKey' function, then the element with the higher * index in the array will be the one associated with the produced key. */ - export function arrayToMap(array: ReadonlyArray, makeKey: (value: T) => string): Map; - export function arrayToMap(array: ReadonlyArray, makeKey: (value: T) => string, makeValue: (value: T) => U): Map; - export function arrayToMap(array: ReadonlyArray, makeKey: (value: T) => string, makeValue: (value: T) => T | U = identity): Map { + export function arrayToMap(array: ReadonlyArray, makeKey: (value: T) => string | undefined): Map; + export function arrayToMap(array: ReadonlyArray, makeKey: (value: T) => string | undefined, makeValue: (value: T) => U): Map; + export function arrayToMap(array: ReadonlyArray, makeKey: (value: T) => string | undefined, makeValue: (value: T) => T | U = identity): Map { const result = createMap(); for (const value of array) { - result.set(makeKey(value), makeValue(value)); + const key = makeKey(value); + if (key !== undefined) result.set(key, makeValue(value)); } return result; } @@ -1337,8 +1338,9 @@ namespace ts { * @param array the array of input elements. */ export function arrayToSet(array: ReadonlyArray): Map; - export function arrayToSet(array: ReadonlyArray, makeKey: (value: T) => string): Map; - export function arrayToSet(array: ReadonlyArray, makeKey?: (value: any) => string): Map { + export function arrayToSet(array: ReadonlyArray, makeKey: (value: T) => string | undefined): Map; + export function arrayToSet(array: ReadonlyArray, makeKey: (value: T) => __String | undefined): UnderscoreEscapedMap; + export function arrayToSet(array: ReadonlyArray, makeKey?: (value: any) => string | __String | undefined): Map | UnderscoreEscapedMap { return arrayToMap(array, makeKey || (s => s), () => true); } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 681752865e6..61c24ee12ec 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -6323,4 +6323,9 @@ namespace ts { export function isStringLiteralLike(node: Node): node is StringLiteralLike { return node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NoSubstitutionTemplateLiteral; } + + /** @internal */ + export function isNamedImportsOrExports(node: Node): node is NamedImportsOrExports { + return node.kind === SyntaxKind.NamedImports || node.kind === SyntaxKind.NamedExports; + } } diff --git a/src/harness/unittests/organizeImports.ts b/src/harness/unittests/organizeImports.ts index 3de5588af8e..7d496b97d99 100644 --- a/src/harness/unittests/organizeImports.ts +++ b/src/harness/unittests/organizeImports.ts @@ -247,6 +247,24 @@ import D from "lib"; }, libFile); + testOrganizeImports("Unused_false_positive_shorthand_assignment", + { + path: "/test.ts", + content: ` +import { x } from "a"; +const o = { x }; +` + }); + + testOrganizeImports("Unused_false_positive_export_shorthand", + { + path: "/test.ts", + content: ` +import { x } from "a"; +export { x }; +` + }); + testOrganizeImports("MoveToTop", { path: "/test.ts", diff --git a/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl index 8c72ca29d98..1e9d7342817 100644 --- a/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -642,6 +642,9 @@ + + + @@ -903,18 +906,27 @@ + + + + + + + + + @@ -939,6 +951,9 @@ + + + @@ -966,6 +981,9 @@ + + + @@ -984,6 +1002,9 @@ + + + @@ -1002,18 +1023,27 @@ + + + + + + + + + @@ -1524,6 +1554,9 @@ + + + @@ -2151,18 +2184,27 @@ + + + + + + + + + @@ -2475,12 +2517,18 @@ + + + + + + @@ -2664,6 +2712,9 @@ + + + @@ -3714,6 +3765,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -3825,6 +3897,12 @@ + + + + + + @@ -4032,12 +4110,18 @@ + + + + + + @@ -4239,6 +4323,9 @@ + + + @@ -4356,6 +4443,9 @@ + + + @@ -4851,6 +4941,9 @@ + + + @@ -4950,12 +5043,18 @@ + + + + + + @@ -5853,6 +5952,9 @@ + + + @@ -5910,6 +6012,12 @@ + + + + + + @@ -6756,6 +6864,9 @@ + + + @@ -7500,6 +7611,9 @@ + + + @@ -7821,6 +7935,9 @@ + + + @@ -7836,6 +7953,9 @@ + + + @@ -7896,12 +8016,18 @@ + + + + + + @@ -7986,6 +8112,9 @@ + + + diff --git a/src/server/client.ts b/src/server/client.ts index 4711bb0c666..2238734e90c 100644 --- a/src/server/client.ts +++ b/src/server/client.ts @@ -556,7 +556,8 @@ namespace ts.server { const request = this.processRequest(CommandNames.GetCodeFixes, args); const response = this.processResponse(request); - return response.body.map(({ description, changes, fixId, fixAllDescription }) => ({ description, changes: this.convertChanges(changes, file), fixId, fixAllDescription })); + return response.body.map(({ fixName, description, changes, commands, fixId, fixAllDescription }) => + ({ fixName, description, changes: this.convertChanges(changes, file), commands: commands as CodeActionCommand[], fixId, fixAllDescription })); } getCombinedCodeFix = notImplemented; diff --git a/src/server/protocol.ts b/src/server/protocol.ts index e9df92e0f38..7a258a904c2 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -1698,6 +1698,8 @@ namespace ts.server.protocol { } export interface CodeFixAction extends CodeAction { + /** Short name to identify the fix, for use by telemetry. */ + fixName: string; /** * If present, one may call 'getCombinedCodeFix' with this fixId. * This may be omitted to indicate that the code fix can't be applied in a group. diff --git a/src/server/session.ts b/src/server/session.ts index 1e02b56adc5..1076d17e11f 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -1663,7 +1663,7 @@ namespace ts.server { } } - private getCodeFixes(args: protocol.CodeFixRequestArgs, simplifiedResult: boolean): ReadonlyArray | ReadonlyArray { + private getCodeFixes(args: protocol.CodeFixRequestArgs, simplifiedResult: boolean): ReadonlyArray | ReadonlyArray { if (args.errorCodes.length === 0) { return undefined; } @@ -1673,15 +1673,7 @@ namespace ts.server { const { startPosition, endPosition } = this.getStartAndEndPosition(args, scriptInfo); const codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes, this.getFormatOptions(file), this.getPreferences(file)); - if (!codeActions) { - return undefined; - } - if (simplifiedResult) { - return codeActions.map(codeAction => this.mapCodeAction(project, codeAction)); - } - else { - return codeActions; - } + return simplifiedResult ? codeActions.map(codeAction => this.mapCodeFixAction(project, codeAction)) : codeActions; } private getCombinedCodeFix({ scope, fixId }: protocol.GetCombinedCodeFixRequestArgs, simplifiedResult: boolean): protocol.CombinedCodeActions | CombinedCodeActions { @@ -1729,9 +1721,12 @@ namespace ts.server { return { startPosition, endPosition }; } - private mapCodeAction(project: Project, { description, changes: unmappedChanges, commands, fixId, fixAllDescription }: CodeFixAction): protocol.CodeFixAction { - const changes = unmappedChanges.map(change => this.mapTextChangesToCodeEditsUsingScriptinfo(change, project.getScriptInfoForNormalizedPath(toNormalizedPath(change.fileName)))); - return { description, changes, commands, fixId, fixAllDescription }; + private mapCodeAction(project: Project, { description, changes, commands }: CodeAction): protocol.CodeAction { + return { description, changes: this.mapTextChangesToCodeEdits(project, changes), commands }; + } + + private mapCodeFixAction(project: Project, { fixName, description, changes, commands, fixId, fixAllDescription }: CodeFixAction): protocol.CodeFixAction { + return { fixName, description, changes: this.mapTextChangesToCodeEdits(project, changes), commands, fixId, fixAllDescription }; } private mapTextChangesToCodeEdits(project: Project, textChanges: ReadonlyArray): protocol.FileCodeEdits[] { diff --git a/src/services/codeFixProvider.ts b/src/services/codeFixProvider.ts index 291f8fd1d66..39f760ba04c 100644 --- a/src/services/codeFixProvider.ts +++ b/src/services/codeFixProvider.ts @@ -24,7 +24,7 @@ namespace ts { } export namespace codefix { - const codeFixRegistrations: CodeFixRegistration[][] = []; + const errorCodeToFixes = createMultiMap(); const fixIdToRegistration = createMap(); type DiagnosticAndArguments = DiagnosticMessage | [DiagnosticMessage, string] | [DiagnosticMessage, string, string]; @@ -34,26 +34,21 @@ namespace ts { : getLocaleSpecificMessage(diag); } - export function createCodeFixActionNoFixId(changes: FileTextChanges[], description: DiagnosticAndArguments) { - return createCodeFixActionWorker(diagnosticToString(description), changes, /*fixId*/ undefined, /*fixAllDescription*/ undefined); + export function createCodeFixActionNoFixId(fixName: string, changes: FileTextChanges[], description: DiagnosticAndArguments) { + return createCodeFixActionWorker(fixName, diagnosticToString(description), changes, /*fixId*/ undefined, /*fixAllDescription*/ undefined); } - export function createCodeFixAction(changes: FileTextChanges[], description: DiagnosticAndArguments, fixId: {}, fixAllDescription: DiagnosticAndArguments, command?: CodeActionCommand): CodeFixAction { - return createCodeFixActionWorker(diagnosticToString(description), changes, fixId, diagnosticToString(fixAllDescription), command); + export function createCodeFixAction(fixName: string, changes: FileTextChanges[], description: DiagnosticAndArguments, fixId: {}, fixAllDescription: DiagnosticAndArguments, command?: CodeActionCommand): CodeFixAction { + return createCodeFixActionWorker(fixName, diagnosticToString(description), changes, fixId, diagnosticToString(fixAllDescription), command); } - function createCodeFixActionWorker(description: string, changes: FileTextChanges[], fixId?: {}, fixAllDescription?: string, command?: CodeActionCommand): CodeFixAction { - return { description, changes, fixId, fixAllDescription, commands: command ? [command] : undefined }; + function createCodeFixActionWorker(fixName: string, description: string, changes: FileTextChanges[], fixId?: {}, fixAllDescription?: string, command?: CodeActionCommand): CodeFixAction { + return { fixName, description, changes, fixId, fixAllDescription, commands: command ? [command] : undefined }; } export function registerCodeFix(reg: CodeFixRegistration) { for (const error of reg.errorCodes) { - let registrations = codeFixRegistrations[error]; - if (!registrations) { - registrations = []; - codeFixRegistrations[error] = registrations; - } - registrations.push(reg); + errorCodeToFixes.add(String(error), reg); } if (reg.fixIds) { for (const fixId of reg.fixIds) { @@ -63,29 +58,12 @@ namespace ts { } } - export function getSupportedErrorCodes() { - return Object.keys(codeFixRegistrations); + export function getSupportedErrorCodes(): string[] { + return arrayFrom(errorCodeToFixes.keys()); } export function getFixes(context: CodeFixContext): CodeFixAction[] { - const fixes = codeFixRegistrations[context.errorCode]; - const allActions: CodeFixAction[] = []; - - forEach(fixes, f => { - const actions = f.getCodeActions(context); - if (actions && actions.length > 0) { - for (const action of actions) { - if (action === undefined) { - context.host.log(`Action for error code ${context.errorCode} added an invalid action entry; please log a bug`); - } - else { - allActions.push(action); - } - } - } - }); - - return allActions; + return flatMap(errorCodeToFixes.get(String(context.errorCode)) || emptyArray, f => f.getCodeActions(context)); } export function getAllFixes(context: CodeFixAllContext): CombinedCodeActions { diff --git a/src/services/codefixes/addMissingInvocationForDecorator.ts b/src/services/codefixes/addMissingInvocationForDecorator.ts index 7b8a7d05fe7..ead64f9a2ca 100644 --- a/src/services/codefixes/addMissingInvocationForDecorator.ts +++ b/src/services/codefixes/addMissingInvocationForDecorator.ts @@ -6,7 +6,7 @@ namespace ts.codefix { errorCodes, getCodeActions: (context) => { const changes = textChanges.ChangeTracker.with(context, t => makeChange(t, context.sourceFile, context.span.start)); - return [createCodeFixAction(changes, Diagnostics.Call_decorator_expression, fixId, Diagnostics.Add_to_all_uncalled_decorators)]; + return [createCodeFixAction(fixId, changes, Diagnostics.Call_decorator_expression, fixId, Diagnostics.Add_to_all_uncalled_decorators)]; }, fixIds: [fixId], getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => makeChange(changes, diag.file!, diag.start!)), diff --git a/src/services/codefixes/annotateWithTypeFromJSDoc.ts b/src/services/codefixes/annotateWithTypeFromJSDoc.ts index c8a3977eb3b..5b809452677 100644 --- a/src/services/codefixes/annotateWithTypeFromJSDoc.ts +++ b/src/services/codefixes/annotateWithTypeFromJSDoc.ts @@ -8,7 +8,7 @@ namespace ts.codefix { const decl = getDeclaration(context.sourceFile, context.span.start); if (!decl) return; const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, decl)); - return [createCodeFixAction(changes, Diagnostics.Annotate_with_type_from_JSDoc, fixId, Diagnostics.Annotate_everything_with_types_from_JSDoc)]; + return [createCodeFixAction(fixId, changes, Diagnostics.Annotate_with_type_from_JSDoc, fixId, Diagnostics.Annotate_everything_with_types_from_JSDoc)]; }, fixIds: [fixId], getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => { diff --git a/src/services/codefixes/convertFunctionToEs6Class.ts b/src/services/codefixes/convertFunctionToEs6Class.ts index bb260463831..bf20aeda72b 100644 --- a/src/services/codefixes/convertFunctionToEs6Class.ts +++ b/src/services/codefixes/convertFunctionToEs6Class.ts @@ -6,7 +6,7 @@ namespace ts.codefix { errorCodes, getCodeActions(context: CodeFixContext) { const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, context.span.start, context.program.getTypeChecker())); - return [createCodeFixAction(changes, Diagnostics.Convert_function_to_an_ES2015_class, fixId, Diagnostics.Convert_all_constructor_functions_to_classes)]; + return [createCodeFixAction(fixId, changes, Diagnostics.Convert_function_to_an_ES2015_class, fixId, Diagnostics.Convert_all_constructor_functions_to_classes)]; }, fixIds: [fixId], getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, err) => doChange(changes, err.file!, err.start, context.program.getTypeChecker())), diff --git a/src/services/codefixes/convertToEs6Module.ts b/src/services/codefixes/convertToEs6Module.ts index b8c78d57827..67aaa60f186 100644 --- a/src/services/codefixes/convertToEs6Module.ts +++ b/src/services/codefixes/convertToEs6Module.ts @@ -13,7 +13,7 @@ namespace ts.codefix { } }); // No support for fix-all since this applies to the whole file at once anyway. - return [createCodeFixActionNoFixId(changes, Diagnostics.Convert_to_ES6_module)]; + return [createCodeFixActionNoFixId("convertToEs6Module", changes, Diagnostics.Convert_to_ES6_module)]; }, }); diff --git a/src/services/codefixes/correctQualifiedNameToIndexedAccessType.ts b/src/services/codefixes/correctQualifiedNameToIndexedAccessType.ts index f47b65aad90..54fe1823863 100644 --- a/src/services/codefixes/correctQualifiedNameToIndexedAccessType.ts +++ b/src/services/codefixes/correctQualifiedNameToIndexedAccessType.ts @@ -9,7 +9,7 @@ namespace ts.codefix { if (!qualifiedName) return undefined; const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, qualifiedName)); const newText = `${qualifiedName.left.text}["${qualifiedName.right.text}"]`; - return [createCodeFixAction(changes, [Diagnostics.Rewrite_as_the_indexed_access_type_0, newText], fixId, Diagnostics.Rewrite_all_as_indexed_access_types)]; + return [createCodeFixAction(fixId, changes, [Diagnostics.Rewrite_as_the_indexed_access_type_0, newText], fixId, Diagnostics.Rewrite_all_as_indexed_access_types)]; }, fixIds: [fixId], getAllCodeActions: (context) => codeFixAll(context, errorCodes, (changes, diag) => { diff --git a/src/services/codefixes/disableJsDiagnostics.ts b/src/services/codefixes/disableJsDiagnostics.ts index c53c35c5f81..b5d3059dd42 100644 --- a/src/services/codefixes/disableJsDiagnostics.ts +++ b/src/services/codefixes/disableJsDiagnostics.ts @@ -1,5 +1,6 @@ /* @internal */ namespace ts.codefix { + const fixName = "disableJsDiagnostics"; const fixId = "disableJsDiagnostics"; const errorCodes = mapDefined(Object.keys(Diagnostics) as ReadonlyArray, key => { const diag = Diagnostics[key]; @@ -18,6 +19,7 @@ namespace ts.codefix { const fixes: CodeFixAction[] = [ // fixId unnecessary because adding `// @ts-nocheck` even once will ignore every error in the file. createCodeFixActionNoFixId( + fixName, [createFileTextChanges(sourceFile.fileName, [ createTextChange(sourceFile.checkJsDirective ? createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end) @@ -27,7 +29,7 @@ namespace ts.codefix { ]; if (textChanges.isValidLocationToAddComment(sourceFile, span.start)) { - fixes.unshift(createCodeFixAction(textChanges.ChangeTracker.with(context, t => makeChange(t, sourceFile, span.start)), Diagnostics.Ignore_this_error_message, fixId, Diagnostics.Add_ts_ignore_to_all_error_messages)); + fixes.unshift(createCodeFixAction(fixName, textChanges.ChangeTracker.with(context, t => makeChange(t, sourceFile, span.start)), Diagnostics.Ignore_this_error_message, fixId, Diagnostics.Add_ts_ignore_to_all_error_messages)); } return fixes; diff --git a/src/services/codefixes/fixAddMissingMember.ts b/src/services/codefixes/fixAddMissingMember.ts index 9a3b4854351..940201d7008 100644 --- a/src/services/codefixes/fixAddMissingMember.ts +++ b/src/services/codefixes/fixAddMissingMember.ts @@ -1,5 +1,6 @@ /* @internal */ namespace ts.codefix { + const fixName = "addMissingMember"; const errorCodes = [ Diagnostics.Property_0_does_not_exist_on_type_1.code, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code, @@ -75,7 +76,7 @@ namespace ts.codefix { function getActionsForAddMissingMemberInJavaScriptFile(context: CodeFixContext, classDeclarationSourceFile: SourceFile, classDeclaration: ClassLikeDeclaration, tokenName: string, makeStatic: boolean): CodeFixAction | undefined { const changes = textChanges.ChangeTracker.with(context, t => addMissingMemberInJs(t, classDeclarationSourceFile, classDeclaration, tokenName, makeStatic)); return changes.length === 0 ? undefined - : createCodeFixAction(changes, [makeStatic ? Diagnostics.Initialize_static_property_0 : Diagnostics.Initialize_property_0_in_the_constructor, tokenName], fixId, Diagnostics.Add_all_missing_members); + : createCodeFixAction(fixName, changes, [makeStatic ? Diagnostics.Initialize_static_property_0 : Diagnostics.Initialize_property_0_in_the_constructor, tokenName], fixId, Diagnostics.Add_all_missing_members); } function addMissingMemberInJs(changeTracker: textChanges.ChangeTracker, classDeclarationSourceFile: SourceFile, classDeclaration: ClassLikeDeclaration, tokenName: string, makeStatic: boolean): void { @@ -120,7 +121,7 @@ namespace ts.codefix { function createAddPropertyDeclarationAction(context: CodeFixContext, classDeclarationSourceFile: SourceFile, classDeclaration: ClassLikeDeclaration, makeStatic: boolean, tokenName: string, typeNode: TypeNode): CodeFixAction { const changes = textChanges.ChangeTracker.with(context, t => addPropertyDeclaration(t, classDeclarationSourceFile, classDeclaration, tokenName, typeNode, makeStatic)); - return createCodeFixAction(changes, [makeStatic ? Diagnostics.Declare_static_property_0 : Diagnostics.Declare_property_0, tokenName], fixId, Diagnostics.Add_all_missing_members); + return createCodeFixAction(fixName, changes, [makeStatic ? Diagnostics.Declare_static_property_0 : Diagnostics.Declare_property_0, tokenName], fixId, Diagnostics.Add_all_missing_members); } function addPropertyDeclaration(changeTracker: textChanges.ChangeTracker, classDeclarationSourceFile: SourceFile, classDeclaration: ClassLikeDeclaration, tokenName: string, typeNode: TypeNode, makeStatic: boolean): void { @@ -153,7 +154,7 @@ namespace ts.codefix { const changes = textChanges.ChangeTracker.with(context, t => t.insertNodeAtClassStart(classDeclarationSourceFile, classDeclaration, indexSignature)); // No fixId here because code-fix-all currently only works on adding individual named properties. - return createCodeFixActionNoFixId(changes, [Diagnostics.Add_index_signature_for_property_0, tokenName]); + return createCodeFixActionNoFixId(fixName, changes, [Diagnostics.Add_index_signature_for_property_0, tokenName]); } function getActionForMethodDeclaration( @@ -167,7 +168,7 @@ namespace ts.codefix { preferences: UserPreferences, ): CodeFixAction | undefined { const changes = textChanges.ChangeTracker.with(context, t => addMethodDeclaration(t, classDeclarationSourceFile, classDeclaration, token, callExpression, makeStatic, inJs, preferences)); - return createCodeFixAction(changes, [makeStatic ? Diagnostics.Declare_static_method_0 : Diagnostics.Declare_method_0, token.text], fixId, Diagnostics.Add_all_missing_members); + return createCodeFixAction(fixName, changes, [makeStatic ? Diagnostics.Declare_static_method_0 : Diagnostics.Declare_method_0, token.text], fixId, Diagnostics.Add_all_missing_members); } function addMethodDeclaration( diff --git a/src/services/codefixes/fixAwaitInSyncFunction.ts b/src/services/codefixes/fixAwaitInSyncFunction.ts index 804910e9a22..fd00498573c 100644 --- a/src/services/codefixes/fixAwaitInSyncFunction.ts +++ b/src/services/codefixes/fixAwaitInSyncFunction.ts @@ -12,7 +12,7 @@ namespace ts.codefix { const nodes = getNodes(sourceFile, span.start); if (!nodes) return undefined; const changes = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, nodes)); - return [createCodeFixAction(changes, Diagnostics.Add_async_modifier_to_containing_function, fixId, Diagnostics.Add_all_missing_async_modifiers)]; + return [createCodeFixAction(fixId, changes, Diagnostics.Add_async_modifier_to_containing_function, fixId, Diagnostics.Add_all_missing_async_modifiers)]; }, fixIds: [fixId], getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => { diff --git a/src/services/codefixes/fixCannotFindModule.ts b/src/services/codefixes/fixCannotFindModule.ts index 89f7a3f7793..9699cd3ceb4 100644 --- a/src/services/codefixes/fixCannotFindModule.ts +++ b/src/services/codefixes/fixCannotFindModule.ts @@ -8,7 +8,7 @@ namespace ts.codefix { const { host, sourceFile, span: { start } } = context; const packageName = getTypesPackageNameToInstall(host, sourceFile, start); return packageName === undefined ? [] - : [createCodeFixAction(/*changes*/ [], [Diagnostics.Install_0, packageName], fixId, Diagnostics.Install_all_missing_types_packages, getCommand(sourceFile.fileName, packageName))]; + : [createCodeFixAction(fixId, /*changes*/ [], [Diagnostics.Install_0, packageName], fixId, Diagnostics.Install_all_missing_types_packages, getCommand(sourceFile.fileName, packageName))]; }, fixIds: [fixId], getAllCodeActions: context => codeFixAll(context, errorCodes, (_, diag, commands) => { diff --git a/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts b/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts index 3a1443c04bb..a931f849cb2 100644 --- a/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts +++ b/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts @@ -11,7 +11,7 @@ namespace ts.codefix { const { program, sourceFile, span } = context; const changes = textChanges.ChangeTracker.with(context, t => addMissingMembers(getClass(sourceFile, span.start), sourceFile, program.getTypeChecker(), t, context.preferences)); - return changes.length === 0 ? undefined : [createCodeFixAction(changes, Diagnostics.Implement_inherited_abstract_class, fixId, Diagnostics.Implement_all_inherited_abstract_classes)]; + return changes.length === 0 ? undefined : [createCodeFixAction(fixId, changes, Diagnostics.Implement_inherited_abstract_class, fixId, Diagnostics.Implement_all_inherited_abstract_classes)]; }, fixIds: [fixId], getAllCodeActions: context => { diff --git a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts index 91815edb775..4e0b5745149 100644 --- a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts +++ b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts @@ -11,7 +11,7 @@ namespace ts.codefix { const checker = program.getTypeChecker(); return mapDefined(getClassImplementsHeritageClauseElements(classDeclaration), implementedTypeNode => { const changes = textChanges.ChangeTracker.with(context, t => addMissingDeclarations(checker, implementedTypeNode, sourceFile, classDeclaration, t, context.preferences)); - return changes.length === 0 ? undefined : createCodeFixAction(changes, [Diagnostics.Implement_interface_0, implementedTypeNode.getText(sourceFile)], fixId, Diagnostics.Implement_all_unimplemented_interfaces); + return changes.length === 0 ? undefined : createCodeFixAction(fixId, changes, [Diagnostics.Implement_interface_0, implementedTypeNode.getText(sourceFile)], fixId, Diagnostics.Implement_all_unimplemented_interfaces); }); }, fixIds: [fixId], diff --git a/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts b/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts index d9c98747286..af38b8e9025 100644 --- a/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts +++ b/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts @@ -10,7 +10,7 @@ namespace ts.codefix { if (!nodes) return undefined; const { constructor, superCall } = nodes; const changes = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, constructor, superCall)); - return [createCodeFixAction(changes, Diagnostics.Make_super_call_the_first_statement_in_the_constructor, fixId, Diagnostics.Make_all_super_calls_the_first_statement_in_their_constructor)]; + return [createCodeFixAction(fixId, changes, Diagnostics.Make_super_call_the_first_statement_in_the_constructor, fixId, Diagnostics.Make_all_super_calls_the_first_statement_in_their_constructor)]; }, fixIds: [fixId], getAllCodeActions(context) { diff --git a/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts b/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts index 31aa4fcedae..2aed263ee83 100644 --- a/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts +++ b/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts @@ -8,7 +8,7 @@ namespace ts.codefix { const { sourceFile, span } = context; const ctr = getNode(sourceFile, span.start); const changes = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, ctr)); - return [createCodeFixAction(changes, Diagnostics.Add_missing_super_call, fixId, Diagnostics.Add_all_missing_super_calls)]; + return [createCodeFixAction(fixId, changes, Diagnostics.Add_missing_super_call, fixId, Diagnostics.Add_all_missing_super_calls)]; }, fixIds: [fixId], getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => diff --git a/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts b/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts index 381a8228c0d..c3f406b8475 100644 --- a/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts +++ b/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts @@ -10,7 +10,7 @@ namespace ts.codefix { if (!nodes) return undefined; const { extendsToken, heritageClauses } = nodes; const changes = textChanges.ChangeTracker.with(context, t => doChanges(t, sourceFile, extendsToken, heritageClauses)); - return [createCodeFixAction(changes, Diagnostics.Change_extends_to_implements, fixId, Diagnostics.Change_all_extended_interfaces_to_implements)]; + return [createCodeFixAction(fixId, changes, Diagnostics.Change_extends_to_implements, fixId, Diagnostics.Change_all_extended_interfaces_to_implements)]; }, fixIds: [fixId], getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => { diff --git a/src/services/codefixes/fixForgottenThisPropertyAccess.ts b/src/services/codefixes/fixForgottenThisPropertyAccess.ts index 2cf7e2143a3..b26e4c7cdca 100644 --- a/src/services/codefixes/fixForgottenThisPropertyAccess.ts +++ b/src/services/codefixes/fixForgottenThisPropertyAccess.ts @@ -11,7 +11,7 @@ namespace ts.codefix { return undefined; } const changes = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, token)); - return [createCodeFixAction(changes, Diagnostics.Add_this_to_unresolved_variable, fixId, Diagnostics.Add_this_to_all_unresolved_variables_matching_a_member_name)]; + return [createCodeFixAction(fixId, changes, Diagnostics.Add_this_to_unresolved_variable, fixId, Diagnostics.Add_this_to_all_unresolved_variables_matching_a_member_name)]; }, fixIds: [fixId], getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => { diff --git a/src/services/codefixes/fixInvalidImportSyntax.ts b/src/services/codefixes/fixInvalidImportSyntax.ts index 84bd9867c70..50bf41360bc 100644 --- a/src/services/codefixes/fixInvalidImportSyntax.ts +++ b/src/services/codefixes/fixInvalidImportSyntax.ts @@ -1,5 +1,7 @@ /* @internal */ namespace ts.codefix { + const fixName = "invalidImportSyntax"; + registerCodeFix({ errorCodes: [Diagnostics.A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime.code], getCodeActions: getActionsForInvalidImport @@ -43,7 +45,7 @@ namespace ts.codefix { function createAction(context: CodeFixContext, sourceFile: SourceFile, node: Node, replacement: Node): CodeFixAction { const changes = textChanges.ChangeTracker.with(context, t => t.replaceNode(sourceFile, node, replacement)); - return createCodeFixActionNoFixId(changes, [Diagnostics.Replace_import_with_0, changes[0].textChanges[0].newText]); + return createCodeFixActionNoFixId("invalidImportSyntax", changes, [Diagnostics.Replace_import_with_0, changes[0].textChanges[0].newText]); } registerCodeFix({ @@ -72,7 +74,7 @@ namespace ts.codefix { addRange(fixes, getCodeFixesForImportDeclaration(context, relatedImport)); } const changes = textChanges.ChangeTracker.with(context, t => t.replaceNode(sourceFile, expr, createPropertyAccess(expr, "default"), {})); - fixes.push(createCodeFixActionNoFixId(changes, Diagnostics.Use_synthetic_default_member)); + fixes.push(createCodeFixActionNoFixId(fixName, changes, Diagnostics.Use_synthetic_default_member)); return fixes; } } diff --git a/src/services/codefixes/fixJSDocTypes.ts b/src/services/codefixes/fixJSDocTypes.ts index 848666b67f0..1919b0742f0 100644 --- a/src/services/codefixes/fixJSDocTypes.ts +++ b/src/services/codefixes/fixJSDocTypes.ts @@ -22,7 +22,7 @@ namespace ts.codefix { function fix(type: Type, fixId: string, fixAllDescription: DiagnosticMessage): CodeFixAction { const changes = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, typeNode, type, checker)); - return createCodeFixAction(changes, [Diagnostics.Change_0_to_1, original, checker.typeToString(type)], fixId, fixAllDescription); + return createCodeFixAction("jdocTypes", changes, [Diagnostics.Change_0_to_1, original, checker.typeToString(type)], fixId, fixAllDescription); } }, fixIds: [fixIdPlain, fixIdNullable], diff --git a/src/services/codefixes/fixSpelling.ts b/src/services/codefixes/fixSpelling.ts index 59f5e64f212..252b08b356a 100644 --- a/src/services/codefixes/fixSpelling.ts +++ b/src/services/codefixes/fixSpelling.ts @@ -15,7 +15,7 @@ namespace ts.codefix { const { node, suggestion } = info; const { target } = context.host.getCompilationSettings(); const changes = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, node, suggestion, target)); - return [createCodeFixAction(changes, [Diagnostics.Change_spelling_to_0, suggestion], fixId, Diagnostics.Fix_all_detected_spelling_errors)]; + return [createCodeFixAction("spelling", changes, [Diagnostics.Change_spelling_to_0, suggestion], fixId, Diagnostics.Fix_all_detected_spelling_errors)]; }, fixIds: [fixId], getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => { diff --git a/src/services/codefixes/fixStrictClassInitialization.ts b/src/services/codefixes/fixStrictClassInitialization.ts index 69a69a8c3c8..8d4e457662f 100644 --- a/src/services/codefixes/fixStrictClassInitialization.ts +++ b/src/services/codefixes/fixStrictClassInitialization.ts @@ -1,5 +1,6 @@ /* @internal */ namespace ts.codefix { + const fixName = "strictClassInitialization"; const fixIdAddDefiniteAssignmentAssertions = "addMissingPropertyDefiniteAssignmentAssertions"; const fixIdAddUndefinedType = "addMissingPropertyUndefinedType"; const fixIdAddInitializer = "addMissingPropertyInitializer"; @@ -53,7 +54,7 @@ namespace ts.codefix { function getActionForAddMissingDefiniteAssignmentAssertion (context: CodeFixContext, propertyDeclaration: PropertyDeclaration): CodeFixAction { const changes = textChanges.ChangeTracker.with(context, t => addDefiniteAssignmentAssertion(t, context.sourceFile, propertyDeclaration)); - return createCodeFixAction(changes, [Diagnostics.Add_definite_assignment_assertion_to_property_0, propertyDeclaration.getText()], fixIdAddDefiniteAssignmentAssertions, Diagnostics.Add_definite_assignment_assertions_to_all_uninitialized_properties); + return createCodeFixAction(fixName, changes, [Diagnostics.Add_definite_assignment_assertion_to_property_0, propertyDeclaration.getText()], fixIdAddDefiniteAssignmentAssertions, Diagnostics.Add_definite_assignment_assertions_to_all_uninitialized_properties); } function addDefiniteAssignmentAssertion(changeTracker: textChanges.ChangeTracker, propertyDeclarationSourceFile: SourceFile, propertyDeclaration: PropertyDeclaration): void { @@ -71,7 +72,7 @@ namespace ts.codefix { function getActionForAddMissingUndefinedType (context: CodeFixContext, propertyDeclaration: PropertyDeclaration): CodeFixAction { const changes = textChanges.ChangeTracker.with(context, t => addUndefinedType(t, context.sourceFile, propertyDeclaration)); - return createCodeFixAction(changes, [Diagnostics.Add_undefined_type_to_property_0, propertyDeclaration.name.getText()], fixIdAddUndefinedType, Diagnostics.Add_undefined_type_to_all_uninitialized_properties); + return createCodeFixAction(fixName, changes, [Diagnostics.Add_undefined_type_to_property_0, propertyDeclaration.name.getText()], fixIdAddUndefinedType, Diagnostics.Add_undefined_type_to_all_uninitialized_properties); } function addUndefinedType(changeTracker: textChanges.ChangeTracker, propertyDeclarationSourceFile: SourceFile, propertyDeclaration: PropertyDeclaration): void { @@ -86,7 +87,7 @@ namespace ts.codefix { if (!initializer) return undefined; const changes = textChanges.ChangeTracker.with(context, t => addInitializer(t, context.sourceFile, propertyDeclaration, initializer)); - return createCodeFixAction(changes, [Diagnostics.Add_initializer_to_property_0, propertyDeclaration.name.getText()], fixIdAddInitializer, Diagnostics.Add_initializers_to_all_uninitialized_properties); + return createCodeFixAction(fixName, changes, [Diagnostics.Add_initializer_to_property_0, propertyDeclaration.name.getText()], fixIdAddInitializer, Diagnostics.Add_initializers_to_all_uninitialized_properties); } function addInitializer (changeTracker: textChanges.ChangeTracker, propertyDeclarationSourceFile: SourceFile, propertyDeclaration: PropertyDeclaration, initializer: Expression): void { diff --git a/src/services/codefixes/fixUnusedIdentifier.ts b/src/services/codefixes/fixUnusedIdentifier.ts index 1fe0107dafb..a37435cd109 100644 --- a/src/services/codefixes/fixUnusedIdentifier.ts +++ b/src/services/codefixes/fixUnusedIdentifier.ts @@ -1,5 +1,6 @@ /* @internal */ namespace ts.codefix { + const fixName = "unusedIdentifier"; const fixIdPrefix = "unusedIdentifier_prefix"; const fixIdDelete = "unusedIdentifier_delete"; const errorCodes = [ @@ -14,7 +15,7 @@ namespace ts.codefix { const importDecl = tryGetFullImport(sourceFile, context.span.start); if (importDecl) { const changes = textChanges.ChangeTracker.with(context, t => t.deleteNode(sourceFile, importDecl)); - return [createCodeFixAction(changes, [Diagnostics.Remove_import_from_0, showModuleSpecifier(importDecl)], fixIdDelete, Diagnostics.Delete_all_unused_declarations)]; + return [createCodeFixAction(fixName, changes, [Diagnostics.Remove_import_from_0, showModuleSpecifier(importDecl)], fixIdDelete, Diagnostics.Delete_all_unused_declarations)]; } const token = getToken(sourceFile, textSpanEnd(context.span)); @@ -22,12 +23,12 @@ namespace ts.codefix { const deletion = textChanges.ChangeTracker.with(context, t => tryDeleteDeclaration(t, sourceFile, token)); if (deletion.length) { - result.push(createCodeFixAction(deletion, [Diagnostics.Remove_declaration_for_Colon_0, token.getText(sourceFile)], fixIdDelete, Diagnostics.Delete_all_unused_declarations)); + result.push(createCodeFixAction(fixName, deletion, [Diagnostics.Remove_declaration_for_Colon_0, token.getText(sourceFile)], fixIdDelete, Diagnostics.Delete_all_unused_declarations)); } const prefix = textChanges.ChangeTracker.with(context, t => tryPrefixDeclaration(t, errorCode, sourceFile, token)); if (prefix.length) { - result.push(createCodeFixAction(prefix, [Diagnostics.Prefix_0_with_an_underscore, token.getText(sourceFile)], fixIdPrefix, Diagnostics.Prefix_all_unused_declarations_with_where_possible)); + result.push(createCodeFixAction(fixName, prefix, [Diagnostics.Prefix_0_with_an_underscore, token.getText(sourceFile)], fixIdPrefix, Diagnostics.Prefix_all_unused_declarations_with_where_possible)); } return result; diff --git a/src/services/codefixes/helpers.ts b/src/services/codefixes/helpers.ts index 35e75d831fd..cd3c5339a29 100644 --- a/src/services/codefixes/helpers.ts +++ b/src/services/codefixes/helpers.ts @@ -25,8 +25,7 @@ namespace ts.codefix { } const declaration = declarations[0]; - // Clone name to remove leading trivia. - const name = getSynthesizedDeepClone(getNameOfDeclaration(declaration)) as PropertyName; + const name = getSynthesizedDeepClone(getNameOfDeclaration(declaration), /*includeTrivia*/ false) as PropertyName; const visibilityModifier = createVisibilityModifier(getModifierFlags(declaration)); const modifiers = visibilityModifier ? createNodeArray([visibilityModifier]) : undefined; const type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration)); @@ -69,7 +68,7 @@ namespace ts.codefix { for (const signature of signatures) { // Need to ensure nodes are fresh each time so they can have different positions. - outputMethod(signature, getSynthesizedDeepClones(modifiers), getSynthesizedDeepClone(name)); + outputMethod(signature, getSynthesizedDeepClones(modifiers, /*includeTrivia*/ false), getSynthesizedDeepClone(name, /*includeTrivia*/ false)); } if (declarations.length > signatures.length) { @@ -103,10 +102,6 @@ namespace ts.codefix { return signatureDeclaration; } - function getSynthesizedDeepClones(nodes: NodeArray | undefined): NodeArray | undefined { - return nodes && createNodeArray(nodes.map(getSynthesizedDeepClone)); - } - export function createMethodFromCallExpression( { typeArguments, arguments: args }: CallExpression, methodName: string, diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index 6becea1c6d3..ddd530e4246 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -35,7 +35,7 @@ namespace ts.codefix { function createCodeAction(descriptionDiagnostic: DiagnosticMessage, diagnosticArgs: [string, string], changes: FileTextChanges[]): CodeFixAction { // TODO: GH#20315 - return createCodeFixActionNoFixId(changes, [descriptionDiagnostic, ...diagnosticArgs] as [DiagnosticMessage, string, string]); + return createCodeFixActionNoFixId("import", changes, [descriptionDiagnostic, ...diagnosticArgs] as [DiagnosticMessage, string, string]); } function convertToImportCodeFixContext(context: CodeFixContext, symbolToken: Node, symbolName: string): ImportCodeFixContext { @@ -240,6 +240,7 @@ namespace ts.codefix { preferences: UserPreferences, ): ReadonlyArray { const { baseUrl, paths, rootDirs } = compilerOptions; + const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions); const addJsExtension = usesJsExtensionOnImports(sourceFile); const choicesForEachExportingModule = flatMap(moduleSymbols, ({ moduleSymbol, importKind }) => { const modulePathsGroups = getAllModulePaths(program, moduleSymbol.valueDeclaration.getSourceFile()).map(moduleFileName => { @@ -252,7 +253,7 @@ namespace ts.codefix { return [global]; } - const relativePath = removeExtensionAndIndexPostFix(getRelativePath(moduleFileName, sourceDirectory, getCanonicalFileName), compilerOptions, addJsExtension); + const relativePath = removeExtensionAndIndexPostFix(getRelativePath(moduleFileName, sourceDirectory, getCanonicalFileName), moduleResolutionKind, addJsExtension); if (!baseUrl || preferences.importModuleSpecifierPreference === "relative") { return [relativePath]; } @@ -262,7 +263,7 @@ namespace ts.codefix { return [relativePath]; } - const importRelativeToBaseUrl = removeExtensionAndIndexPostFix(relativeToBaseUrl, compilerOptions, addJsExtension); + const importRelativeToBaseUrl = removeExtensionAndIndexPostFix(relativeToBaseUrl, moduleResolutionKind, addJsExtension); if (paths) { const fromPaths = tryGetModuleNameFromPaths(removeFileExtension(relativeToBaseUrl), importRelativeToBaseUrl, paths); if (fromPaths) { @@ -390,7 +391,8 @@ namespace ts.codefix { return firstDefined(roots, unNormalizedTypeRoot => { const typeRoot = toPath(unNormalizedTypeRoot, /*basePath*/ undefined, getCanonicalFileName); if (startsWith(moduleFileName, typeRoot)) { - return removeExtensionAndIndexPostFix(moduleFileName.substring(typeRoot.length + 1), options, addJsExtension); + // For a type definition, we can strip `/index` even with classic resolution. + return removeExtensionAndIndexPostFix(moduleFileName.substring(typeRoot.length + 1), ModuleResolutionKind.NodeJs, addJsExtension); } }); } @@ -527,11 +529,11 @@ namespace ts.codefix { }); } - function removeExtensionAndIndexPostFix(fileName: string, options: CompilerOptions, addJsExtension: boolean): string { + function removeExtensionAndIndexPostFix(fileName: string, moduleResolutionKind: ModuleResolutionKind, addJsExtension: boolean): string { const noExtension = removeFileExtension(fileName); return addJsExtension ? noExtension + ".js" - : getEmitModuleResolutionKind(options) === ModuleResolutionKind.NodeJs + : moduleResolutionKind === ModuleResolutionKind.NodeJs ? removeSuffix(noExtension, "/index") : noExtension; } diff --git a/src/services/codefixes/inferFromUsage.ts b/src/services/codefixes/inferFromUsage.ts index 99556fc84de..8b36d3e5d51 100644 --- a/src/services/codefixes/inferFromUsage.ts +++ b/src/services/codefixes/inferFromUsage.ts @@ -34,7 +34,7 @@ namespace ts.codefix { let declaration!: Declaration; const changes = textChanges.ChangeTracker.with(context, changes => { declaration = doChange(changes, sourceFile, token, errorCode, program, cancellationToken); }); return changes.length === 0 ? undefined - : [createCodeFixAction(changes, [getDiagnostic(errorCode, token), getNameOfDeclaration(declaration).getText(sourceFile)], fixId, Diagnostics.Infer_all_types_from_usage)]; + : [createCodeFixAction(fixId, changes, [getDiagnostic(errorCode, token), getNameOfDeclaration(declaration).getText(sourceFile)], fixId, Diagnostics.Infer_all_types_from_usage)]; }, fixIds: [fixId], getAllCodeActions(context) { diff --git a/src/services/codefixes/useDefaultImport.ts b/src/services/codefixes/useDefaultImport.ts index 7a6a0acfc30..632cfc97e00 100644 --- a/src/services/codefixes/useDefaultImport.ts +++ b/src/services/codefixes/useDefaultImport.ts @@ -9,7 +9,7 @@ namespace ts.codefix { const info = getInfo(sourceFile, start); if (!info) return undefined; const changes = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, info)); - return [createCodeFixAction(changes, Diagnostics.Convert_to_default_import, fixId, Diagnostics.Convert_all_to_default_imports)]; + return [createCodeFixAction(fixId, changes, Diagnostics.Convert_to_default_import, fixId, Diagnostics.Convert_all_to_default_imports)]; }, fixIds: [fixId], getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => { diff --git a/src/services/completions.ts b/src/services/completions.ts index c01150c8552..3100e4a13a9 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -842,7 +842,7 @@ namespace ts.Completions { // Check if the caret is at the end of an identifier; this is a partial identifier that we want to complete: e.g. a.toS| // Skip this partial identifier and adjust the contextToken to the token that precedes it. - if (contextToken && position <= contextToken.end && isWord(contextToken.kind)) { + if (contextToken && position <= contextToken.end && (isIdentifier(contextToken) || isKeyword(contextToken.kind))) { const start = timestamp(); contextToken = findPrecedingToken(contextToken.getFullStart(), sourceFile, /*startNode*/ undefined, insideJsDocTagTypeExpression); log("getCompletionData: Get previous token 2: " + (timestamp() - start)); @@ -1553,32 +1553,22 @@ namespace ts.Completions { * @returns true if 'symbols' was successfully populated; false otherwise. */ function tryGetImportOrExportClauseCompletionSymbols(): GlobalsSearch { - const namedImportsOrExports = tryGetNamedImportsOrExportsForCompletion(contextToken); - if (!namedImportsOrExports) return undefined; + // `import { |` or `import { a as 0, | }` + const namedImportsOrExports = contextToken && (contextToken.kind === SyntaxKind.OpenBraceToken || contextToken.kind === SyntaxKind.CommaToken) + ? tryCast(contextToken.parent, isNamedImportsOrExports) : undefined; + if (!namedImportsOrExports) return GlobalsSearch.Continue; // cursor is in an import clause // try to show exported member for imported module - const declarationKind = namedImportsOrExports.kind === SyntaxKind.NamedImports ? - SyntaxKind.ImportDeclaration : - SyntaxKind.ExportDeclaration; - const importOrExportDeclaration = getAncestor(namedImportsOrExports, declarationKind); - const moduleSpecifier = importOrExportDeclaration.moduleSpecifier; - - if (!moduleSpecifier) { - return GlobalsSearch.Fail; - } + const { moduleSpecifier } = namedImportsOrExports.kind === SyntaxKind.NamedImports ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; + const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier); + if (!moduleSpecifierSymbol) return GlobalsSearch.Fail; completionKind = CompletionKind.MemberLike; isNewIdentifierLocation = false; - - const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier); - if (!moduleSpecifierSymbol) { - symbols = emptyArray; - return GlobalsSearch.Fail; - } - const exports = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol); - symbols = filterNamedImportOrExportCompletionItems(exports, namedImportsOrExports.elements); + const existing = arrayToSet(namedImportsOrExports.elements, n => isCurrentlyEditingNode(n) ? undefined : (n.propertyName || n.name).escapedText); + symbols = exports.filter(e => e.escapedName !== InternalSymbolName.Default && !existing.get(e.escapedName)); return GlobalsSearch.Success; } @@ -1646,26 +1636,6 @@ namespace ts.Completions { return undefined; } - /** - * Returns the containing list of named imports or exports of a context token, - * on the condition that one exists and that the context implies completion should be given. - */ - function tryGetNamedImportsOrExportsForCompletion(contextToken: Node): NamedImportsOrExports { - if (contextToken) { - switch (contextToken.kind) { - case SyntaxKind.OpenBraceToken: // import { | - case SyntaxKind.CommaToken: // import { a as 0, | - switch (contextToken.parent.kind) { - case SyntaxKind.NamedImports: - case SyntaxKind.NamedExports: - return contextToken.parent; - } - } - } - - return undefined; - } - function isConstructorParameterCompletion(node: Node): boolean { return !!node.parent && isParameter(node.parent) && isConstructorDeclaration(node.parent.parent) && (isParameterPropertyModifier(node.kind) || isDeclarationName(node)); @@ -1909,31 +1879,6 @@ namespace ts.Completions { return false; } - /** - * Filters out completion suggestions for named imports or exports. - * - * @param exportsOfModule The list of symbols which a module exposes. - * @param namedImportsOrExports The list of existing import/export specifiers in the import/export clause. - * - * @returns Symbols to be suggested at an import/export clause, barring those whose named imports/exports - * do not occur at the current position and have not otherwise been typed. - */ - function filterNamedImportOrExportCompletionItems(exportsOfModule: Symbol[], namedImportsOrExports: ReadonlyArray): Symbol[] { - const existingImportsOrExports = createUnderscoreEscapedMap(); - - for (const element of namedImportsOrExports) { - // If this is the current item we are editing right now, do not filter it out - if (isCurrentlyEditingNode(element)) { - continue; - } - - const name = element.propertyName || element.name; - existingImportsOrExports.set(name.escapedText, true); - } - - return exportsOfModule.filter(e => e.escapedName !== InternalSymbolName.Default && !existingImportsOrExports.get(e.escapedName)); - } - /** * Filters out completion suggestions for named imports or exports. * diff --git a/src/services/documentHighlights.ts b/src/services/documentHighlights.ts index b89c722a275..69c75548fe5 100644 --- a/src/services/documentHighlights.ts +++ b/src/services/documentHighlights.ts @@ -1,7 +1,7 @@ /* @internal */ namespace ts.DocumentHighlights { export function getDocumentHighlights(program: Program, cancellationToken: CancellationToken, sourceFile: SourceFile, position: number, sourceFilesToSearch: ReadonlyArray): DocumentHighlights[] | undefined { - const node = getTouchingWord(sourceFile, position, /*includeJsDocComment*/ true); + const node = getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true); if (node.parent && (isJsxOpeningElement(node.parent) && node.parent.tagName === node || isJsxClosingElement(node.parent))) { // For a JSX element, just highlight the matching tag, not all references. diff --git a/src/services/findAllReferences.ts b/src/services/findAllReferences.ts index 72f59c36783..5b4689cc476 100644 --- a/src/services/findAllReferences.ts +++ b/src/services/findAllReferences.ts @@ -706,10 +706,18 @@ namespace ts.FindAllReferences.Core { if (!symbol) return true; // Be lenient with invalid code. return getPossibleSymbolReferencePositions(sourceFile, symbol.name).some(position => { const token = tryCast(getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true), isIdentifier); - return token && token !== definition && token.escapedText === definition.escapedText && checker.getSymbolAtLocation(token) === symbol; + if (!token || token === definition || token.escapedText !== definition.escapedText) return false; + const referenceSymbol = checker.getSymbolAtLocation(token); + return referenceSymbol === symbol + || checker.getShorthandAssignmentValueSymbol(token.parent) === symbol + || isExportSpecifier(token.parent) && getLocalSymbolForExportSpecifier(token, referenceSymbol, token.parent, checker) === symbol; }); } + function getPossibleSymbolReferenceNodes(sourceFile: SourceFile, symbolName: string, container: Node = sourceFile): ReadonlyArray { + return getPossibleSymbolReferencePositions(sourceFile, symbolName, container).map(pos => getTouchingPropertyName(sourceFile, pos, /*includeJsDocComment*/ true)); + } + function getPossibleSymbolReferencePositions(sourceFile: SourceFile, symbolName: string, container: Node = sourceFile): ReadonlyArray { const positions: number[] = []; @@ -748,11 +756,9 @@ namespace ts.FindAllReferences.Core { function getLabelReferencesInNode(container: Node, targetLabel: Identifier): SymbolAndEntries[] { const sourceFile = container.getSourceFile(); const labelName = targetLabel.text; - const references = mapDefined(getPossibleSymbolReferencePositions(sourceFile, labelName, container), position => { - const node = getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false); + const references = mapDefined(getPossibleSymbolReferenceNodes(sourceFile, labelName, container), node => // Only pick labels that are either the target label, or have a target that is the target label - return node && (node === targetLabel || (isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel)) ? nodeEntry(node) : undefined; - }); + node === targetLabel || (isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel) ? nodeEntry(node) : undefined); return [{ definition: { type: "label", node: targetLabel }, references }]; } @@ -782,10 +788,8 @@ namespace ts.FindAllReferences.Core { function getAllReferencesForKeyword(sourceFiles: ReadonlyArray, keywordKind: SyntaxKind, cancellationToken: CancellationToken): SymbolAndEntries[] { const references = flatMap(sourceFiles, sourceFile => { cancellationToken.throwIfCancellationRequested(); - return mapDefined(getPossibleSymbolReferencePositions(sourceFile, tokenToString(keywordKind), sourceFile), position => { - const referenceLocation = getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true); - return referenceLocation.kind === keywordKind ? nodeEntry(referenceLocation) : undefined; - }); + return mapDefined(getPossibleSymbolReferenceNodes(sourceFile, tokenToString(keywordKind), sourceFile), referenceLocation => + referenceLocation.kind === keywordKind ? nodeEntry(referenceLocation) : undefined); }); return references.length ? [{ definition: { type: "keyword", node: references[0].node }, references }] : undefined; } @@ -1249,9 +1253,8 @@ namespace ts.FindAllReferences.Core { } const sourceFile = searchSpaceNode.getSourceFile(); - const references = mapDefined(getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode), position => { - const node = getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false); - if (!node || node.kind !== SyntaxKind.SuperKeyword) { + const references = mapDefined(getPossibleSymbolReferenceNodes(sourceFile, "super", searchSpaceNode), node => { + if (node.kind !== SyntaxKind.SuperKeyword) { return; } @@ -1301,12 +1304,30 @@ namespace ts.FindAllReferences.Core { return undefined; } - const references: Entry[] = []; - for (const sourceFile of searchSpaceNode.kind === SyntaxKind.SourceFile ? sourceFiles : [searchSpaceNode.getSourceFile()]) { + const references = flatMap(searchSpaceNode.kind === SyntaxKind.SourceFile ? sourceFiles : [searchSpaceNode.getSourceFile()], sourceFile => { cancellationToken.throwIfCancellationRequested(); - const positions = getPossibleSymbolReferencePositions(sourceFile, "this", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode); - getThisReferencesInFile(sourceFile, searchSpaceNode.kind === SyntaxKind.SourceFile ? sourceFile : searchSpaceNode, positions, staticFlag, references); - } + return getPossibleSymbolReferenceNodes(sourceFile, "this", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode).filter(node => { + if (!isThis(node)) { + return false; + } + const container = getThisContainer(node, /* includeArrowFunctions */ false); + switch (searchSpaceNode.kind) { + case SyntaxKind.FunctionExpression: + case SyntaxKind.FunctionDeclaration: + return searchSpaceNode.symbol === container.symbol; + case SyntaxKind.MethodDeclaration: + case SyntaxKind.MethodSignature: + return isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol; + case SyntaxKind.ClassExpression: + case SyntaxKind.ClassDeclaration: + // Make sure the container belongs to the same class + // and has the appropriate static modifier from the original container. + return container.parent && searchSpaceNode.symbol === container.parent.symbol && (getModifierFlags(container) & ModifierFlags.Static) === staticFlag; + case SyntaxKind.SourceFile: + return container.kind === SyntaxKind.SourceFile && !isExternalModule(container); + } + }); + }).map(n => nodeEntry(n)); return [{ definition: { type: "this", node: thisOrSuperKeyword }, @@ -1314,52 +1335,11 @@ namespace ts.FindAllReferences.Core { }]; } - function getThisReferencesInFile(sourceFile: SourceFile, searchSpaceNode: Node, possiblePositions: ReadonlyArray, staticFlag: ModifierFlags, result: Push): void { - forEach(possiblePositions, position => { - const node = getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false); - if (!node || !isThis(node)) { - return; - } - - const container = getThisContainer(node, /* includeArrowFunctions */ false); - - switch (searchSpaceNode.kind) { - case SyntaxKind.FunctionExpression: - case SyntaxKind.FunctionDeclaration: - if (searchSpaceNode.symbol === container.symbol) { - result.push(nodeEntry(node)); - } - break; - case SyntaxKind.MethodDeclaration: - case SyntaxKind.MethodSignature: - if (isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) { - result.push(nodeEntry(node)); - } - break; - case SyntaxKind.ClassExpression: - case SyntaxKind.ClassDeclaration: - // Make sure the container belongs to the same class - // and has the appropriate static modifier from the original container. - if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (getModifierFlags(container) & ModifierFlags.Static) === staticFlag) { - result.push(nodeEntry(node)); - } - break; - case SyntaxKind.SourceFile: - if (container.kind === SyntaxKind.SourceFile && !isExternalModule(container)) { - result.push(nodeEntry(node)); - } - break; - } - }); - } - function getReferencesForStringLiteral(node: StringLiteral, sourceFiles: ReadonlyArray, cancellationToken: CancellationToken): SymbolAndEntries[] { const references = flatMap(sourceFiles, sourceFile => { cancellationToken.throwIfCancellationRequested(); - return mapDefined(getPossibleSymbolReferencePositions(sourceFile, node.text), position => { - const ref = tryCast(getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false), isStringLiteral); - return ref && ref.text === node.text ? nodeEntry(ref, /*isInString*/ true) : undefined; - }); + return mapDefined(getPossibleSymbolReferenceNodes(sourceFile, node.text), ref => + isStringLiteral(ref) && ref.text === node.text ? nodeEntry(ref, /*isInString*/ true) : undefined); }); return [{ diff --git a/src/services/organizeImports.ts b/src/services/organizeImports.ts index 52f9a50366f..5109b050b6b 100644 --- a/src/services/organizeImports.ts +++ b/src/services/organizeImports.ts @@ -131,9 +131,7 @@ namespace ts.OrganizeImports { } function getExternalModuleName(specifier: Expression) { - return isStringLiteral(specifier) || isNoSubstitutionTemplateLiteral(specifier) - ? specifier.text - : undefined; + return isStringLiteralLike(specifier) ? specifier.text : undefined; } /* @internal */ // Internal for testing diff --git a/src/services/refactors/generateGetAccessorAndSetAccessor.ts b/src/services/refactors/generateGetAccessorAndSetAccessor.ts index cf924486cb3..2f1f5279680 100644 --- a/src/services/refactors/generateGetAccessorAndSetAccessor.ts +++ b/src/services/refactors/generateGetAccessorAndSetAccessor.ts @@ -47,8 +47,10 @@ namespace ts.refactor.generateGetAccessorAndSetAccessor { const { isStatic, fieldName, accessorName, type, container, declaration } = fieldInfo; const isInClassLike = isClassLike(container); - const accessorModifiers = getAccessorModifiers(isJS, declaration, isStatic, isInClassLike); - const fieldModifiers = getFieldModifiers(isJS, isStatic, isInClassLike); + const accessorModifiers = isInClassLike + ? !declaration.modifiers || getModifierFlags(declaration) & ModifierFlags.Private ? getModifiers(isJS, isStatic, SyntaxKind.PublicKeyword) : declaration.modifiers + : undefined; + const fieldModifiers = isInClassLike ? getModifiers(isJS, isStatic, SyntaxKind.PrivateKeyword) : undefined; updateFieldDeclaration(changeTracker, file, declaration, fieldName, fieldModifiers, container); @@ -82,24 +84,9 @@ namespace ts.refactor.generateGetAccessorAndSetAccessor { return isIdentifier(fieldName) ? createPropertyAccess(leftHead, fieldName) : createElementAccess(leftHead, createLiteral(fieldName)); } - function getAccessorModifiers(isJS: boolean, declaration: AcceptedDeclaration, isStatic: boolean, isClassLike: boolean): NodeArray | undefined { - if (!isClassLike) return undefined; - - if (!declaration.modifiers || getModifierFlags(declaration) & ModifierFlags.Private) { - const modifiers = append( - !isJS ? [createToken(SyntaxKind.PublicKeyword)] : undefined, - isStatic ? createToken(SyntaxKind.StaticKeyword) : undefined - ); - return modifiers && createNodeArray(modifiers); - } - return declaration.modifiers; - } - - function getFieldModifiers(isJS: boolean, isStatic: boolean, isClassLike: boolean): NodeArray | undefined { - if (!isClassLike) return undefined; - + function getModifiers(isJS: boolean, isStatic: boolean, accessModifier: SyntaxKind.PublicKeyword | SyntaxKind.PrivateKeyword): NodeArray { const modifiers = append( - !isJS ? [createToken(SyntaxKind.PrivateKeyword)] : undefined, + !isJS ? [createToken(accessModifier) as Token | Token] : undefined, isStatic ? createToken(SyntaxKind.StaticKeyword) : undefined ); return modifiers && createNodeArray(modifiers); diff --git a/src/services/rename.ts b/src/services/rename.ts index c40f7908776..2f9de0c0cad 100644 --- a/src/services/rename.ts +++ b/src/services/rename.ts @@ -2,7 +2,7 @@ namespace ts.Rename { export function getRenameInfo(typeChecker: TypeChecker, defaultLibFileName: string, getCanonicalFileName: GetCanonicalFileName, sourceFile: SourceFile, position: number): RenameInfo { const getCanonicalDefaultLibName = memoize(() => getCanonicalFileName(normalizePath(defaultLibFileName))); - const node = getTouchingWord(sourceFile, position, /*includeJsDocComment*/ true); + const node = getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true); const renameInfo = node && nodeIsEligibleForRename(node) ? getRenameInfoForNode(node, typeChecker, sourceFile, isDefinedInLibraryFile) : undefined; diff --git a/src/services/types.ts b/src/services/types.ts index c5b58bab04d..01b8b5ad4d4 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -446,6 +446,8 @@ namespace ts { } export interface CodeFixAction extends CodeAction { + /** Short name to identify the fix, for use by telemetry. */ + fixName: string; /** * If present, one may call 'getCombinedCodeFix' with this fixId. * This may be omitted to indicate that the code fix can't be applied in a group. diff --git a/src/services/utilities.ts b/src/services/utilities.ts index abb48700321..63170678202 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -627,18 +627,12 @@ namespace ts { return syntaxList; } - /* Gets the token whose text has range [start, end) and - * position >= start and (position < end or (position === end && token is keyword or identifier)) - */ - export function getTouchingWord(sourceFile: SourceFile, position: number, includeJsDocComment: boolean): Node { - return getTouchingToken(sourceFile, position, includeJsDocComment, n => isWord(n.kind)); - } - - /* Gets the token whose text has range [start, end) and position >= start - * and (position < end or (position === end && token is keyword or identifier or numeric/string literal)) + /** + * Gets the token whose text has range [start, end) and + * position >= start and (position < end or (position === end && token is literal or keyword or identifier)) */ export function getTouchingPropertyName(sourceFile: SourceFile, position: number, includeJsDocComment: boolean): Node { - return getTouchingToken(sourceFile, position, includeJsDocComment, n => isPropertyName(n.kind)); + return getTouchingToken(sourceFile, position, includeJsDocComment, n => isPropertyNameLiteral(n) || isKeyword(n.kind)); } /** @@ -1059,14 +1053,6 @@ namespace ts { return undefined; } - export function isWord(kind: SyntaxKind): boolean { - return kind === SyntaxKind.Identifier || isKeyword(kind); - } - - function isPropertyName(kind: SyntaxKind): boolean { - return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral || isWord(kind); - } - export function isComment(kind: SyntaxKind): boolean { return kind === SyntaxKind.SingleLineCommentTrivia || kind === SyntaxKind.MultiLineCommentTrivia; } @@ -1459,11 +1445,13 @@ namespace ts { * WARNING: This is an expensive operation and is only intended to be used in refactorings * and code fixes (because those are triggered by explicit user actions). */ - export function getSynthesizedDeepClone(node: T | undefined): T | undefined { - if (node === undefined) { - return undefined; - } + export function getSynthesizedDeepClone(node: T | undefined, includeTrivia = true): T | undefined { + const clone = node && getSynthesizedDeepCloneWorker(node); + if (clone && !includeTrivia) suppressLeadingAndTrailingTrivia(clone); + return clone; + } + function getSynthesizedDeepCloneWorker(node: T): T | undefined { const visited = visitEachChild(node, getSynthesizedDeepClone, nullTransformationContext); if (visited === node) { // This only happens for leaf nodes - internal nodes always see their children change. @@ -1474,22 +1462,18 @@ namespace ts { else if (isNumericLiteral(clone)) { clone.numericLiteralFlags = (node as any).numericLiteralFlags; } - clone.pos = node.pos; - clone.end = node.end; - return clone; + return setTextRange(clone, node); } // PERF: As an optimization, rather than calling getSynthesizedClone, we'll update // the new node created by visitEachChild with the extra changes getSynthesizedClone // would have made. - visited.parent = undefined; - return visited; } - export function getSynthesizedDeepClones(nodes: NodeArray | undefined): NodeArray | undefined { - return nodes && createNodeArray(nodes.map(getSynthesizedDeepClone), nodes.hasTrailingComma); + export function getSynthesizedDeepClones(nodes: NodeArray | undefined, includeTrivia = true): NodeArray | undefined { + return nodes && createNodeArray(nodes.map(n => getSynthesizedDeepClone(n, includeTrivia)), nodes.hasTrailingComma); } /** diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 2fbac7e9f3b..378949d5b5b 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -4526,6 +4526,8 @@ declare namespace ts { commands?: CodeActionCommand[]; } interface CodeFixAction extends CodeAction { + /** Short name to identify the fix, for use by telemetry. */ + fixName: string; /** * If present, one may call 'getCombinedCodeFix' with this fixId. * This may be omitted to indicate that the code fix can't be applied in a group. diff --git a/tests/baselines/reference/organizeImports/Unused_false_positive_export_shorthand.ts b/tests/baselines/reference/organizeImports/Unused_false_positive_export_shorthand.ts new file mode 100644 index 00000000000..5cf0cbcae24 --- /dev/null +++ b/tests/baselines/reference/organizeImports/Unused_false_positive_export_shorthand.ts @@ -0,0 +1,9 @@ +// ==ORIGINAL== + +import { x } from "a"; +export { x }; + +// ==ORGANIZED== + +import { x } from "a"; +export { x }; diff --git a/tests/baselines/reference/organizeImports/Unused_false_positive_shorthand_assignment.ts b/tests/baselines/reference/organizeImports/Unused_false_positive_shorthand_assignment.ts new file mode 100644 index 00000000000..578b3dfc5e7 --- /dev/null +++ b/tests/baselines/reference/organizeImports/Unused_false_positive_shorthand_assignment.ts @@ -0,0 +1,9 @@ +// ==ORIGINAL== + +import { x } from "a"; +const o = { x }; + +// ==ORGANIZED== + +import { x } from "a"; +const o = { x }; diff --git a/tests/baselines/reference/user/bcryptjs.log b/tests/baselines/reference/user/bcryptjs.log index 21952052b6a..1289e0a392d 100644 --- a/tests/baselines/reference/user/bcryptjs.log +++ b/tests/baselines/reference/user/bcryptjs.log @@ -1,62 +1,10 @@ Exit Code: 1 Standard output: -../../../../node_modules/@types/node/index.d.ts(138,13): error TS2300: Duplicate identifier 'require'. -../../../../node_modules/@types/node/index.d.ts(150,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'module' must be of type 'Module', but here has type 'NodeModule'. -../../../../node_modules/@types/node/index.d.ts(174,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'Buffer' must be of type 'typeof Buffer', but here has type '{ new (str: string, encoding?: string | undefined): Buffer; new (size: number): Buffer; new (arra...'. -node_modules/bcryptjs/dist/bcrypt.js(37,16): error TS2345: Argument of type 'never[]' is not assignable to parameter of type 'string'. -node_modules/bcryptjs/dist/bcrypt.js(134,18): error TS2366: Function lacks ending return statement and return type does not include 'undefined'. -node_modules/bcryptjs/dist/bcrypt.js(190,9): error TS2322: Type 'string | undefined' is not assignable to type 'string'. - Type 'undefined' is not assignable to type 'string'. -node_modules/bcryptjs/dist/bcrypt.js(200,18): error TS2366: Function lacks ending return statement and return type does not include 'undefined'. -node_modules/bcryptjs/dist/bcrypt.js(278,18): error TS2366: Function lacks ending return statement and return type does not include 'undefined'. -node_modules/bcryptjs/dist/bcrypt.js(563,42): error TS2531: Object is possibly 'null'. -node_modules/bcryptjs/dist/bcrypt.js(566,44): error TS2531: Object is possibly 'null'. -node_modules/bcryptjs/dist/bcrypt.js(566,59): error TS2533: Object is possibly 'null' or 'undefined'. -node_modules/bcryptjs/dist/bcrypt.js(569,44): error TS2531: Object is possibly 'null'. -node_modules/bcryptjs/dist/bcrypt.js(569,61): error TS2533: Object is possibly 'null' or 'undefined'. -node_modules/bcryptjs/dist/bcrypt.js(569,76): error TS2533: Object is possibly 'null' or 'undefined'. -node_modules/bcryptjs/dist/bcrypt.js(1203,26): error TS2345: Argument of type 'Int32Array | number[]' is not assignable to parameter of type 'number[]'. - Type 'Int32Array' is not assignable to type 'number[]'. - Property 'flatMap' is missing in type 'Int32Array'. -node_modules/bcryptjs/dist/bcrypt.js(1233,30): error TS2345: Argument of type 'null' is not assignable to parameter of type 'Error'. -node_modules/bcryptjs/dist/bcrypt.js(1345,27): error TS2345: Argument of type 'number[] | undefined' is not assignable to parameter of type 'number[]'. - Type 'undefined' is not assignable to type 'number[]'. -node_modules/bcryptjs/dist/bcrypt.js(1351,35): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. -node_modules/bcryptjs/dist/bcrypt.js(1353,30): error TS2345: Argument of type 'null' is not assignable to parameter of type 'Error'. -node_modules/bcryptjs/dist/bcrypt.js(1353,43): error TS2345: Argument of type 'number[] | undefined' is not assignable to parameter of type 'number[]'. - Type 'undefined' is not assignable to type 'number[]'. -node_modules/bcryptjs/externs/bcrypt.js(36,14): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -node_modules/bcryptjs/externs/bcrypt.js(50,14): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -node_modules/bcryptjs/externs/bcrypt.js(65,14): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -node_modules/bcryptjs/externs/bcrypt.js(80,14): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -node_modules/bcryptjs/externs/bcrypt.js(87,14): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -node_modules/bcryptjs/externs/minimal-env.js(10,10): error TS2300: Duplicate identifier 'require'. -node_modules/bcryptjs/externs/minimal-env.js(48,1): error TS8022: JSDoc '@extends' is not attached to a class. -node_modules/bcryptjs/externs/minimal-env.js(63,14): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -node_modules/bcryptjs/externs/minimal-env.js(65,8): error TS2339: Property 'randomBytes' does not exist on type 'Crypto'. -node_modules/bcryptjs/externs/minimal-env.js(70,8): error TS2540: Cannot assign to 'crypto' because it is a constant or a read-only property. -node_modules/bcryptjs/externs/minimal-env.js(75,1): error TS2322: Type '(array: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array) => void' is not assignable to type '(array: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8Clamp...'. - Type 'void' is not assignable to type 'Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray ...'. -node_modules/bcryptjs/externs/minimal-env.js(90,14): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -node_modules/bcryptjs/externs/minimal-env.js(96,14): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -node_modules/bcryptjs/scripts/build.js(5,20): error TS2339: Property 'join' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(6,19): error TS2339: Property 'join' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(7,20): error TS2339: Property 'join' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(8,24): error TS2339: Property 'join' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(12,18): error TS2339: Property 'version' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(18,4): error TS2339: Property 'writeFileSync' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(19,10): error TS2339: Property 'join' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(20,16): error TS2339: Property 'transform' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(20,29): error TS2339: Property 'readFileSync' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(20,58): error TS2339: Property 'join' does not exist on type 'void'. +node_modules/bcryptjs/scripts/build.js(1,26): error TS2307: Cannot find module 'metascript'. node_modules/bcryptjs/scripts/build.js(32,1): error TS2322: Type '{ VERSION: any; }' is not assignable to type '{ [x: string]: any; VERSION: any; ISAAC: boolean; }'. Property 'ISAAC' is missing in type '{ VERSION: any; }'. -node_modules/bcryptjs/scripts/build.js(32,24): error TS2339: Property 'version' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(34,4): error TS2339: Property 'writeFileSync' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(35,10): error TS2339: Property 'join' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(36,16): error TS2339: Property 'transform' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(36,29): error TS2339: Property 'readFileSync' does not exist on type 'void'. -node_modules/bcryptjs/scripts/build.js(36,58): error TS2339: Property 'join' does not exist on type 'void'. +node_modules/bcryptjs/src/bcrypt.js(25,13): error TS2322: Type 'Buffer' is not assignable to type 'number[]'. + Property 'flatMap' is missing in type 'Buffer'. node_modules/bcryptjs/src/bcrypt.js(94,14): error TS2366: Function lacks ending return statement and return type does not include 'undefined'. node_modules/bcryptjs/src/bcrypt.js(150,5): error TS2322: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. @@ -64,6 +12,7 @@ node_modules/bcryptjs/src/bcrypt.js(160,14): error TS2366: Function lacks ending node_modules/bcryptjs/src/bcrypt.js(238,14): error TS2366: Function lacks ending return statement and return type does not include 'undefined'. node_modules/bcryptjs/src/bcrypt/impl.js(516,22): error TS2345: Argument of type 'Int32Array | number[]' is not assignable to parameter of type 'number[]'. Type 'Int32Array' is not assignable to type 'number[]'. + Property 'flatMap' is missing in type 'Int32Array'. node_modules/bcryptjs/src/bcrypt/impl.js(546,26): error TS2345: Argument of type 'null' is not assignable to parameter of type 'Error'. node_modules/bcryptjs/src/bcrypt/impl.js(658,23): error TS2345: Argument of type 'number[] | undefined' is not assignable to parameter of type 'number[]'. Type 'undefined' is not assignable to type 'number[]'. @@ -78,63 +27,11 @@ node_modules/bcryptjs/src/bcrypt/prng/accum.js(65,74): error TS2339: Property 'd node_modules/bcryptjs/src/bcrypt/prng/accum.js(66,22): error TS2339: Property 'detachEvent' does not exist on type 'Document'. node_modules/bcryptjs/src/bcrypt/prng/accum.js(67,22): error TS2339: Property 'detachEvent' does not exist on type 'Document'. node_modules/bcryptjs/src/bcrypt/util.js(20,5): error TS2304: Cannot find name 'utfx'. -node_modules/bcryptjs/src/wrap.js(38,16): error TS2345: Argument of type 'never[]' is not assignable to parameter of type 'string'. -node_modules/bcryptjs/tests/suite.js(4,27): error TS2339: Property 'join' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(15,26): error TS2339: Property 'encodeBase64' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(21,28): error TS2339: Property 'decodeBase64' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(27,27): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(35,16): error TS2339: Property 'genSalt' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(45,20): error TS2339: Property 'hashSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(47,30): error TS2339: Property 'hashSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(47,60): error TS2339: Property 'hashSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(52,16): error TS2339: Property 'hash' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(60,28): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(61,28): error TS2339: Property 'hashSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(62,28): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(63,28): error TS2339: Property 'hashSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(64,28): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(65,28): error TS2339: Property 'hashSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(68,24): error TS2339: Property 'compareSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(69,27): error TS2339: Property 'compareSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(70,27): error TS2339: Property 'compareSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(73,24): error TS2339: Property 'compareSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(74,27): error TS2339: Property 'compareSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(75,27): error TS2339: Property 'compareSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(78,24): error TS2339: Property 'compareSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(79,27): error TS2339: Property 'compareSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(80,27): error TS2339: Property 'compareSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(86,28): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(87,28): error TS2339: Property 'hashSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(88,28): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(90,28): error TS2339: Property 'hashSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(91,16): error TS2339: Property 'compare' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(94,20): error TS2339: Property 'compare' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(97,24): error TS2339: Property 'compare' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(100,28): error TS2339: Property 'compare' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(111,28): error TS2339: Property 'hashSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(111,53): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(112,27): error TS2339: Property 'getSalt' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(113,28): error TS2339: Property 'hashSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(119,28): error TS2339: Property 'hashSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(119,53): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(120,27): error TS2339: Property 'getRounds' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(125,16): error TS2339: Property 'genSalt' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(128,20): error TS2339: Property 'hash' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(142,16): error TS2339: Property 'genSalt' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(144,20): error TS2339: Property 'hash' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(147,24): error TS2339: Property 'compare' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(150,28): error TS2339: Property 'genSalt' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(170,27): error TS2339: Property 'readFileSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(170,45): error TS2339: Property 'join' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(171,31): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(172,33): error TS2339: Property 'hashSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(173,32): error TS2339: Property 'hashSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(179,32): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(180,33): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(184,28): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(185,28): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(189,28): error TS2339: Property 'genSaltSync' does not exist on type 'void'. -node_modules/bcryptjs/tests/suite.js(190,28): error TS2339: Property 'genSaltSync' does not exist on type 'void'. +node_modules/bcryptjs/src/wrap.js(37,26): error TS2304: Cannot find name 'define'. +node_modules/bcryptjs/src/wrap.js(37,51): error TS2304: Cannot find name 'define'. +node_modules/bcryptjs/src/wrap.js(38,9): error TS2304: Cannot find name 'define'. +node_modules/bcryptjs/src/wrap.js(49,12): error TS2552: Cannot find name 'bcrypt'. Did you mean 'Crypto'? +node_modules/bcryptjs/tests/suite.js(3,23): error TS2307: Cannot find module 'bcrypt'. diff --git a/tests/baselines/reference/user/bluebird.log b/tests/baselines/reference/user/bluebird.log index 63e05764281..139cf781883 100644 --- a/tests/baselines/reference/user/bluebird.log +++ b/tests/baselines/reference/user/bluebird.log @@ -1,216 +1,5 @@ Exit Code: 1 Standard output: -node_modules/bluebird/js/browser/bluebird.core.js(30,116): error TS2304: Cannot find name 'define'. -node_modules/bluebird/js/browser/bluebird.core.js(30,124): error TS2304: Cannot find name 'define'. -node_modules/bluebird/js/browser/bluebird.core.js(30,135): error TS2304: Cannot find name 'define'. -node_modules/bluebird/js/browser/bluebird.core.js(30,266): error TS2532: Object is possibly 'undefined'. -node_modules/bluebird/js/browser/bluebird.core.js(30,268): error TS2339: Property 'Promise' does not exist on type 'Window | Global'. - Property 'Promise' does not exist on type 'Window'. -node_modules/bluebird/js/browser/bluebird.core.js(30,394): error TS2304: Cannot find name '_dereq_'. -node_modules/bluebird/js/browser/bluebird.core.js(30,415): error TS2304: Cannot find name '_dereq_'. -node_modules/bluebird/js/browser/bluebird.core.js(30,521): error TS2339: Property 'code' does not exist on type 'Error'. -node_modules/bluebird/js/browser/bluebird.core.js(30,694): error TS2304: Cannot find name '_dereq_'. -node_modules/bluebird/js/browser/bluebird.core.js(30,715): error TS2304: Cannot find name '_dereq_'. -node_modules/bluebird/js/browser/bluebird.core.js(122,21): error TS2300: Duplicate identifier 'invokeLater'. -node_modules/bluebird/js/browser/bluebird.core.js(123,21): error TS2300: Duplicate identifier 'invoke'. -node_modules/bluebird/js/browser/bluebird.core.js(124,21): error TS2300: Duplicate identifier 'settlePromises'. -node_modules/bluebird/js/browser/bluebird.core.js(126,21): error TS2300: Duplicate identifier 'invokeLater'. -node_modules/bluebird/js/browser/bluebird.core.js(138,21): error TS2300: Duplicate identifier 'invoke'. -node_modules/bluebird/js/browser/bluebird.core.js(148,21): error TS2300: Duplicate identifier 'settlePromises'. -node_modules/bluebird/js/browser/bluebird.core.js(681,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'event' must be of type 'CustomEvent', but here has type 'Event'. -node_modules/bluebird/js/browser/bluebird.core.js(687,26): error TS2339: Property 'detail' does not exist on type 'Event'. -node_modules/bluebird/js/browser/bluebird.core.js(1068,46): error TS2554: Expected 0 arguments, but got 1. -node_modules/bluebird/js/browser/bluebird.core.js(1242,5): error TS2721: Cannot invoke an object which is possibly 'null'. -node_modules/bluebird/js/browser/bluebird.core.js(1260,30): error TS2339: Property 'stack' does not exist on type 'CapturedTrace'. -node_modules/bluebird/js/browser/bluebird.core.js(1266,37): error TS2339: Property 'stack' does not exist on type 'CapturedTrace'. -node_modules/bluebird/js/browser/bluebird.core.js(1305,38): error TS2339: Property 'stack' does not exist on type 'CapturedTrace'. -node_modules/bluebird/js/browser/bluebird.core.js(1314,25): error TS2554: Expected 0 arguments, but got 1. -node_modules/bluebird/js/browser/bluebird.core.js(1500,49): error TS2350: Only a void function can be called with the 'new' keyword. -node_modules/bluebird/js/browser/bluebird.core.js(2125,24): error TS2339: Property 'PromiseInspection' does not exist on type 'typeof Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2138,32): error TS2322: Type 'null' is not assignable to type 'Domain'. -node_modules/bluebird/js/browser/bluebird.core.js(2241,14): error TS2339: Property '_warn' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2266,14): error TS2551: Property 'isFulfilled' does not exist on type 'Promise'. Did you mean '_setFulfilled'? -node_modules/bluebird/js/browser/bluebird.core.js(2267,37): error TS2339: Property 'value' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2269,21): error TS2551: Property 'isRejected' does not exist on type 'Promise'. Did you mean '_setRejected'? -node_modules/bluebird/js/browser/bluebird.core.js(2270,36): error TS2339: Property 'reason' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2278,14): error TS2339: Property '_warn' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2295,9): error TS2339: Property '_captureStackTrace' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2325,9): error TS2339: Property '_captureStackTrace' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2356,63): error TS2339: Property '_boundTo' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2359,14): error TS2339: Property '_fireEvent' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2371,20): error TS2339: Property '_unsetRejectionIsUnhandled' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2375,20): error TS2339: Property '_attachExtraTrace' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2413,10): error TS2339: Property '_fireEvent' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2418,10): error TS2339: Property '_fireEvent' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2423,10): error TS2339: Property '_fireEvent' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2440,10): error TS2339: Property '_fireEvent' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2457,42): error TS2339: Property '_isBound' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2552,26): error TS2339: Property '_propagateFrom' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2589,14): error TS2339: Property '_warn' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2591,10): error TS2339: Property '_attachExtraTrace' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2598,10): error TS2339: Property '_captureStackTrace' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2599,10): error TS2339: Property '_pushContext' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2601,18): error TS2339: Property '_execute' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2607,10): error TS2339: Property '_popContext' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2748,14): error TS2339: Property '_attachExtraTrace' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2776,14): error TS2339: Property '_ensurePossibleRejectionHandled' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2816,10): error TS2339: Property '_clearCancellationData' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.core.js(2951,18): error TS2339: Property '_resolveEmptyArray' does not exist on type 'PromiseArray'. -node_modules/bluebird/js/browser/bluebird.core.js(2989,30): error TS2554: Expected 0-1 arguments, but got 2. -node_modules/bluebird/js/browser/bluebird.core.js(2991,30): error TS2554: Expected 0 arguments, but got 1. -node_modules/bluebird/js/browser/bluebird.core.js(3165,31): error TS2339: Property 'standalone' does not exist on type 'Navigator'. -node_modules/bluebird/js/browser/bluebird.core.js(3165,52): error TS2339: Property 'cordova' does not exist on type 'Window'. -node_modules/bluebird/js/browser/bluebird.core.js(3599,5): error TS7027: Unreachable code detected. -node_modules/bluebird/js/browser/bluebird.core.js(3761,25): error TS2304: Cannot find name 'chrome'. -node_modules/bluebird/js/browser/bluebird.core.js(3761,51): error TS2304: Cannot find name 'chrome'. -node_modules/bluebird/js/browser/bluebird.core.js(3762,25): error TS2304: Cannot find name 'chrome'. -node_modules/bluebird/js/browser/bluebird.core.js(3781,118): error TS2339: Property 'P' does not exist on type 'Window'. -node_modules/bluebird/js/browser/bluebird.core.js(3781,129): error TS2339: Property 'Promise' does not exist on type 'Window'. -node_modules/bluebird/js/browser/bluebird.core.js(3781,282): error TS2339: Property 'P' does not exist on type 'Window'. -node_modules/bluebird/js/browser/bluebird.core.js(3781,291): error TS2339: Property 'Promise' does not exist on type 'Window'. -node_modules/bluebird/js/browser/bluebird.js(29,116): error TS2304: Cannot find name 'define'. -node_modules/bluebird/js/browser/bluebird.js(29,124): error TS2304: Cannot find name 'define'. -node_modules/bluebird/js/browser/bluebird.js(29,135): error TS2304: Cannot find name 'define'. -node_modules/bluebird/js/browser/bluebird.js(29,266): error TS2532: Object is possibly 'undefined'. -node_modules/bluebird/js/browser/bluebird.js(29,268): error TS2339: Property 'Promise' does not exist on type 'Window | Global'. - Property 'Promise' does not exist on type 'Window'. -node_modules/bluebird/js/browser/bluebird.js(29,394): error TS2304: Cannot find name '_dereq_'. -node_modules/bluebird/js/browser/bluebird.js(29,415): error TS2304: Cannot find name '_dereq_'. -node_modules/bluebird/js/browser/bluebird.js(29,521): error TS2339: Property 'code' does not exist on type 'Error'. -node_modules/bluebird/js/browser/bluebird.js(29,694): error TS2304: Cannot find name '_dereq_'. -node_modules/bluebird/js/browser/bluebird.js(29,715): error TS2304: Cannot find name '_dereq_'. -node_modules/bluebird/js/browser/bluebird.js(144,21): error TS2300: Duplicate identifier 'invokeLater'. -node_modules/bluebird/js/browser/bluebird.js(145,21): error TS2300: Duplicate identifier 'invoke'. -node_modules/bluebird/js/browser/bluebird.js(146,21): error TS2300: Duplicate identifier 'settlePromises'. -node_modules/bluebird/js/browser/bluebird.js(148,21): error TS2300: Duplicate identifier 'invokeLater'. -node_modules/bluebird/js/browser/bluebird.js(160,21): error TS2300: Duplicate identifier 'invoke'. -node_modules/bluebird/js/browser/bluebird.js(170,21): error TS2300: Duplicate identifier 'settlePromises'. -node_modules/bluebird/js/browser/bluebird.js(828,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'event' must be of type 'CustomEvent', but here has type 'Event'. -node_modules/bluebird/js/browser/bluebird.js(834,26): error TS2339: Property 'detail' does not exist on type 'Event'. -node_modules/bluebird/js/browser/bluebird.js(1215,46): error TS2554: Expected 0 arguments, but got 1. -node_modules/bluebird/js/browser/bluebird.js(1389,5): error TS2721: Cannot invoke an object which is possibly 'null'. -node_modules/bluebird/js/browser/bluebird.js(1407,30): error TS2339: Property 'stack' does not exist on type 'CapturedTrace'. -node_modules/bluebird/js/browser/bluebird.js(1413,37): error TS2339: Property 'stack' does not exist on type 'CapturedTrace'. -node_modules/bluebird/js/browser/bluebird.js(1452,38): error TS2339: Property 'stack' does not exist on type 'CapturedTrace'. -node_modules/bluebird/js/browser/bluebird.js(1461,25): error TS2554: Expected 0 arguments, but got 1. -node_modules/bluebird/js/browser/bluebird.js(1679,49): error TS2350: Only a void function can be called with the 'new' keyword. -node_modules/bluebird/js/browser/bluebird.js(2251,5): error TS2554: Expected 0 arguments, but got 1. -node_modules/bluebird/js/browser/bluebird.js(2456,10): error TS2551: Property '_init$' does not exist on type 'MappingPromiseArray'. Did you mean '_init'? -node_modules/bluebird/js/browser/bluebird.js(2462,23): error TS2339: Property '_values' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2463,23): error TS2339: Property 'length' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2473,22): error TS2339: Property '_isResolved' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2483,28): error TS2339: Property '_promise' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2496,18): error TS2339: Property '_reject' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2500,58): error TS2339: Property '_promise' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2513,22): error TS2339: Property '_reject' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2516,22): error TS2339: Property '_cancel' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2522,32): error TS2339: Property '_totalResolved' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2527,18): error TS2339: Property '_resolve' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2537,23): error TS2339: Property '_values' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2539,18): error TS2339: Property '_isResolved' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2553,10): error TS2339: Property '_resolve' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2582,66): error TS2339: Property 'promise' does not exist on type 'MappingPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(2738,19): error TS2339: Property 'cause' does not exist on type 'Error'. -node_modules/bluebird/js/browser/bluebird.js(2773,24): error TS2339: Property 'PromiseInspection' does not exist on type 'typeof Promise'. -node_modules/bluebird/js/browser/bluebird.js(2786,32): error TS2322: Type 'null' is not assignable to type 'Domain'. -node_modules/bluebird/js/browser/bluebird.js(2889,14): error TS2339: Property '_warn' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(2914,14): error TS2551: Property 'isFulfilled' does not exist on type 'Promise'. Did you mean '_setFulfilled'? -node_modules/bluebird/js/browser/bluebird.js(2915,37): error TS2339: Property 'value' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(2917,21): error TS2551: Property 'isRejected' does not exist on type 'Promise'. Did you mean '_setRejected'? -node_modules/bluebird/js/browser/bluebird.js(2918,36): error TS2339: Property 'reason' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(2926,14): error TS2339: Property '_warn' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(2943,9): error TS2339: Property '_captureStackTrace' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(2973,9): error TS2339: Property '_captureStackTrace' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3004,63): error TS2339: Property '_boundTo' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3007,14): error TS2339: Property '_fireEvent' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3019,20): error TS2339: Property '_unsetRejectionIsUnhandled' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3023,20): error TS2339: Property '_attachExtraTrace' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3061,10): error TS2339: Property '_fireEvent' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3066,10): error TS2339: Property '_fireEvent' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3071,10): error TS2339: Property '_fireEvent' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3088,10): error TS2339: Property '_fireEvent' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3105,42): error TS2339: Property '_isBound' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3200,26): error TS2339: Property '_propagateFrom' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3237,14): error TS2339: Property '_warn' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3239,10): error TS2339: Property '_attachExtraTrace' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3246,10): error TS2339: Property '_captureStackTrace' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3247,10): error TS2339: Property '_pushContext' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3249,18): error TS2339: Property '_execute' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3255,10): error TS2339: Property '_popContext' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3396,14): error TS2339: Property '_attachExtraTrace' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3424,14): error TS2339: Property '_ensurePossibleRejectionHandled' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3464,10): error TS2339: Property '_clearCancellationData' does not exist on type 'Promise'. -node_modules/bluebird/js/browser/bluebird.js(3614,18): error TS2339: Property '_resolveEmptyArray' does not exist on type 'PromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(3652,30): error TS2554: Expected 0-1 arguments, but got 2. -node_modules/bluebird/js/browser/bluebird.js(3654,30): error TS2554: Expected 0 arguments, but got 1. -node_modules/bluebird/js/browser/bluebird.js(3799,22): error TS2554: Expected 0-1 arguments, but got 3. -node_modules/bluebird/js/browser/bluebird.js(3823,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'number', but here has type 'any'. -node_modules/bluebird/js/browser/bluebird.js(3979,17): error TS2722: Cannot invoke an object which is possibly 'undefined'. -node_modules/bluebird/js/browser/bluebird.js(3982,24): error TS2722: Cannot invoke an object which is possibly 'undefined'. -node_modules/bluebird/js/browser/bluebird.js(3994,12): error TS2722: Cannot invoke an object which is possibly 'undefined'. -node_modules/bluebird/js/browser/bluebird.js(4111,10): error TS2339: Property '_values' does not exist on type 'PropertiesPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4112,32): error TS2339: Property '_totalResolved' does not exist on type 'PropertiesPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4113,31): error TS2339: Property '_length' does not exist on type 'PropertiesPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4116,37): error TS2339: Property '_values' does not exist on type 'PropertiesPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4119,34): error TS2339: Property 'length' does not exist on type 'PropertiesPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4120,40): error TS2339: Property 'length' does not exist on type 'PropertiesPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4121,26): error TS2339: Property '_values' does not exist on type 'PropertiesPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4121,57): error TS2339: Property '_values' does not exist on type 'PropertiesPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4124,14): error TS2339: Property '_resolve' does not exist on type 'PropertiesPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4148,53): error TS2339: Property 'promise' does not exist on type 'PropertiesPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4336,9): error TS2532: Object is possibly 'undefined'. -node_modules/bluebird/js/browser/bluebird.js(4353,10): error TS2339: Property '_promise' does not exist on type 'ReductionPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4358,52): error TS2339: Property '_cancel' does not exist on type 'ReductionPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4359,14): error TS2339: Property '_isResolved' does not exist on type 'ReductionPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4360,10): error TS2551: Property '_resultCancelled$' does not exist on type 'ReductionPromiseArray'. Did you mean '_resultCancelled'? -node_modules/bluebird/js/browser/bluebird.js(4425,18): error TS2339: Property 'promise' does not exist on type 'ReductionPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4489,31): error TS2339: Property 'standalone' does not exist on type 'Navigator'. -node_modules/bluebird/js/browser/bluebird.js(4489,52): error TS2339: Property 'cordova' does not exist on type 'Window'. -node_modules/bluebird/js/browser/bluebird.js(4542,10): error TS2339: Property '_values' does not exist on type 'SettledPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4543,32): error TS2339: Property '_totalResolved' does not exist on type 'SettledPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4544,31): error TS2339: Property '_length' does not exist on type 'SettledPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4545,14): error TS2339: Property '_resolve' does not exist on type 'SettledPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4545,28): error TS2339: Property '_values' does not exist on type 'SettledPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4566,46): error TS2339: Property 'promise' does not exist on type 'SettledPromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4598,14): error TS2339: Property '_resolve' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4601,10): error TS2551: Property '_init$' does not exist on type 'SomePromiseArray'. Did you mean '_init'? -node_modules/bluebird/js/browser/bluebird.js(4602,40): error TS2339: Property '_values' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4603,15): error TS2339: Property '_isResolved' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4606,14): error TS2551: Property '_reject' does not exist on type 'SomePromiseArray'. Did you mean '_rejected'? -node_modules/bluebird/js/browser/bluebird.js(4606,47): error TS2339: Property 'length' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4630,14): error TS2339: Property '_values' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4632,18): error TS2339: Property '_resolve' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4632,32): error TS2339: Property '_values' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4634,18): error TS2339: Property '_resolve' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4634,32): error TS2339: Property '_values' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4647,14): error TS2339: Property '_values' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4647,49): error TS2339: Property '_values' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4648,21): error TS2339: Property '_cancel' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4657,27): error TS2339: Property 'length' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4657,46): error TS2339: Property '_values' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4658,22): error TS2339: Property '_values' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4659,29): error TS2339: Property '_values' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4663,18): error TS2551: Property '_reject' does not exist on type 'SomePromiseArray'. Did you mean '_rejected'? -node_modules/bluebird/js/browser/bluebird.js(4665,18): error TS2339: Property '_cancel' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4673,17): error TS2339: Property '_totalResolved' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4677,17): error TS2339: Property '_values' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4677,39): error TS2339: Property 'length' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4681,10): error TS2339: Property '_values' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4685,10): error TS2339: Property '_values' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4685,23): error TS2339: Property '_totalResolved' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4689,17): error TS2339: Property 'length' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(4699,10): error TS2551: Property '_reject' does not exist on type 'SomePromiseArray'. Did you mean '_rejected'? -node_modules/bluebird/js/browser/bluebird.js(4707,23): error TS2339: Property 'promise' does not exist on type 'SomePromiseArray'. -node_modules/bluebird/js/browser/bluebird.js(5090,20): error TS2339: Property 'doDispose' does not exist on type 'Disposer'. -node_modules/bluebird/js/browser/bluebird.js(5109,23): error TS2339: Property 'data' does not exist on type 'FunctionDisposer'. -node_modules/bluebird/js/browser/bluebird.js(5441,5): error TS7027: Unreachable code detected. -node_modules/bluebird/js/browser/bluebird.js(5603,25): error TS2304: Cannot find name 'chrome'. -node_modules/bluebird/js/browser/bluebird.js(5603,51): error TS2304: Cannot find name 'chrome'. -node_modules/bluebird/js/browser/bluebird.js(5604,25): error TS2304: Cannot find name 'chrome'. -node_modules/bluebird/js/browser/bluebird.js(5623,118): error TS2339: Property 'P' does not exist on type 'Window'. -node_modules/bluebird/js/browser/bluebird.js(5623,129): error TS2339: Property 'Promise' does not exist on type 'Window'. -node_modules/bluebird/js/browser/bluebird.js(5623,282): error TS2339: Property 'P' does not exist on type 'Window'. -node_modules/bluebird/js/browser/bluebird.js(5623,291): error TS2339: Property 'Promise' does not exist on type 'Window'. node_modules/bluebird/js/release/assert.js(11,30): error TS2339: Property 'constructor$' does not exist on type 'Error'. node_modules/bluebird/js/release/async.js(92,21): error TS2300: Duplicate identifier 'invokeLater'. node_modules/bluebird/js/release/async.js(93,21): error TS2300: Duplicate identifier 'invoke'. diff --git a/tests/baselines/reference/user/lodash.log b/tests/baselines/reference/user/lodash.log index e0d63aa9304..7a2ae30ef94 100644 --- a/tests/baselines/reference/user/lodash.log +++ b/tests/baselines/reference/user/lodash.log @@ -328,7 +328,6 @@ node_modules/lodash/fp/string.js(2,26): error TS2345: Argument of type '{ [x: st node_modules/lodash/fp/util.js(2,26): error TS2345: Argument of type '{ [x: string]: any; 'attempt': Function; 'bindAll': Function; 'cond': (pairs: any[]) => Function;...' is not assignable to parameter of type 'string'. node_modules/lodash/includes.js(24,10): error TS1003: Identifier expected. node_modules/lodash/includes.js(24,10): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/index.js(1,26): error TS2306: File '/home/nathansa/ts/tests/cases/user/lodash/node_modules/lodash/lodash.js' is not a module. node_modules/lodash/intersectionBy.js(41,32): error TS2554: Expected 0-1 arguments, but got 2. node_modules/lodash/isBuffer.js(5,69): error TS2339: Property 'nodeType' does not exist on type 'typeof import("/home/nathansa/ts/tests/cases/user/lodash/node_modules/lodash/isBuffer")'. node_modules/lodash/isBuffer.js(8,80): error TS2339: Property 'nodeType' does not exist on type 'NodeModule'. @@ -336,321 +335,6 @@ node_modules/lodash/isEqual.js(32,10): error TS2554: Expected 3-5 arguments, but node_modules/lodash/isEqualWith.js(38,59): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'boolean'. node_modules/lodash/iteratee.js(50,74): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. node_modules/lodash/keys.js(34,32): error TS2554: Expected 2 arguments, but got 1. -node_modules/lodash/lodash.js(419,58): error TS2339: Property 'Object' does not exist on type 'Window'. -node_modules/lodash/lodash.js(428,82): error TS2339: Property 'nodeType' does not exist on type 'NodeModule'. -node_modules/lodash/lodash.js(434,49): error TS2339: Property 'process' does not exist on type 'false | Global'. - Property 'process' does not exist on type 'false'. -node_modules/lodash/lodash.js(488,19): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(508,20): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(512,5): error TS2322: Type 'any[] | undefined' is not assignable to type 'any[]'. - Type 'undefined' is not assignable to type 'any[]'. -node_modules/lodash/lodash.js(528,20): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(532,5): error TS2322: Type 'any[] | undefined' is not assignable to type 'any[]'. - Type 'undefined' is not assignable to type 'any[]'. -node_modules/lodash/lodash.js(550,22): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(573,19): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(587,17): error TS8024: JSDoc '@param' tag has name 'target', but there is no parameter with that name. -node_modules/lodash/lodash.js(592,36): error TS2345: Argument of type 'any[] | undefined' is not assignable to parameter of type 'any[]'. - Type 'undefined' is not assignable to type 'any[]'. -node_modules/lodash/lodash.js(600,17): error TS8024: JSDoc '@param' tag has name 'target', but there is no parameter with that name. -node_modules/lodash/lodash.js(609,29): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(631,32): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(672,21): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(675,43): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(695,21): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(698,43): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(718,21): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(749,22): error TS8024: JSDoc '@param' tag has name 'The', but there is no parameter with that name. -node_modules/lodash/lodash.js(924,16): error TS2345: Argument of type 'Function' is not assignable to parameter of type '((a: any, b: any) => number) | undefined'. - Type 'Function' is not assignable to type '(a: any, b: any) => number'. -node_modules/lodash/lodash.js(1374,22): error TS8024: JSDoc '@param' tag has name 'The', but there is no parameter with that name. -node_modules/lodash/lodash.js(1771,9): error TS2322: Type 'typeof lodash' is not assignable to type 'Function'. - Types of property 'bind' are incompatible. - Type 'Function' is not assignable to type '(this: Function, thisArg: any, ...argArray: any[]) => any'. - Type 'Function' provides no match for the signature '(this: Function, thisArg: any, ...argArray: any[]): any'. -node_modules/lodash/lodash.js(1916,21): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(1939,24): error TS8024: JSDoc '@param' tag has name 'hash', but there is no parameter with that name. -node_modules/lodash/lodash.js(2020,21): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(2137,21): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(2241,18): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(2288,24): error TS2339: Property 'size' does not exist on type 'ListCache'. -node_modules/lodash/lodash.js(2604,11): error TS2322: Type 'number | undefined' is not assignable to type 'number'. - Type 'undefined' is not assignable to type 'number'. -node_modules/lodash/lodash.js(2604,30): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(2628,20): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -node_modules/lodash/lodash.js(2629,20): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -node_modules/lodash/lodash.js(2630,20): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -node_modules/lodash/lodash.js(2652,37): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean | undefined'. -node_modules/lodash/lodash.js(2665,47): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean | undefined'. -node_modules/lodash/lodash.js(2791,9): error TS2322: Type '(array?: any[] | undefined, value: any, comparator: Function) => boolean' is not assignable to type '(array?: any[] | undefined, value: any) => boolean'. -node_modules/lodash/lodash.js(2797,9): error TS2322: Type 'SetCache' is not assignable to type 'any[]'. - Property 'flatMap' is missing in type 'SetCache'. -node_modules/lodash/lodash.js(2814,19): error TS2554: Expected 2 arguments, but got 3. -node_modules/lodash/lodash.js(2905,35): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(2949,21): error TS2322: Type '(value: any) => boolean' is not assignable to type 'boolean | undefined'. - Type '(value: any) => boolean' is not assignable to type 'false'. -node_modules/lodash/lodash.js(2954,26): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(2954,26): error TS2722: Cannot invoke an object which is possibly 'undefined'. -node_modules/lodash/lodash.js(2954,26): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Boolean' has no compatible call signatures. -node_modules/lodash/lodash.js(3176,44): error TS2345: Argument of type 'Function | undefined' is not assignable to parameter of type 'Function'. - Type 'undefined' is not assignable to type 'Function'. -node_modules/lodash/lodash.js(3183,58): error TS2345: Argument of type 'Function | undefined' is not assignable to parameter of type 'Function'. - Type 'undefined' is not assignable to type 'Function'. -node_modules/lodash/lodash.js(3286,44): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. -node_modules/lodash/lodash.js(3403,51): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. -node_modules/lodash/lodash.js(3587,40): error TS2345: Argument of type 'string | symbol' is not assignable to parameter of type 'string'. - Type 'symbol' is not assignable to type 'string'. -node_modules/lodash/lodash.js(3593,45): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. -node_modules/lodash/lodash.js(3830,64): error TS2345: Argument of type 'Function | undefined' is not assignable to parameter of type 'Function'. - Type 'undefined' is not assignable to type 'Function'. -node_modules/lodash/lodash.js(3860,30): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string | any[]'. -node_modules/lodash/lodash.js(4001,29): error TS2345: Argument of type 'string | symbol' is not assignable to parameter of type 'string'. - Type 'symbol' is not assignable to type 'string'. -node_modules/lodash/lodash.js(4061,11): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4062,18): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4062,49): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4064,13): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4065,11): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4066,9): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4068,16): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4068,24): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4068,36): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4068,42): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4069,7): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4073,39): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4271,9): error TS2322: Type '(array?: any[] | undefined, value: any, comparator: Function) => boolean' is not assignable to type '(array?: any[] | undefined, value: any) => boolean'. -node_modules/lodash/lodash.js(4274,37): error TS2554: Expected 0 arguments, but got 1. -node_modules/lodash/lodash.js(4280,9): error TS2322: Type 'SetCache' is not assignable to type 'any[]'. -node_modules/lodash/lodash.js(4303,19): error TS2554: Expected 2 arguments, but got 3. -node_modules/lodash/lodash.js(4497,25): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4537,20): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -node_modules/lodash/lodash.js(4757,9): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(4759,7): error TS2322: Type 'any[] | undefined' is not assignable to type 'any[]'. - Type 'undefined' is not assignable to type 'any[]'. -node_modules/lodash/lodash.js(4807,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/lodash/lodash.js(4819,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/lodash/lodash.js(4982,28): error TS2554: Expected 3 arguments, but got 1. -node_modules/lodash/lodash.js(5001,26): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -node_modules/lodash/lodash.js(5002,26): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -node_modules/lodash/lodash.js(5003,26): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -node_modules/lodash/lodash.js(5004,26): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -node_modules/lodash/lodash.js(5005,26): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -node_modules/lodash/lodash.js(5006,26): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -node_modules/lodash/lodash.js(5007,26): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -node_modules/lodash/lodash.js(5008,26): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -node_modules/lodash/lodash.js(5047,50): error TS2339: Property 'placeholder' does not exist on type '(...args: any[]) => any'. -node_modules/lodash/lodash.js(5072,38): error TS2454: Variable 'iteratee' is used before being assigned. -node_modules/lodash/lodash.js(5097,26): error TS2454: Variable 'wrapper' is used before being assigned. -node_modules/lodash/lodash.js(5101,17): error TS2454: Variable 'wrapper' is used before being assigned. -node_modules/lodash/lodash.js(5106,46): error TS2554: Expected 0 arguments, but got 1. -node_modules/lodash/lodash.js(5112,23): error TS2454: Variable 'wrapper' is used before being assigned. -node_modules/lodash/lodash.js(5112,59): error TS2454: Variable 'wrapper' is used before being assigned. -node_modules/lodash/lodash.js(5115,17): error TS2454: Variable 'wrapper' is used before being assigned. -node_modules/lodash/lodash.js(5116,17): error TS2454: Variable 'wrapper' is used before being assigned. -node_modules/lodash/lodash.js(5116,25): error TS2339: Property 'thru' does not exist on type 'LodashWrapper'. -node_modules/lodash/lodash.js(5124,28): error TS2339: Property 'plant' does not exist on type 'LodashWrapper'. -node_modules/lodash/lodash.js(5162,53): error TS2345: Argument of type 'string | Function' is not assignable to parameter of type 'Function'. - Type 'string' is not assignable to type 'Function'. -node_modules/lodash/lodash.js(5177,46): error TS2345: Argument of type 'any[] | undefined' is not assignable to parameter of type 'any[]'. - Type 'undefined' is not assignable to type 'any[]'. -node_modules/lodash/lodash.js(5180,56): error TS2345: Argument of type 'any[] | undefined' is not assignable to parameter of type 'any[]'. - Type 'undefined' is not assignable to type 'any[]'. -node_modules/lodash/lodash.js(5182,19): error TS2454: Variable 'holdersCount' is used before being assigned. -node_modules/lodash/lodash.js(5183,35): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(5186,13): error TS2345: Argument of type 'string | Function' is not assignable to parameter of type 'Function'. - Type 'string' is not assignable to type 'Function'. -node_modules/lodash/lodash.js(5186,50): error TS2339: Property 'placeholder' does not exist on type '(...args: any[]) => any'. -node_modules/lodash/lodash.js(5187,44): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(5191,42): error TS2538: Type 'Function' cannot be used as an index type. -node_modules/lodash/lodash.js(5199,22): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(5520,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/lodash/lodash.js(5543,33): error TS2345: Argument of type 'string | Function' is not assignable to parameter of type 'Function'. - Type 'string' is not assignable to type 'Function'. -node_modules/lodash/lodash.js(5545,30): error TS2345: Argument of type 'string | Function' is not assignable to parameter of type 'Function'. - Type 'string' is not assignable to type 'Function'. -node_modules/lodash/lodash.js(5546,104): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(5547,32): error TS2345: Argument of type 'string | Function' is not assignable to parameter of type 'Function'. - Type 'string' is not assignable to type 'Function'. -node_modules/lodash/lodash.js(5552,55): error TS2345: Argument of type 'string | Function' is not assignable to parameter of type 'Function'. - Type 'string' is not assignable to type 'Function'. -node_modules/lodash/lodash.js(5605,24): error TS8024: JSDoc '@param' tag has name 'key', but there is no parameter with that name. -node_modules/lodash/lodash.js(5742,11): error TS2454: Variable 'convert' is used before being assigned. -node_modules/lodash/lodash.js(5826,22): error TS2322: Type 'boolean' is not assignable to type 'number'. -node_modules/lodash/lodash.js(5921,21): error TS2339: Property 'placeholder' does not exist on type 'Function | typeof lodash'. - Property 'placeholder' does not exist on type 'Function'. -node_modules/lodash/lodash.js(5932,25): error TS8029: JSDoc '@param' tag has name 'arity', but there is no parameter with that name. It would match 'arguments' if it had an array type. -node_modules/lodash/lodash.js(5938,33): error TS2554: Expected 0-1 arguments, but got 2. -node_modules/lodash/lodash.js(6006,11): error TS2454: Variable 'unmasked' is used before being assigned. -node_modules/lodash/lodash.js(6043,27): error TS2554: Expected 0 arguments, but got 1. -node_modules/lodash/lodash.js(6149,54): error TS2454: Variable 'key' is used before being assigned. -node_modules/lodash/lodash.js(6162,20): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -node_modules/lodash/lodash.js(6166,30): error TS2339: Property 'index' does not exist on type 'any[]'. -node_modules/lodash/lodash.js(6167,30): error TS2339: Property 'input' does not exist on type 'any[]'. -node_modules/lodash/lodash.js(6239,9): error TS1223: 'returns' tag already specified. -node_modules/lodash/lodash.js(6244,9): error TS2322: Type 'string' is not assignable to type 'any[]'. -node_modules/lodash/lodash.js(6249,7): error TS2322: Type 'string' is not assignable to type 'any[]'. -node_modules/lodash/lodash.js(6359,18): error TS2554: Expected 0 arguments, but got 1. -node_modules/lodash/lodash.js(6444,26): error TS2339: Property 'cache' does not exist on type 'Function'. -node_modules/lodash/lodash.js(6489,30): error TS2554: Expected 4 arguments, but got 3. -node_modules/lodash/lodash.js(6496,30): error TS2554: Expected 4 arguments, but got 3. -node_modules/lodash/lodash.js(6563,46): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(6567,31): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(6570,31): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(6571,26): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(6574,19): error TS2538: Type 'undefined' cannot be used as an index type. -node_modules/lodash/lodash.js(6709,24): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(6716,7): error TS2322: Type 'number | undefined' is not assignable to type 'number'. - Type 'undefined' is not assignable to type 'number'. -node_modules/lodash/lodash.js(6778,9): error TS1223: 'returns' tag already specified. -node_modules/lodash/lodash.js(6821,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(6821,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(6838,22): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(6843,46): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(6846,64): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(6941,56): error TS2345: Argument of type '(value: any) => boolean' is not assignable to parameter of type 'boolean | undefined'. - Type '(value: any) => boolean' is not assignable to type 'false'. -node_modules/lodash/lodash.js(6977,56): error TS2345: Argument of type '(value: any) => boolean' is not assignable to parameter of type 'boolean | undefined'. - Type '(value: any) => boolean' is not assignable to type 'false'. -node_modules/lodash/lodash.js(7010,56): error TS2345: Argument of type '(value: any) => boolean' is not assignable to parameter of type 'boolean | undefined'. - Type '(value: any) => boolean' is not assignable to type 'false'. -node_modules/lodash/lodash.js(7023,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(7023,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(7057,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(7057,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(7296,17): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(8145,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(8145,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(8178,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(8178,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(8303,46): error TS2345: Argument of type '(value: any) => boolean' is not assignable to parameter of type 'boolean | undefined'. - Type '(value: any) => boolean' is not assignable to type 'false'. -node_modules/lodash/lodash.js(8334,46): error TS2345: Argument of type '(value: any) => boolean' is not assignable to parameter of type 'boolean | undefined'. - Type '(value: any) => boolean' is not assignable to type 'false'. -node_modules/lodash/lodash.js(8361,46): error TS2345: Argument of type '(value: any) => boolean' is not assignable to parameter of type 'boolean | undefined'. - Type '(value: any) => boolean' is not assignable to type 'false'. -node_modules/lodash/lodash.js(8822,55): error TS2339: Property 'thru' does not exist on type 'LodashWrapper'. -node_modules/lodash/lodash.js(9093,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(9093,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(9407,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(9407,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(9432,12): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(9433,55): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. - Type 'undefined' is not assignable to type 'number'. -node_modules/lodash/lodash.js(9563,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(9563,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(9587,9): error TS2322: Type 'string[][]' is not assignable to type 'string[] | undefined'. - Type 'string[][]' is not assignable to type 'string[]'. - Type 'string[]' is not assignable to type 'string'. -node_modules/lodash/lodash.js(9589,38): error TS2345: Argument of type 'any[] | string[] | Function[] | any[][] | undefined' is not assignable to parameter of type 'any[] | string[] | Function[]'. - Type 'undefined' is not assignable to type 'any[] | string[] | Function[]'. -node_modules/lodash/lodash.js(9673,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((array?: any[] | undefined, iteratee: Function, accumulator?: any, initAccum?: boolean | undefin...' has no compatible call signatures. -node_modules/lodash/lodash.js(9702,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((collection: any, iteratee: Function, accumulator: any, initAccum: boolean, eachFunc: Function) ...' has no compatible call signatures. -node_modules/lodash/lodash.js(9773,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(9773,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(9859,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(9859,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(10004,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(10004,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(10092,59): error TS2454: Variable 'holders' is used before being assigned. -node_modules/lodash/lodash.js(10146,57): error TS2454: Variable 'holders' is used before being assigned. -node_modules/lodash/lodash.js(10167,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(10167,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(10193,14): error TS2339: Property 'placeholder' does not exist on type 'Function'. -node_modules/lodash/lodash.js(10193,34): error TS2339: Property 'placeholder' does not exist on type '(func: Function, arity?: number | undefined, guard: any) => Function'. -node_modules/lodash/lodash.js(10212,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(10212,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(10238,14): error TS2339: Property 'placeholder' does not exist on type 'Function'. -node_modules/lodash/lodash.js(10238,39): error TS2339: Property 'placeholder' does not exist on type '(func: Function, arity?: number | undefined, guard: any) => Function'. -node_modules/lodash/lodash.js(10313,21): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(10314,31): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(10315,47): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(10316,34): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(10341,27): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(10355,69): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(10834,26): error TS2538: Type 'undefined' cannot be used as an index type. -node_modules/lodash/lodash.js(10896,32): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(10897,34): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(10899,35): error TS2345: Argument of type '{ 'leading': boolean; 'maxWait': number | undefined; 'trailing': boolean; }' is not assignable to parameter of type '{ leading?: boolean; maxWait?: number; trailing?: boolean; } | undefined'. - Type '{ 'leading': boolean; 'maxWait': number | undefined; 'trailing': boolean; }' is not assignable to type '{ leading?: boolean; maxWait?: number; trailing?: boolean; }'. - Types of property 'maxWait' are incompatible. - Type 'number | undefined' is not assignable to type 'number'. - Type 'undefined' is not assignable to type 'number'. -node_modules/lodash/lodash.js(10922,14): error TS2554: Expected 3 arguments, but got 2. -node_modules/lodash/lodash.js(10960,19): error TS8029: JSDoc '@param' tag has name 'value', but there is no parameter with that name. It would match 'arguments' if it had an array type. -node_modules/lodash/lodash.js(11021,31): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. -node_modules/lodash/lodash.js(11057,31): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. -node_modules/lodash/lodash.js(11079,31): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. -node_modules/lodash/lodash.js(11112,31): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. -node_modules/lodash/lodash.js(11523,14): error TS2554: Expected 3-5 arguments, but got 2. -node_modules/lodash/lodash.js(13298,36): error TS2554: Expected 2 arguments, but got 1. -node_modules/lodash/lodash.js(13354,33): error TS2722: Cannot invoke an object which is possibly 'undefined'. -node_modules/lodash/lodash.js(13392,38): error TS2722: Cannot invoke an object which is possibly 'undefined'. -node_modules/lodash/lodash.js(13500,36): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. -node_modules/lodash/lodash.js(13581,16): error TS2722: Cannot invoke an object which is possibly 'undefined'. -node_modules/lodash/lodash.js(13796,7): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((array?: any[] | undefined, iteratee: Function) => any[]) | ((object: any, iteratee: Function) =...' has no compatible call signatures. -node_modules/lodash/lodash.js(13797,16): error TS2722: Cannot invoke an object which is possibly 'undefined'. -node_modules/lodash/lodash.js(13974,9): error TS2322: Type 'number | undefined' is not assignable to type 'number'. - Type 'undefined' is not assignable to type 'number'. -node_modules/lodash/lodash.js(14174,48): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'. -node_modules/lodash/lodash.js(14245,43): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'. -node_modules/lodash/lodash.js(14458,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(14458,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(14486,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(14486,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(14520,33): error TS8029: JSDoc '@param' tag has name 'replacement', but there is no parameter with that name. It would match 'arguments' if it had an array type. -node_modules/lodash/lodash.js(14582,56): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(14692,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(14692,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(14773,38): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(14780,25): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(14785,10): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(14788,10): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(14793,25): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(14802,19): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(14827,22): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(14877,25): error TS8024: JSDoc '@param' tag has name 'string', but there is no parameter with that name. -node_modules/lodash/lodash.js(14902,25): error TS8024: JSDoc '@param' tag has name 'string', but there is no parameter with that name. -node_modules/lodash/lodash.js(14928,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(14928,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(14966,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(14966,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(14999,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(14999,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(15065,40): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(15066,30): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(15067,34): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(15083,20): error TS2454: Variable 'strSymbols' is used before being assigned. -node_modules/lodash/lodash.js(15090,11): error TS2454: Variable 'strSymbols' is used before being assigned. -node_modules/lodash/lodash.js(15138,41): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'. -node_modules/lodash/lodash.js(15194,14): error TS1003: Identifier expected. -node_modules/lodash/lodash.js(15194,14): error TS8024: JSDoc '@param' tag has name '', but there is no parameter with that name. -node_modules/lodash/lodash.js(15356,45): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. -node_modules/lodash/lodash.js(15518,78): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. -node_modules/lodash/lodash.js(15550,44): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. -node_modules/lodash/lodash.js(15580,34): error TS2345: Argument of type 'string | any[]' is not assignable to parameter of type 'string'. - Type 'any[]' is not assignable to type 'string'. -node_modules/lodash/lodash.js(15580,60): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'. -node_modules/lodash/lodash.js(15689,53): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/lodash.js(15706,65): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. -node_modules/lodash/lodash.js(15773,30): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. - Type 'undefined' is not assignable to type 'number'. -node_modules/lodash/lodash.js(15872,41): error TS2345: Argument of type 'string | symbol' is not assignable to parameter of type 'string'. - Type 'symbol' is not assignable to type 'string'. -node_modules/lodash/lodash.js(16914,19): error TS2339: Property 'filter' does not exist on type 'LazyWrapper'. -node_modules/lodash/lodash.js(16918,19): error TS2339: Property 'filter' does not exist on type 'LazyWrapper'. -node_modules/lodash/lodash.js(16935,19): error TS2339: Property 'filter' does not exist on type 'LazyWrapper'. -node_modules/lodash/lodash.js(16946,25): error TS2339: Property 'takeRight' does not exist on type 'LazyWrapper'. -node_modules/lodash/lodash.js(16948,25): error TS2339: Property 'drop' does not exist on type 'LazyWrapper'. -node_modules/lodash/lodash.js(16952,35): error TS2339: Property 'dropRight' does not exist on type 'LazyWrapper'. -node_modules/lodash/lodash.js(16952,60): error TS2339: Property 'take' does not exist on type 'LazyWrapper'. -node_modules/lodash/lodash.js(16962,19): error TS2339: Property 'take' does not exist on type 'LazyWrapper'. -node_modules/lodash/lodash.js(16983,68): error TS2345: Argument of type 'IArguments | number[]' is not assignable to parameter of type 'any[]'. - Type 'IArguments' is not assignable to type 'any[]'. -node_modules/lodash/lodash.js(17073,14): error TS2304: Cannot find name 'define'. -node_modules/lodash/lodash.js(17073,45): error TS2304: Cannot find name 'define'. -node_modules/lodash/lodash.js(17073,71): error TS2304: Cannot find name 'define'. -node_modules/lodash/lodash.js(17082,5): error TS2304: Cannot find name 'define'. -node_modules/lodash/lodash.js(17089,30): error TS2339: Property '_' does not exist on type 'typeof lodash'. node_modules/lodash/map.js(50,27): error TS2554: Expected 0-1 arguments, but got 2. node_modules/lodash/mapKeys.js(28,14): error TS2554: Expected 0-1 arguments, but got 2. node_modules/lodash/mapKeys.js(31,29): error TS2722: Cannot invoke an object which is possibly 'undefined'. diff --git a/tests/baselines/reference/user/url-search-params.log b/tests/baselines/reference/user/url-search-params.log index 95849823ccd..f3d6544ff8d 100644 --- a/tests/baselines/reference/user/url-search-params.log +++ b/tests/baselines/reference/user/url-search-params.log @@ -1,60 +1,5 @@ Exit Code: 1 Standard output: -node_modules/url-search-params/build/url-search-params.js(2,5): error TS2322: Type '{ new (init?: string | URLSearchParams | undefined): URLSearchParams; prototype: URLSearchParams; }' is not assignable to type '(query: any) => void'. - Type '{ new (init?: string | URLSearchParams | undefined): URLSearchParams; prototype: URLSearchParams; }' provides no match for the signature '(query: any): void'. -node_modules/url-search-params/build/url-search-params.js(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'URLSearchParams' must be of type '{ new (init?: string | URLSearchParams | undefined): URLSearchParams; prototype: URLSearchParams; }', but here has type '(query: any) => void'. -node_modules/url-search-params/build/url-search-params.js(2,3851): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.js(2,3851): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.js(2,3851): error TS2684: The 'this' context of type '(() => any) | undefined' is not assignable to method's 'this' of type 'Function'. - Type 'undefined' is not assignable to type 'Function'. -node_modules/url-search-params/build/url-search-params.js(2,3918): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.js(2,3918): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.js(2,3918): error TS2684: The 'this' context of type '((v: any) => void) | undefined' is not assignable to method's 'this' of type 'Function'. - Type 'undefined' is not assignable to type 'Function'. -node_modules/url-search-params/build/url-search-params.js(2,4005): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.js(2,4005): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.js(2,4005): error TS2684: The 'this' context of type '(() => any) | undefined' is not assignable to method's 'this' of type 'Function'. - Type 'undefined' is not assignable to type 'Function'. -node_modules/url-search-params/build/url-search-params.js(2,4074): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.js(2,4074): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.js(2,4074): error TS2684: The 'this' context of type '((v: any) => void) | undefined' is not assignable to method's 'this' of type 'Function'. - Type 'undefined' is not assignable to type 'Function'. -node_modules/url-search-params/build/url-search-params.js(2,4676): error TS2339: Property 'forEach' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.js(2,5038): error TS2339: Property 'keys' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.js(2,5077): error TS2339: Property 'forEach' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.js(2,5368): error TS2339: Property 'values' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.js(2,5411): error TS2339: Property 'forEach' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.js(2,5699): error TS2339: Property 'entries' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.js(2,5744): error TS2339: Property 'forEach' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.js(2,6099): error TS2339: Property 'entries' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.js(2,6165): error TS2339: Property 'sort' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.js(2,6203): error TS2339: Property 'entries' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.max.js(246,22): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.max.js(246,22): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.max.js(246,22): error TS2684: The 'this' context of type '(() => any) | undefined' is not assignable to method's 'this' of type 'Function'. - Type 'undefined' is not assignable to type 'Function'. -node_modules/url-search-params/build/url-search-params.max.js(250,15): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.max.js(250,15): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.max.js(250,15): error TS2684: The 'this' context of type '((v: any) => void) | undefined' is not assignable to method's 'this' of type 'Function'. - Type 'undefined' is not assignable to type 'Function'. -node_modules/url-search-params/build/url-search-params.max.js(256,22): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.max.js(256,22): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.max.js(256,22): error TS2684: The 'this' context of type '(() => any) | undefined' is not assignable to method's 'this' of type 'Function'. - Type 'undefined' is not assignable to type 'Function'. -node_modules/url-search-params/build/url-search-params.max.js(260,15): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.max.js(260,15): error TS2532: Object is possibly 'undefined'. -node_modules/url-search-params/build/url-search-params.max.js(260,15): error TS2684: The 'this' context of type '((v: any) => void) | undefined' is not assignable to method's 'this' of type 'Function'. - Type 'undefined' is not assignable to type 'Function'. -node_modules/url-search-params/build/url-search-params.max.js(322,26): error TS2339: Property 'forEach' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.max.js(337,26): error TS2339: Property 'keys' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.max.js(339,12): error TS2339: Property 'forEach' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.max.js(358,26): error TS2339: Property 'values' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.max.js(360,12): error TS2339: Property 'forEach' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.max.js(379,26): error TS2339: Property 'entries' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.max.js(381,12): error TS2339: Property 'forEach' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.max.js(400,66): error TS2339: Property 'entries' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.max.js(404,26): error TS2339: Property 'sort' does not exist on type 'URLSearchParams'. -node_modules/url-search-params/build/url-search-params.max.js(406,24): error TS2339: Property 'entries' does not exist on type 'URLSearchParams'. node_modules/url-search-params/build/url-search-params.node.js(174,1): error TS2539: Cannot assign to 'URLSearchParams' because it is not a variable. node_modules/url-search-params/build/url-search-params.node.js(174,44): error TS2339: Property 'URLSearchParams' does not exist on type 'Global'. diff --git a/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts b/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts index 9fa45fde8dc..cc72b9ccbeb 100644 --- a/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts +++ b/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts @@ -7,7 +7,6 @@ verify.codeFix({ description: "Implement interface 'A'", - // TODO: GH#18795 newFileContent: `class A { f() {} diff --git a/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts b/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts index 24a97c70e65..a2bcd3a8ce7 100644 --- a/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts +++ b/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts @@ -12,7 +12,6 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 newFileContent: `function foo(a: T) { a; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts b/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts index f78cf2a3d6f..8964c167014 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts @@ -12,7 +12,6 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 newFileContent: `function foo(a: T) { a; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts b/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts index 75ccc956521..0a66f445cc7 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts @@ -20,7 +20,6 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 newFileContent: `abstract class A { abstract get a(): number | string; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts index 7098af8bc27..abb3f4a5703 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts @@ -12,7 +12,6 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 newFileContent: `abstract class A { abstract f(a: number, b: string): boolean; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts index f0bb90c9443..d634570448b 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts @@ -8,7 +8,6 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 newFileContent: `abstract class A { abstract f(): this; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts index fdbbda75113..788e955d900 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts @@ -8,7 +8,6 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 newFileContent: `abstract class A { abstract f(x: T): T; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts index 41fe94ae634..005cde757da 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts @@ -8,7 +8,6 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 newFileContent: `abstract class A { abstract f(x: T): T; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts b/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts index e5811016e8c..3525bf220e9 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts @@ -10,7 +10,6 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 newFileContent: `abstract class A { abstract x: number; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceComments.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceComments.ts index 793ad944732..2dd4a5edb72 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceComments.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceComments.ts @@ -36,9 +36,9 @@ verify.codeFix({ /**close-brace prefix*/ } /**close-brace prefix*/ } class C implements N.I { - /** property prefix */ a /** colon prefix */: N.E.a; - /** property prefix */ b /** colon prefix */: N.E; - /**method signature prefix */ foo /**open angle prefix */(a: X): string { + a: N.E.a; + b: N.E; + foo(a: X): string { throw new Error("Method not implemented."); } }`, diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberOrdering.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberOrdering.ts index 9c5bd172e8f..4b1c04f461c 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberOrdering.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberOrdering.ts @@ -84,7 +84,6 @@ class C implements I { 20: any; 21: any; 22: any; - /** a nice safe prime */ 23: any; }`, }); diff --git a/tests/cases/fourslash/importNameCodeFix_types_classic.ts b/tests/cases/fourslash/importNameCodeFix_types_classic.ts new file mode 100644 index 00000000000..b9ba463fada --- /dev/null +++ b/tests/cases/fourslash/importNameCodeFix_types_classic.ts @@ -0,0 +1,16 @@ +/// + +// @moduleResolution: classic + +// @Filename: /node_modules/@types/foo/index.d.ts +////export const xyz: number; + +// @Filename: /a.ts +////[|xyz|] + +goTo.file("/a.ts"); +verify.importFixAtPosition([ +`import { xyz } from "foo"; + +xyz` +]); diff --git a/tests/cases/user/bcryptjs/tsconfig.json b/tests/cases/user/bcryptjs/tsconfig.json index 4fcf3f61bc6..032e5b5655e 100644 --- a/tests/cases/user/bcryptjs/tsconfig.json +++ b/tests/cases/user/bcryptjs/tsconfig.json @@ -10,5 +10,9 @@ "types": ["node"], "lib": ["esnext", "dom"], }, - "include": ["node_modules/bcryptjs"] + "include": [ + "node_modules/bcryptjs/scripts", + "node_modules/bcryptjs/src", + "node_modules/bcryptjs/tests" + ] } diff --git a/tests/cases/user/bluebird/tsconfig.json b/tests/cases/user/bluebird/tsconfig.json index 3461d0802dc..b54158015a1 100644 --- a/tests/cases/user/bluebird/tsconfig.json +++ b/tests/cases/user/bluebird/tsconfig.json @@ -10,5 +10,5 @@ "types": ["node"], "lib": ["esnext", "dom"], }, - "include": ["node_modules/bluebird"] + "include": ["node_modules/bluebird/js/release"] } diff --git a/tests/cases/user/lodash/tsconfig.json b/tests/cases/user/lodash/tsconfig.json index 4e130b37493..a50a9a85374 100644 --- a/tests/cases/user/lodash/tsconfig.json +++ b/tests/cases/user/lodash/tsconfig.json @@ -10,5 +10,6 @@ "types": ["node"], "lib": ["esnext", "dom"], }, - "include": ["node_modules/lodash"] + "include": ["node_modules/lodash"], + "exclude": ["node_modules/lodash/lodash.js"] } diff --git a/tests/cases/user/url-search-params/tsconfig.json b/tests/cases/user/url-search-params/tsconfig.json index 1ca26f34001..113a87b9e4a 100644 --- a/tests/cases/user/url-search-params/tsconfig.json +++ b/tests/cases/user/url-search-params/tsconfig.json @@ -10,5 +10,5 @@ "types": ["node"], "lib": ["esnext", "dom"], }, - "include": ["node_modules/url-search-params"] + "include": ["node_modules/url-search-params/build/url-search-params.node.js"] }