From 8d69c76c9da262a201a5f3fd97bfd3aa7bb87881 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Mon, 27 Oct 2025 13:25:54 -0700 Subject: [PATCH 1/3] Add missing KindCommonJSExport transform to declaration emitter --- .../transformers/declarations/transform.go | 77 ++++++++++++++++++- internal/transformers/declarations/util.go | 3 +- ...DeclarationExportDefaultAssignmentCrash.js | 22 ++++++ ...rationExportDefaultAssignmentCrash.symbols | 11 +++ ...larationExportDefaultAssignmentCrash.types | 14 ++++ ...DeclarationExportDefaultAssignmentCrash.ts | 9 +++ 6 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 testdata/baselines/reference/compiler/jsDeclarationExportDefaultAssignmentCrash.js create mode 100644 testdata/baselines/reference/compiler/jsDeclarationExportDefaultAssignmentCrash.symbols create mode 100644 testdata/baselines/reference/compiler/jsDeclarationExportDefaultAssignmentCrash.types create mode 100644 testdata/tests/cases/compiler/jsDeclarationExportDefaultAssignmentCrash.ts diff --git a/internal/transformers/declarations/transform.go b/internal/transformers/declarations/transform.go index e81bf4f602..5e7d92a011 100644 --- a/internal/transformers/declarations/transform.go +++ b/internal/transformers/declarations/transform.go @@ -120,7 +120,8 @@ func (tx *DeclarationTransformer) visit(node *ast.Node) *ast.Node { ast.KindJSImportDeclaration, ast.KindExportDeclaration, ast.KindJSExportAssignment, - ast.KindExportAssignment: + ast.KindExportAssignment, + ast.KindCommonJSExport: return tx.visitDeclarationStatements(node) // statements we elide case ast.KindBreakStatement, @@ -924,6 +925,80 @@ func (tx *DeclarationTransformer) visitDeclarationStatements(input *ast.Node) *a tx.rewriteModuleSpecifier(input, input.AsExportDeclaration().ModuleSpecifier), tx.tryGetResolutionModeOverride(input.AsExportDeclaration().Attributes), ) + case ast.KindCommonJSExport: + if ast.IsSourceFile(input.Parent) { + tx.resultHasExternalModuleIndicator = true + } + tx.resultHasScopeMarker = true + name := input.AsCommonJSExport().Name() + if ast.IsIdentifier(name) { + if name.AsIdentifier().Text == "default" { + // const _default: Type; export default _default; + newId := tx.Factory().NewUniqueNameEx("_default", printer.AutoGenerateOptions{Flags: printer.GeneratedIdentifierFlagsOptimistic}) + tx.state.getSymbolAccessibilityDiagnostic = func(_ printer.SymbolAccessibilityResult) *SymbolAccessibilityDiagnostic { + return &SymbolAccessibilityDiagnostic{ + diagnosticMessage: diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0, + errorNode: input, + } + } + tx.tracker.PushErrorFallbackNode(input) + type_ := tx.ensureType(input, false) + varDecl := tx.Factory().NewVariableDeclaration(newId, nil, type_, nil) + tx.tracker.PopErrorFallbackNode() + var modList *ast.ModifierList + if tx.needsDeclare { + modList = tx.Factory().NewModifierList([]*ast.Node{tx.Factory().NewModifier(ast.KindDeclareKeyword)}) + } else { + modList = tx.Factory().NewModifierList([]*ast.Node{}) + } + statement := tx.Factory().NewVariableStatement(modList, tx.Factory().NewVariableDeclarationList(ast.NodeFlagsConst, tx.Factory().NewNodeList([]*ast.Node{varDecl}))) + + assignment := tx.Factory().NewExportAssignment(input.Modifiers(), false, nil, newId) + // Remove comments from the export declaration and copy them onto the synthetic _default declaration + tx.preserveJsDoc(statement, input) + tx.removeAllComments(assignment) + return tx.Factory().NewSyntaxList([]*ast.Node{statement, assignment}) + } else { + // export var name: Type + tx.tracker.PushErrorFallbackNode(input) + type_ := tx.ensureType(input, false) + varDecl := tx.Factory().NewVariableDeclaration(name, nil, type_, nil) + tx.tracker.PopErrorFallbackNode() + var modList *ast.ModifierList + if tx.needsDeclare { + modList = tx.Factory().NewModifierList([]*ast.Node{tx.Factory().NewModifier(ast.KindExportKeyword), tx.Factory().NewModifier(ast.KindDeclareKeyword)}) + } else { + modList = tx.Factory().NewModifierList([]*ast.Node{tx.Factory().NewModifier(ast.KindExportKeyword)}) + } + return tx.Factory().NewVariableStatement(modList, tx.Factory().NewVariableDeclarationList(ast.NodeFlagsNone, tx.Factory().NewNodeList([]*ast.Node{varDecl}))) + } + } else { + // const _exported: Type; export {_exported as "name"}; + newId := tx.Factory().NewUniqueNameEx("_exported", printer.AutoGenerateOptions{Flags: printer.GeneratedIdentifierFlagsOptimistic}) + tx.state.getSymbolAccessibilityDiagnostic = func(_ printer.SymbolAccessibilityResult) *SymbolAccessibilityDiagnostic { + return &SymbolAccessibilityDiagnostic{ + diagnosticMessage: diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0, + errorNode: input, + } + } + tx.tracker.PushErrorFallbackNode(input) + type_ := tx.ensureType(input, false) + varDecl := tx.Factory().NewVariableDeclaration(newId, nil, type_, nil) + tx.tracker.PopErrorFallbackNode() + var modList *ast.ModifierList + if tx.needsDeclare { + modList = tx.Factory().NewModifierList([]*ast.Node{tx.Factory().NewModifier(ast.KindDeclareKeyword)}) + } else { + modList = tx.Factory().NewModifierList([]*ast.Node{}) + } + statement := tx.Factory().NewVariableStatement(modList, tx.Factory().NewVariableDeclarationList(ast.NodeFlagsConst, tx.Factory().NewNodeList([]*ast.Node{varDecl}))) + + assignment := tx.Factory().NewExportDeclaration(nil, false, tx.Factory().NewNamedExports(tx.Factory().NewNodeList([]*ast.Node{tx.Factory().NewExportSpecifier(false, newId, name)})), nil, nil) + // Remove comments from the export declaration and copy them onto the synthetic _default declaration + tx.preserveJsDoc(statement, input) + tx.removeAllComments(assignment) + return tx.Factory().NewSyntaxList([]*ast.Node{statement, assignment}) + } case ast.KindExportAssignment, ast.KindJSExportAssignment: if ast.IsSourceFile(input.Parent) { tx.resultHasExternalModuleIndicator = true diff --git a/internal/transformers/declarations/util.go b/internal/transformers/declarations/util.go index e6d71f5697..dfd28f98ab 100644 --- a/internal/transformers/declarations/util.go +++ b/internal/transformers/declarations/util.go @@ -64,7 +64,8 @@ func hasInferredType(node *ast.Node) bool { ast.KindPropertyAssignment, ast.KindShorthandPropertyAssignment, ast.KindJSDocParameterTag, - ast.KindJSDocPropertyTag: + ast.KindJSDocPropertyTag, + ast.KindCommonJSExport: return true default: // assertType(node); // !!! diff --git a/testdata/baselines/reference/compiler/jsDeclarationExportDefaultAssignmentCrash.js b/testdata/baselines/reference/compiler/jsDeclarationExportDefaultAssignmentCrash.js new file mode 100644 index 0000000000..0f64fde1de --- /dev/null +++ b/testdata/baselines/reference/compiler/jsDeclarationExportDefaultAssignmentCrash.js @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/jsDeclarationExportDefaultAssignmentCrash.ts] //// + +//// [index.js] +exports.default = () => { + return 1234; +} + + +//// [index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +export var default = () => { + return 1234; +}; +exports.default = () => { + return 1234; +}; + + +//// [index.d.ts] +declare const _default: () => number; +export default _default; diff --git a/testdata/baselines/reference/compiler/jsDeclarationExportDefaultAssignmentCrash.symbols b/testdata/baselines/reference/compiler/jsDeclarationExportDefaultAssignmentCrash.symbols new file mode 100644 index 0000000000..d6854289de --- /dev/null +++ b/testdata/baselines/reference/compiler/jsDeclarationExportDefaultAssignmentCrash.symbols @@ -0,0 +1,11 @@ +//// [tests/cases/compiler/jsDeclarationExportDefaultAssignmentCrash.ts] //// + +=== index.js === +exports.default = () => { +>exports.default : Symbol(default, Decl(index.js, 0, 0)) +>exports : Symbol("index", Decl(index.js, 0, 0)) +>default : Symbol(default, Decl(index.js, 0, 0)) + + return 1234; +} + diff --git a/testdata/baselines/reference/compiler/jsDeclarationExportDefaultAssignmentCrash.types b/testdata/baselines/reference/compiler/jsDeclarationExportDefaultAssignmentCrash.types new file mode 100644 index 0000000000..91e2e5fc03 --- /dev/null +++ b/testdata/baselines/reference/compiler/jsDeclarationExportDefaultAssignmentCrash.types @@ -0,0 +1,14 @@ +//// [tests/cases/compiler/jsDeclarationExportDefaultAssignmentCrash.ts] //// + +=== index.js === +exports.default = () => { +>exports.default = () => { return 1234;} : () => number +>exports.default : () => number +>exports : typeof import("index") +>default : () => number +>() => { return 1234;} : () => number + + return 1234; +>1234 : 1234 +} + diff --git a/testdata/tests/cases/compiler/jsDeclarationExportDefaultAssignmentCrash.ts b/testdata/tests/cases/compiler/jsDeclarationExportDefaultAssignmentCrash.ts new file mode 100644 index 0000000000..9ffac97175 --- /dev/null +++ b/testdata/tests/cases/compiler/jsDeclarationExportDefaultAssignmentCrash.ts @@ -0,0 +1,9 @@ +// @allowJs: true +// @checkJs: true +// @outDir: ./out +// @declaration: true +// @filename: index.js + +exports.default = () => { + return 1234; +} From 7523927ba375ae0396ff35ee958bc6f6d3f5d976 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Mon, 27 Oct 2025 13:29:39 -0700 Subject: [PATCH 2/3] KindCommonJSExport handling baseline diffs --- .../FindReferencesAfterEdit.baseline.jsonc | 36 + .../DeprecatedInheritedJSDocOverload.baseline | 53 + ...foCircularInstantiationExpression.baseline | 30 + ...oDisplayPartsTypeParameterInClass.baseline | 1008 +++++++++++ ...splayPartsTypeParameterInFunction.baseline | 300 ++++ ...playPartsTypeParameterInInterface.baseline | 1582 +++++++++++++++++ .../jsExportAssignmentNonMutableLocation.js | 2 +- ...ExportAssignmentNonMutableLocation.js.diff | 2 +- .../submodule/compiler/modulePreserve4.js | 9 +- .../compiler/modulePreserve4.js.diff | 11 +- .../conformance/assignmentToVoidZero1.js | 7 +- .../conformance/assignmentToVoidZero1.js.diff | 7 +- .../conformance/assignmentToVoidZero2.js | 5 +- .../conformance/assignmentToVoidZero2.js.diff | 5 +- .../conformance/commonJSAliasedExport.js | 3 +- .../conformance/commonJSAliasedExport.js.diff | 10 +- .../commonJSImportClassTypeReference.js | 6 +- .../commonJSImportClassTypeReference.js.diff | 8 +- .../commonJSImportExportedClassExpression.js | 7 +- ...monJSImportExportedClassExpression.js.diff | 8 +- .../commonJSImportNestedClassTypeReference.js | 7 +- ...onJSImportNestedClassTypeReference.js.diff | 13 +- .../jsDeclarationsClassExtendsVisibility.js | 5 +- ...DeclarationsClassExtendsVisibility.js.diff | 5 +- .../conformance/jsDeclarationsClassStatic.js | 5 +- .../jsDeclarationsClassStatic.js.diff | 8 +- .../jsDeclarationsCrossfileMerge.js | 2 +- .../jsDeclarationsCrossfileMerge.js.diff | 2 +- ...AssignedClassExpressionAnonymousWithSub.js | 8 +- ...nedClassExpressionAnonymousWithSub.js.diff | 8 +- ...sExportAssignedClassExpressionShadowing.js | 2 +- ...rtAssignedClassExpressionShadowing.js.diff | 2 +- ...eclarationsExportAssignedClassInstance3.js | 2 +- ...ationsExportAssignedClassInstance3.js.diff | 2 +- ...ationsExportAssignedConstructorFunction.js | 19 +- ...sExportAssignedConstructorFunction.js.diff | 19 +- ...xportAssignedConstructorFunctionWithSub.js | 2 +- ...AssignedConstructorFunctionWithSub.js.diff | 2 +- ...ExportAssignmentExpressionPlusSecondary.js | 5 +- ...tAssignmentExpressionPlusSecondary.js.diff | 5 +- .../conformance/jsDeclarationsExportForms.js | 45 +- .../jsDeclarationsExportForms.js.diff | 45 +- .../jsDeclarationsExportSubAssignments.js | 5 +- ...jsDeclarationsExportSubAssignments.js.diff | 5 +- .../conformance/jsDeclarationsFunctionsCjs.js | 50 +- .../jsDeclarationsFunctionsCjs.js.diff | 71 +- ...onsImportAliasExposedWithinNamespaceCjs.js | 9 +- ...portAliasExposedWithinNamespaceCjs.js.diff | 26 +- .../jsDeclarationsTypeReferences3.js | 3 +- .../jsDeclarationsTypeReferences3.js.diff | 3 +- ...oduleExportAliasElementAccessExpression.js | 29 +- ...ExportAliasElementAccessExpression.js.diff | 29 +- .../conformance/moduleExportDuplicateAlias.js | 5 +- .../moduleExportDuplicateAlias.js.diff | 5 +- .../moduleExportDuplicateAlias2.js | 7 +- .../moduleExportDuplicateAlias2.js.diff | 7 +- .../moduleExportDuplicateAlias3.js | 11 +- .../moduleExportDuplicateAlias3.js.diff | 11 +- .../moduleExportsElementAccessAssignment.js | 23 +- ...duleExportsElementAccessAssignment.js.diff | 23 +- .../nestedDestructuringOfRequire.js | 5 +- .../nestedDestructuringOfRequire.js.diff | 5 +- 62 files changed, 3313 insertions(+), 331 deletions(-) create mode 100644 testdata/baselines/reference/fourslash/findAllRef/FindReferencesAfterEdit.baseline.jsonc create mode 100644 testdata/baselines/reference/fourslash/hover/DeprecatedInheritedJSDocOverload.baseline create mode 100644 testdata/baselines/reference/fourslash/hover/QuickInfoCircularInstantiationExpression.baseline create mode 100644 testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInClass.baseline create mode 100644 testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInFunction.baseline create mode 100644 testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInInterface.baseline diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindReferencesAfterEdit.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindReferencesAfterEdit.baseline.jsonc new file mode 100644 index 0000000000..9123c0f239 --- /dev/null +++ b/testdata/baselines/reference/fourslash/findAllRef/FindReferencesAfterEdit.baseline.jsonc @@ -0,0 +1,36 @@ +// === findAllReferences === +// === /a.ts === + +// interface A { +// /*FIND ALL REFS*/[|foo|]: string; +// } + + +// === /b.ts === + +// /// +// +// +// function foo(x: A) { +// x.[|foo|] +// } + + + + +// === findAllReferences === +// === /a.ts === + +// interface A { +// [|foo|]: string; +// } + + +// === /b.ts === + +// /// +// +// +// function foo(x: A) { +// x./*FIND ALL REFS*/[|foo|] +// } diff --git a/testdata/baselines/reference/fourslash/hover/DeprecatedInheritedJSDocOverload.baseline b/testdata/baselines/reference/fourslash/hover/DeprecatedInheritedJSDocOverload.baseline new file mode 100644 index 0000000000..978f95fdd2 --- /dev/null +++ b/testdata/baselines/reference/fourslash/hover/DeprecatedInheritedJSDocOverload.baseline @@ -0,0 +1,53 @@ +// === QuickInfo === +=== /deprecatedInheritedJSDocOverload.ts === +// interface PartialObserver {} +// interface Subscription {} +// interface Unsubscribable {} +// +// export interface Subscribable { +// subscribe(observer?: PartialObserver): Unsubscribable; +// /** @deprecated Base deprecation 1 */ +// subscribe(next: null | undefined, error: null | undefined, complete: () => void): Unsubscribable; +// /** @deprecated Base deprecation 2 */ +// subscribe(next: null | undefined, error: (error: any) => void, complete?: () => void): Unsubscribable; +// /** @deprecated Base deprecation 3 */ +// subscribe(next: (value: T) => void, error: null | undefined, complete: () => void): Unsubscribable; +// subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Unsubscribable; +// } +// interface ThingWithDeprecations extends Subscribable { +// subscribe(observer?: PartialObserver): Subscription; +// /** @deprecated 'real' deprecation */ +// subscribe(next: null | undefined, error: null | undefined, complete: () => void): Subscription; +// /** @deprecated 'real' deprecation */ +// subscribe(next: null | undefined, error: (error: any) => void, complete?: () => void): Subscription; +// } +// declare const a: ThingWithDeprecations +// a.subscribe(() => { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) ThingWithDeprecations.subscribe(observer?: PartialObserver): Subscription +// | ``` +// | +// | ---------------------------------------------------------------------- +// console.log('something happened'); +// }); +[ + { + "marker": { + "Position": 1183, + "LSPosition": { + "line": 22, + "character": 11 + }, + "Name": "", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) ThingWithDeprecations.subscribe(observer?: PartialObserver): Subscription\n```\n" + } + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoCircularInstantiationExpression.baseline b/testdata/baselines/reference/fourslash/hover/QuickInfoCircularInstantiationExpression.baseline new file mode 100644 index 0000000000..9ec003e93f --- /dev/null +++ b/testdata/baselines/reference/fourslash/hover/QuickInfoCircularInstantiationExpression.baseline @@ -0,0 +1,30 @@ +// === QuickInfo === +=== /quickInfoCircularInstantiationExpression.ts === +// declare function foo(t: T): typeof foo; +// foo(""); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function foo(t: T): (t: T) => ... +// | ``` +// | +// | ---------------------------------------------------------------------- +[ + { + "marker": { + "Position": 46, + "LSPosition": { + "line": 1, + "character": 0 + }, + "Name": "", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction foo(t: T): (t: T) => ...\n```\n" + } + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInClass.baseline b/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInClass.baseline new file mode 100644 index 0000000000..942f5396f2 --- /dev/null +++ b/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInClass.baseline @@ -0,0 +1,1008 @@ +// === QuickInfo === +=== /quickInfoDisplayPartsTypeParameterInClass.ts === +// class c { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | class c +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T +// | ``` +// | +// | ---------------------------------------------------------------------- +// constructor(a: T) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | constructor c(a: T): c +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: T +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// method(a: U, b: T) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) c.method(a: U, b: T): U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: T +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T +// | ``` +// | +// | ---------------------------------------------------------------------- +// return a; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// } +// var cInstance = new c("Hello"); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var cInstance: c +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | constructor c(a: T): c +// | ``` +// | +// | ---------------------------------------------------------------------- +// var cVal = c; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var cVal: typeof c +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | class c +// | ``` +// | +// | ---------------------------------------------------------------------- +// cInstance.method("hello", "cello"); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var cInstance: c +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) c.method<"hello">(a: U, b: T): "hello" +// | ``` +// | +// | ---------------------------------------------------------------------- +// class c2> { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | class c2> +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T extends c +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | class c +// | ``` +// | +// | ---------------------------------------------------------------------- +// constructor(a: T) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | constructor c2>(a: T): c2 +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: T +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T extends c +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// method>(a: U, b: T) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) c2.method>(a: U, b: T): U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U extends c +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | class c +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U extends c +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: T +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T extends c +// | ``` +// | +// | ---------------------------------------------------------------------- +// return a; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// } +// var cInstance1 = new c2(cInstance); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var cInstance1: c2> +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | constructor c2>(a: T): c2> +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var cInstance: c +// | ``` +// | +// | ---------------------------------------------------------------------- +// var cVal2 = c2; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var cVal2: typeof c2 +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | class c2> +// | ``` +// | +// | ---------------------------------------------------------------------- +// cInstance1.method(cInstance, cInstance); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var cInstance1: c2> +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) c2.method>(a: U, b: T): c +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var cInstance: c +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var cInstance: c +// | ``` +// | +// | ---------------------------------------------------------------------- +[ + { + "marker": { + "Position": 6, + "LSPosition": { + "line": 0, + "character": 6 + }, + "Name": "1", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nclass c\n```\n" + } + } + }, + { + "marker": { + "Position": 8, + "LSPosition": { + "line": 0, + "character": 8 + }, + "Name": "2", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T\n```\n" + } + } + }, + { + "marker": { + "Position": 17, + "LSPosition": { + "line": 1, + "character": 4 + }, + "Name": "3", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nconstructor c(a: T): c\n```\n" + } + } + }, + { + "marker": { + "Position": 29, + "LSPosition": { + "line": 1, + "character": 16 + }, + "Name": "4", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: T\n```\n" + } + } + }, + { + "marker": { + "Position": 32, + "LSPosition": { + "line": 1, + "character": 19 + }, + "Name": "5", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T\n```\n" + } + } + }, + { + "marker": { + "Position": 47, + "LSPosition": { + "line": 3, + "character": 4 + }, + "Name": "6", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) c.method(a: U, b: T): U\n```\n" + } + } + }, + { + "marker": { + "Position": 54, + "LSPosition": { + "line": 3, + "character": 11 + }, + "Name": "7", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U\n```\n" + } + } + }, + { + "marker": { + "Position": 57, + "LSPosition": { + "line": 3, + "character": 14 + }, + "Name": "8", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 60, + "LSPosition": { + "line": 3, + "character": 17 + }, + "Name": "9", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U\n```\n" + } + } + }, + { + "marker": { + "Position": 63, + "LSPosition": { + "line": 3, + "character": 20 + }, + "Name": "10", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: T\n```\n" + } + } + }, + { + "marker": { + "Position": 66, + "LSPosition": { + "line": 3, + "character": 23 + }, + "Name": "11", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T\n```\n" + } + } + }, + { + "marker": { + "Position": 86, + "LSPosition": { + "line": 4, + "character": 15 + }, + "Name": "12", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 101, + "LSPosition": { + "line": 7, + "character": 4 + }, + "Name": "13", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar cInstance: c\n```\n" + } + } + }, + { + "marker": { + "Position": 117, + "LSPosition": { + "line": 7, + "character": 20 + }, + "Name": "14", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nconstructor c(a: T): c\n```\n" + } + } + }, + { + "marker": { + "Position": 133, + "LSPosition": { + "line": 8, + "character": 4 + }, + "Name": "15", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar cVal: typeof c\n```\n" + } + } + }, + { + "marker": { + "Position": 140, + "LSPosition": { + "line": 8, + "character": 11 + }, + "Name": "16", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nclass c\n```\n" + } + } + }, + { + "marker": { + "Position": 143, + "LSPosition": { + "line": 9, + "character": 0 + }, + "Name": "17", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar cInstance: c\n```\n" + } + } + }, + { + "marker": { + "Position": 153, + "LSPosition": { + "line": 9, + "character": 10 + }, + "Name": "18", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) c.method<\"hello\">(a: U, b: T): \"hello\"\n```\n" + } + } + }, + { + "marker": { + "Position": 185, + "LSPosition": { + "line": 10, + "character": 6 + }, + "Name": "19", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nclass c2>\n```\n" + } + } + }, + { + "marker": { + "Position": 188, + "LSPosition": { + "line": 10, + "character": 9 + }, + "Name": "20", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T extends c\n```\n" + } + } + }, + { + "marker": { + "Position": 198, + "LSPosition": { + "line": 10, + "character": 19 + }, + "Name": "21", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nclass c\n```\n" + } + } + }, + { + "marker": { + "Position": 215, + "LSPosition": { + "line": 11, + "character": 4 + }, + "Name": "22", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nconstructor c2>(a: T): c2\n```\n" + } + } + }, + { + "marker": { + "Position": 227, + "LSPosition": { + "line": 11, + "character": 16 + }, + "Name": "23", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: T\n```\n" + } + } + }, + { + "marker": { + "Position": 230, + "LSPosition": { + "line": 11, + "character": 19 + }, + "Name": "24", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T extends c\n```\n" + } + } + }, + { + "marker": { + "Position": 245, + "LSPosition": { + "line": 13, + "character": 4 + }, + "Name": "25", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) c2.method>(a: U, b: T): U\n```\n" + } + } + }, + { + "marker": { + "Position": 252, + "LSPosition": { + "line": 13, + "character": 11 + }, + "Name": "26", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U extends c\n```\n" + } + } + }, + { + "marker": { + "Position": 262, + "LSPosition": { + "line": 13, + "character": 21 + }, + "Name": "27", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nclass c\n```\n" + } + } + }, + { + "marker": { + "Position": 273, + "LSPosition": { + "line": 13, + "character": 32 + }, + "Name": "28", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 276, + "LSPosition": { + "line": 13, + "character": 35 + }, + "Name": "29", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U extends c\n```\n" + } + } + }, + { + "marker": { + "Position": 279, + "LSPosition": { + "line": 13, + "character": 38 + }, + "Name": "30", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: T\n```\n" + } + } + }, + { + "marker": { + "Position": 282, + "LSPosition": { + "line": 13, + "character": 41 + }, + "Name": "31", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T extends c\n```\n" + } + } + }, + { + "marker": { + "Position": 302, + "LSPosition": { + "line": 14, + "character": 15 + }, + "Name": "32", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 317, + "LSPosition": { + "line": 17, + "character": 4 + }, + "Name": "33", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar cInstance1: c2>\n```\n" + } + } + }, + { + "marker": { + "Position": 334, + "LSPosition": { + "line": 17, + "character": 21 + }, + "Name": "34", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nconstructor c2>(a: T): c2>\n```\n" + } + } + }, + { + "marker": { + "Position": 337, + "LSPosition": { + "line": 17, + "character": 24 + }, + "Name": "35", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar cInstance: c\n```\n" + } + } + }, + { + "marker": { + "Position": 353, + "LSPosition": { + "line": 18, + "character": 4 + }, + "Name": "36", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar cVal2: typeof c2\n```\n" + } + } + }, + { + "marker": { + "Position": 361, + "LSPosition": { + "line": 18, + "character": 12 + }, + "Name": "37", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nclass c2>\n```\n" + } + } + }, + { + "marker": { + "Position": 365, + "LSPosition": { + "line": 19, + "character": 0 + }, + "Name": "38", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar cInstance1: c2>\n```\n" + } + } + }, + { + "marker": { + "Position": 376, + "LSPosition": { + "line": 19, + "character": 11 + }, + "Name": "39", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) c2.method>(a: U, b: T): c\n```\n" + } + } + }, + { + "marker": { + "Position": 383, + "LSPosition": { + "line": 19, + "character": 18 + }, + "Name": "40", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar cInstance: c\n```\n" + } + } + }, + { + "marker": { + "Position": 394, + "LSPosition": { + "line": 19, + "character": 29 + }, + "Name": "41", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar cInstance: c\n```\n" + } + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInFunction.baseline b/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInFunction.baseline new file mode 100644 index 0000000000..733547f244 --- /dev/null +++ b/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInFunction.baseline @@ -0,0 +1,300 @@ +// === QuickInfo === +=== /quickInfoDisplayPartsTypeParameterInFunction.ts === +// function foo(a: U) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function foo(a: U): U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U +// | ``` +// | +// | ---------------------------------------------------------------------- +// return a; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// foo("Hello"); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function foo<"Hello">(a: U): "Hello" +// | ``` +// | +// | ---------------------------------------------------------------------- +// function foo2(a: U) { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function foo2(a: U): U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U extends string +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U extends string +// | ``` +// | +// | ---------------------------------------------------------------------- +// return a; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// foo2("hello"); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | function foo2<"hello">(a: U): "hello" +// | ``` +// | +// | ---------------------------------------------------------------------- +[ + { + "marker": { + "Position": 9, + "LSPosition": { + "line": 0, + "character": 9 + }, + "Name": "1", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction foo(a: U): U\n```\n" + } + } + }, + { + "marker": { + "Position": 13, + "LSPosition": { + "line": 0, + "character": 13 + }, + "Name": "2", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U\n```\n" + } + } + }, + { + "marker": { + "Position": 16, + "LSPosition": { + "line": 0, + "character": 16 + }, + "Name": "3", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 19, + "LSPosition": { + "line": 0, + "character": 19 + }, + "Name": "4", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U\n```\n" + } + } + }, + { + "marker": { + "Position": 35, + "LSPosition": { + "line": 1, + "character": 11 + }, + "Name": "5", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 40, + "LSPosition": { + "line": 3, + "character": 0 + }, + "Name": "6", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction foo<\"Hello\">(a: U): \"Hello\"\n```\n" + } + } + }, + { + "marker": { + "Position": 63, + "LSPosition": { + "line": 4, + "character": 9 + }, + "Name": "7", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction foo2(a: U): U\n```\n" + } + } + }, + { + "marker": { + "Position": 68, + "LSPosition": { + "line": 4, + "character": 14 + }, + "Name": "8", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U extends string\n```\n" + } + } + }, + { + "marker": { + "Position": 86, + "LSPosition": { + "line": 4, + "character": 32 + }, + "Name": "9", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 89, + "LSPosition": { + "line": 4, + "character": 35 + }, + "Name": "10", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U extends string\n```\n" + } + } + }, + { + "marker": { + "Position": 105, + "LSPosition": { + "line": 5, + "character": 11 + }, + "Name": "11", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 110, + "LSPosition": { + "line": 7, + "character": 0 + }, + "Name": "12", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nfunction foo2<\"hello\">(a: U): \"hello\"\n```\n" + } + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInInterface.baseline b/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInInterface.baseline new file mode 100644 index 0000000000..e9c1a10dd5 --- /dev/null +++ b/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInInterface.baseline @@ -0,0 +1,1582 @@ +// === QuickInfo === +=== /quickInfoDisplayPartsTypeParameterInInterface.ts === +// interface I { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | interface I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T +// | ``` +// | +// | ---------------------------------------------------------------------- +// new (a: U, b: T): U; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: T +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U +// | ``` +// | +// | ---------------------------------------------------------------------- +// (a: U, b: T): U; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: T +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U +// | ``` +// | +// | ---------------------------------------------------------------------- +// method(a: U, b: T): U; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) I.method(a: U, b: T): U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: T +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// var iVal: I; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal: I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | interface I +// | ``` +// | +// | ---------------------------------------------------------------------- +// new iVal("hello", "hello"); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal: I +// | ``` +// | +// | ---------------------------------------------------------------------- +// iVal("hello", "hello"); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal: I +// | ``` +// | +// | ---------------------------------------------------------------------- +// iVal.method("hello", "hello"); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal: I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) I.method<"hello">(a: U, b: T): "hello" +// | ``` +// | +// | ---------------------------------------------------------------------- +// interface I1> { +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | interface I1> +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T extends I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | interface I +// | ``` +// | +// | ---------------------------------------------------------------------- +// new >(a: U, b: T): U; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U extends I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | interface I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U extends I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: T +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T extends I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U extends I +// | ``` +// | +// | ---------------------------------------------------------------------- +// >(a: U, b: T): U; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U extends I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | interface I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U extends I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: T +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T extends I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U extends I +// | ``` +// | +// | ---------------------------------------------------------------------- +// method>(a: U, b: T): U; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) I1.method>(a: U, b: T): U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U extends I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | interface I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) a: U +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U extends I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (parameter) b: T +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) T extends I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (type parameter) U extends I +// | ``` +// | +// | ---------------------------------------------------------------------- +// } +// var iVal1: I1>; +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal1: I1> +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | interface I1> +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | interface I +// | ``` +// | +// | ---------------------------------------------------------------------- +// new iVal1(iVal, iVal); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal1: I1> +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal: I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal: I +// | ``` +// | +// | ---------------------------------------------------------------------- +// iVal1(iVal, iVal); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal1: I1> +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal: I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal: I +// | ``` +// | +// | ---------------------------------------------------------------------- +// iVal1.method(iVal, iVal); +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal1: I1> +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | (method) I1.method>(a: U, b: T): I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal: I +// | ``` +// | +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | ```tsx +// | var iVal: I +// | ``` +// | +// | ---------------------------------------------------------------------- +[ + { + "marker": { + "Position": 10, + "LSPosition": { + "line": 0, + "character": 10 + }, + "Name": "1", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\ninterface I\n```\n" + } + } + }, + { + "marker": { + "Position": 12, + "LSPosition": { + "line": 0, + "character": 12 + }, + "Name": "2", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T\n```\n" + } + } + }, + { + "marker": { + "Position": 26, + "LSPosition": { + "line": 1, + "character": 9 + }, + "Name": "3", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U\n```\n" + } + } + }, + { + "marker": { + "Position": 29, + "LSPosition": { + "line": 1, + "character": 12 + }, + "Name": "4", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 32, + "LSPosition": { + "line": 1, + "character": 15 + }, + "Name": "5", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U\n```\n" + } + } + }, + { + "marker": { + "Position": 35, + "LSPosition": { + "line": 1, + "character": 18 + }, + "Name": "6", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: T\n```\n" + } + } + }, + { + "marker": { + "Position": 38, + "LSPosition": { + "line": 1, + "character": 21 + }, + "Name": "7", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T\n```\n" + } + } + }, + { + "marker": { + "Position": 42, + "LSPosition": { + "line": 1, + "character": 25 + }, + "Name": "8", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U\n```\n" + } + } + }, + { + "marker": { + "Position": 50, + "LSPosition": { + "line": 2, + "character": 5 + }, + "Name": "9", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U\n```\n" + } + } + }, + { + "marker": { + "Position": 53, + "LSPosition": { + "line": 2, + "character": 8 + }, + "Name": "10", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 56, + "LSPosition": { + "line": 2, + "character": 11 + }, + "Name": "11", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U\n```\n" + } + } + }, + { + "marker": { + "Position": 59, + "LSPosition": { + "line": 2, + "character": 14 + }, + "Name": "12", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: T\n```\n" + } + } + }, + { + "marker": { + "Position": 62, + "LSPosition": { + "line": 2, + "character": 17 + }, + "Name": "13", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T\n```\n" + } + } + }, + { + "marker": { + "Position": 66, + "LSPosition": { + "line": 2, + "character": 21 + }, + "Name": "14", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U\n```\n" + } + } + }, + { + "marker": { + "Position": 73, + "LSPosition": { + "line": 3, + "character": 4 + }, + "Name": "15", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) I.method(a: U, b: T): U\n```\n" + } + } + }, + { + "marker": { + "Position": 80, + "LSPosition": { + "line": 3, + "character": 11 + }, + "Name": "16", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U\n```\n" + } + } + }, + { + "marker": { + "Position": 83, + "LSPosition": { + "line": 3, + "character": 14 + }, + "Name": "17", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 86, + "LSPosition": { + "line": 3, + "character": 17 + }, + "Name": "18", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U\n```\n" + } + } + }, + { + "marker": { + "Position": 89, + "LSPosition": { + "line": 3, + "character": 20 + }, + "Name": "19", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: T\n```\n" + } + } + }, + { + "marker": { + "Position": 92, + "LSPosition": { + "line": 3, + "character": 23 + }, + "Name": "20", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T\n```\n" + } + } + }, + { + "marker": { + "Position": 96, + "LSPosition": { + "line": 3, + "character": 27 + }, + "Name": "21", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U\n```\n" + } + } + }, + { + "marker": { + "Position": 105, + "LSPosition": { + "line": 5, + "character": 4 + }, + "Name": "22", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal: I\n```\n" + } + } + }, + { + "marker": { + "Position": 111, + "LSPosition": { + "line": 5, + "character": 10 + }, + "Name": "23", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\ninterface I\n```\n" + } + } + }, + { + "marker": { + "Position": 126, + "LSPosition": { + "line": 6, + "character": 4 + }, + "Name": "24", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal: I\n```\n" + } + } + }, + { + "marker": { + "Position": 150, + "LSPosition": { + "line": 7, + "character": 0 + }, + "Name": "25", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal: I\n```\n" + } + } + }, + { + "marker": { + "Position": 174, + "LSPosition": { + "line": 8, + "character": 0 + }, + "Name": "26", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal: I\n```\n" + } + } + }, + { + "marker": { + "Position": 179, + "LSPosition": { + "line": 8, + "character": 5 + }, + "Name": "27", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) I.method<\"hello\">(a: U, b: T): \"hello\"\n```\n" + } + } + }, + { + "marker": { + "Position": 215, + "LSPosition": { + "line": 9, + "character": 10 + }, + "Name": "28", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\ninterface I1>\n```\n" + } + } + }, + { + "marker": { + "Position": 218, + "LSPosition": { + "line": 9, + "character": 13 + }, + "Name": "29", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T extends I\n```\n" + } + } + }, + { + "marker": { + "Position": 228, + "LSPosition": { + "line": 9, + "character": 23 + }, + "Name": "30", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\ninterface I\n```\n" + } + } + }, + { + "marker": { + "Position": 250, + "LSPosition": { + "line": 10, + "character": 9 + }, + "Name": "31", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U extends I\n```\n" + } + } + }, + { + "marker": { + "Position": 260, + "LSPosition": { + "line": 10, + "character": 19 + }, + "Name": "32", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\ninterface I\n```\n" + } + } + }, + { + "marker": { + "Position": 271, + "LSPosition": { + "line": 10, + "character": 30 + }, + "Name": "33", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 274, + "LSPosition": { + "line": 10, + "character": 33 + }, + "Name": "34", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U extends I\n```\n" + } + } + }, + { + "marker": { + "Position": 277, + "LSPosition": { + "line": 10, + "character": 36 + }, + "Name": "35", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: T\n```\n" + } + } + }, + { + "marker": { + "Position": 280, + "LSPosition": { + "line": 10, + "character": 39 + }, + "Name": "36", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T extends I\n```\n" + } + } + }, + { + "marker": { + "Position": 284, + "LSPosition": { + "line": 10, + "character": 43 + }, + "Name": "37", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U extends I\n```\n" + } + } + }, + { + "marker": { + "Position": 292, + "LSPosition": { + "line": 11, + "character": 5 + }, + "Name": "38", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U extends I\n```\n" + } + } + }, + { + "marker": { + "Position": 302, + "LSPosition": { + "line": 11, + "character": 15 + }, + "Name": "39", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\ninterface I\n```\n" + } + } + }, + { + "marker": { + "Position": 313, + "LSPosition": { + "line": 11, + "character": 26 + }, + "Name": "40", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 316, + "LSPosition": { + "line": 11, + "character": 29 + }, + "Name": "41", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U extends I\n```\n" + } + } + }, + { + "marker": { + "Position": 319, + "LSPosition": { + "line": 11, + "character": 32 + }, + "Name": "42", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: T\n```\n" + } + } + }, + { + "marker": { + "Position": 322, + "LSPosition": { + "line": 11, + "character": 35 + }, + "Name": "43", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T extends I\n```\n" + } + } + }, + { + "marker": { + "Position": 326, + "LSPosition": { + "line": 11, + "character": 39 + }, + "Name": "44", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U extends I\n```\n" + } + } + }, + { + "marker": { + "Position": 333, + "LSPosition": { + "line": 12, + "character": 4 + }, + "Name": "45", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) I1.method>(a: U, b: T): U\n```\n" + } + } + }, + { + "marker": { + "Position": 340, + "LSPosition": { + "line": 12, + "character": 11 + }, + "Name": "46", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U extends I\n```\n" + } + } + }, + { + "marker": { + "Position": 350, + "LSPosition": { + "line": 12, + "character": 21 + }, + "Name": "47", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\ninterface I\n```\n" + } + } + }, + { + "marker": { + "Position": 361, + "LSPosition": { + "line": 12, + "character": 32 + }, + "Name": "48", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) a: U\n```\n" + } + } + }, + { + "marker": { + "Position": 364, + "LSPosition": { + "line": 12, + "character": 35 + }, + "Name": "49", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U extends I\n```\n" + } + } + }, + { + "marker": { + "Position": 367, + "LSPosition": { + "line": 12, + "character": 38 + }, + "Name": "50", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(parameter) b: T\n```\n" + } + } + }, + { + "marker": { + "Position": 370, + "LSPosition": { + "line": 12, + "character": 41 + }, + "Name": "51", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) T extends I\n```\n" + } + } + }, + { + "marker": { + "Position": 374, + "LSPosition": { + "line": 12, + "character": 45 + }, + "Name": "52", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(type parameter) U extends I\n```\n" + } + } + }, + { + "marker": { + "Position": 383, + "LSPosition": { + "line": 14, + "character": 4 + }, + "Name": "53", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal1: I1>\n```\n" + } + } + }, + { + "marker": { + "Position": 390, + "LSPosition": { + "line": 14, + "character": 11 + }, + "Name": "54", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\ninterface I1>\n```\n" + } + } + }, + { + "marker": { + "Position": 393, + "LSPosition": { + "line": 14, + "character": 14 + }, + "Name": "55", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\ninterface I\n```\n" + } + } + }, + { + "marker": { + "Position": 409, + "LSPosition": { + "line": 15, + "character": 4 + }, + "Name": "56", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal1: I1>\n```\n" + } + } + }, + { + "marker": { + "Position": 415, + "LSPosition": { + "line": 15, + "character": 10 + }, + "Name": "57", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal: I\n```\n" + } + } + }, + { + "marker": { + "Position": 421, + "LSPosition": { + "line": 15, + "character": 16 + }, + "Name": "58", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal: I\n```\n" + } + } + }, + { + "marker": { + "Position": 428, + "LSPosition": { + "line": 16, + "character": 0 + }, + "Name": "59", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal1: I1>\n```\n" + } + } + }, + { + "marker": { + "Position": 434, + "LSPosition": { + "line": 16, + "character": 6 + }, + "Name": "60", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal: I\n```\n" + } + } + }, + { + "marker": { + "Position": 440, + "LSPosition": { + "line": 16, + "character": 12 + }, + "Name": "61", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal: I\n```\n" + } + } + }, + { + "marker": { + "Position": 447, + "LSPosition": { + "line": 17, + "character": 0 + }, + "Name": "62", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal1: I1>\n```\n" + } + } + }, + { + "marker": { + "Position": 453, + "LSPosition": { + "line": 17, + "character": 6 + }, + "Name": "63", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\n(method) I1.method>(a: U, b: T): I\n```\n" + } + } + }, + { + "marker": { + "Position": 460, + "LSPosition": { + "line": 17, + "character": 13 + }, + "Name": "64", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal: I\n```\n" + } + } + }, + { + "marker": { + "Position": 466, + "LSPosition": { + "line": 17, + "character": 19 + }, + "Name": "65", + "Data": {} + }, + "item": { + "contents": { + "kind": "markdown", + "value": "```tsx\nvar iVal: I\n```\n" + } + } + } +] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsExportAssignmentNonMutableLocation.js b/testdata/baselines/reference/submodule/compiler/jsExportAssignmentNonMutableLocation.js index 635b4c6367..7b4d092edc 100644 --- a/testdata/baselines/reference/submodule/compiler/jsExportAssignmentNonMutableLocation.js +++ b/testdata/baselines/reference/submodule/compiler/jsExportAssignmentNonMutableLocation.js @@ -17,4 +17,4 @@ declare const _default: { customSymbol: symbol; }; export = _default; -export var customSymbol2 = Symbol("custom"); +export declare var customSymbol2: symbol; diff --git a/testdata/baselines/reference/submodule/compiler/jsExportAssignmentNonMutableLocation.js.diff b/testdata/baselines/reference/submodule/compiler/jsExportAssignmentNonMutableLocation.js.diff index 4094b52ae4..9d7a1df712 100644 --- a/testdata/baselines/reference/submodule/compiler/jsExportAssignmentNonMutableLocation.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsExportAssignmentNonMutableLocation.js.diff @@ -10,4 +10,4 @@ + customSymbol: symbol; +}; +export = _default; -+export var customSymbol2 = Symbol("custom"); \ No newline at end of file ++export declare var customSymbol2: symbol; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/modulePreserve4.js b/testdata/baselines/reference/submodule/compiler/modulePreserve4.js index 1ec555552e..f9c42e3055 100644 --- a/testdata/baselines/reference/submodule/compiler/modulePreserve4.js +++ b/testdata/baselines/reference/submodule/compiler/modulePreserve4.js @@ -198,7 +198,7 @@ export {}; // Silly test harness //// [a.d.ts] export declare const x = 0; -export var y = 0; +export declare var y: number; //// [b.d.ts] declare const _default: number; export default _default; @@ -217,8 +217,8 @@ export = _default; declare const _default: number; export default _default; //// [g.d.ts] -export var default = 0; -export {}; +declare const _default: number; +export default _default; //// [main1.d.ts] export {}; //// [main2.d.mts] @@ -226,7 +226,6 @@ export {}; //// [main3.d.cts] export {}; //// [main4.d.cts] -export var x = require("./g"); -export {}; +export declare var x: typeof import("./g"); //// [dummy.d.ts] export {}; diff --git a/testdata/baselines/reference/submodule/compiler/modulePreserve4.js.diff b/testdata/baselines/reference/submodule/compiler/modulePreserve4.js.diff index 84267b6dd2..2d93a76726 100644 --- a/testdata/baselines/reference/submodule/compiler/modulePreserve4.js.diff +++ b/testdata/baselines/reference/submodule/compiler/modulePreserve4.js.diff @@ -30,7 +30,7 @@ //// [a.d.ts] -export const x: 0; +export declare const x = 0; -+export var y = 0; ++export declare var y: number; //// [b.d.ts] -declare const _default: 0; +declare const _default: number; @@ -50,18 +50,15 @@ export default _default; //// [g.d.ts] -declare const _default: 0; --export default _default; -+export var default = 0; -+export {}; ++declare const _default: number; + export default _default; //// [main1.d.ts] export {}; - //// [main2.d.mts] @@= skipped -15, +15 lines =@@ //// [main3.d.cts] export {}; //// [main4.d.cts] -export const x: typeof import("./g"); -+export var x = require("./g"); -+export {}; ++export declare var x: typeof import("./g"); //// [dummy.d.ts] export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero1.js b/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero1.js index 8a0b1128f3..54f30a42d6 100644 --- a/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero1.js +++ b/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero1.js @@ -21,7 +21,6 @@ exports.y = 2; //// [assignmentToVoidZero1.d.ts] -export var y = exports.x = void 0; -export var x = 1; -export var y = 2; -export {}; +export declare var y: undefined; +export declare var x: number; +export declare var y: undefined; diff --git a/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero1.js.diff b/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero1.js.diff index 18d553cbdf..714b31fe2a 100644 --- a/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero1.js.diff +++ b/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero1.js.diff @@ -19,7 +19,6 @@ //// [assignmentToVoidZero1.d.ts] -export const x: 1; -export const y: 2; -+export var y = exports.x = void 0; -+export var x = 1; -+export var y = 2; -+export {}; \ No newline at end of file ++export declare var y: undefined; ++export declare var x: number; ++export declare var y: undefined; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero2.js b/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero2.js index e79804a05e..9b3221fcfd 100644 --- a/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero2.js +++ b/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero2.js @@ -45,14 +45,13 @@ assignmentToVoidZero2_1.j + assignmentToVoidZero2_1.k; //// [assignmentToVoidZero2.d.ts] -export var j = 1; -export var k = void 0; +export declare var j: number; +export declare var k: undefined; declare namespace o { var x: number; } declare namespace o { var y: any; } -export {}; //// [importer.d.ts] export {}; diff --git a/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero2.js.diff b/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero2.js.diff index a08ceb9494..25462c35e7 100644 --- a/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero2.js.diff +++ b/testdata/baselines/reference/submodule/conformance/assignmentToVoidZero2.js.diff @@ -23,14 +23,13 @@ //// [assignmentToVoidZero2.d.ts] -export const j: 1; -+export var j = 1; -+export var k = void 0; ++export declare var j: number; ++export declare var k: undefined; +declare namespace o { + var x: number; +} +declare namespace o { + var y: any; +} -+export {}; //// [importer.d.ts] export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/commonJSAliasedExport.js b/testdata/baselines/reference/submodule/conformance/commonJSAliasedExport.js index 239db68d84..e612aa9e18 100644 --- a/testdata/baselines/reference/submodule/conformance/commonJSAliasedExport.js +++ b/testdata/baselines/reference/submodule/conformance/commonJSAliasedExport.js @@ -36,7 +36,8 @@ var diddy = funky(1); //// [commonJSAliasedExport.d.ts] +declare function funky(declaration: any): boolean; export = donkey; -export var funky = funky; +export declare var funky: typeof funky; //// [bug43713.d.ts] export {}; diff --git a/testdata/baselines/reference/submodule/conformance/commonJSAliasedExport.js.diff b/testdata/baselines/reference/submodule/conformance/commonJSAliasedExport.js.diff index 3d91b41bc0..f658a2e9e7 100644 --- a/testdata/baselines/reference/submodule/conformance/commonJSAliasedExport.js.diff +++ b/testdata/baselines/reference/submodule/conformance/commonJSAliasedExport.js.diff @@ -16,15 +16,17 @@ module.exports.funky = funky; //// [bug43713.js] const { funky } = require('./commonJSAliasedExport'); -@@= skipped -15, +19 lines =@@ +@@= skipped -14, +18 lines =@@ + //// [commonJSAliasedExport.d.ts] - export = donkey; +-export = donkey; -declare function donkey(ast: any): any; -declare namespace donkey { - export { funky }; -} --declare function funky(declaration: any): boolean; -+export var funky = funky; + declare function funky(declaration: any): boolean; ++export = donkey; ++export declare var funky: typeof funky; //// [bug43713.d.ts] export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/commonJSImportClassTypeReference.js b/testdata/baselines/reference/submodule/conformance/commonJSImportClassTypeReference.js index eb041a90a1..6d25b48359 100644 --- a/testdata/baselines/reference/submodule/conformance/commonJSImportClassTypeReference.js +++ b/testdata/baselines/reference/submodule/conformance/commonJSImportClassTypeReference.js @@ -36,7 +36,9 @@ function f(k) { //// [mod1.d.ts] -export var K = K; -export {}; +declare class K { + values(): K; +} +export declare var K: typeof K; //// [main.d.ts] export {}; diff --git a/testdata/baselines/reference/submodule/conformance/commonJSImportClassTypeReference.js.diff b/testdata/baselines/reference/submodule/conformance/commonJSImportClassTypeReference.js.diff index 9c2c311535..b8983fb6eb 100644 --- a/testdata/baselines/reference/submodule/conformance/commonJSImportClassTypeReference.js.diff +++ b/testdata/baselines/reference/submodule/conformance/commonJSImportClassTypeReference.js.diff @@ -19,9 +19,9 @@ //// [mod1.d.ts] -export class K { -- values(): K; --} -+export var K = K; -+export {}; ++declare class K { + values(): K; + } ++export declare var K: typeof K; //// [main.d.ts] export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/commonJSImportExportedClassExpression.js b/testdata/baselines/reference/submodule/conformance/commonJSImportExportedClassExpression.js index da4ecfbfd1..60789d061e 100644 --- a/testdata/baselines/reference/submodule/conformance/commonJSImportExportedClassExpression.js +++ b/testdata/baselines/reference/submodule/conformance/commonJSImportExportedClassExpression.js @@ -35,9 +35,10 @@ function f(k) { //// [mod1.d.ts] -export var K = class K { - values(): void; +export declare var K: { + new (): { + values(): void; + }; }; -export {}; //// [main.d.ts] export {}; diff --git a/testdata/baselines/reference/submodule/conformance/commonJSImportExportedClassExpression.js.diff b/testdata/baselines/reference/submodule/conformance/commonJSImportExportedClassExpression.js.diff index 259e8b473a..eedc85ac50 100644 --- a/testdata/baselines/reference/submodule/conformance/commonJSImportExportedClassExpression.js.diff +++ b/testdata/baselines/reference/submodule/conformance/commonJSImportExportedClassExpression.js.diff @@ -17,10 +17,12 @@ //// [mod1.d.ts] -export class K { -+export var K = class K { - values(): void; +- values(): void; -} ++export declare var K: { ++ new (): { ++ values(): void; ++ }; +}; -+export {}; //// [main.d.ts] export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/commonJSImportNestedClassTypeReference.js b/testdata/baselines/reference/submodule/conformance/commonJSImportNestedClassTypeReference.js index 39c2df78a4..bd6dfdc330 100644 --- a/testdata/baselines/reference/submodule/conformance/commonJSImportNestedClassTypeReference.js +++ b/testdata/baselines/reference/submodule/conformance/commonJSImportNestedClassTypeReference.js @@ -45,7 +45,10 @@ declare namespace NS { }; }; } -export var K = NS.K; -export {}; +export declare var K: { + new (): { + values(): /*elided*/ any; + }; +}; //// [main.d.ts] export {}; diff --git a/testdata/baselines/reference/submodule/conformance/commonJSImportNestedClassTypeReference.js.diff b/testdata/baselines/reference/submodule/conformance/commonJSImportNestedClassTypeReference.js.diff index 7dcf48b386..263c8c011e 100644 --- a/testdata/baselines/reference/submodule/conformance/commonJSImportNestedClassTypeReference.js.diff +++ b/testdata/baselines/reference/submodule/conformance/commonJSImportNestedClassTypeReference.js.diff @@ -20,17 +20,14 @@ //// [mod1.d.ts] -export var K: { -- new (): { -- values(): /*elided*/ any; +declare namespace NS { + var K: { + new (): { + values(): /*elided*/ any; + }; - }; --}; ++ }; +} -+export var K = NS.K; -+export {}; - //// [main.d.ts] - export {}; \ No newline at end of file ++export declare var K: { + new (): { + values(): /*elided*/ any; + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassExtendsVisibility.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassExtendsVisibility.js index 873919cc36..b8868c1a18 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassExtendsVisibility.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassExtendsVisibility.js @@ -38,4 +38,7 @@ module.exports.Strings = Strings; export = Bar; //// [cls.d.ts] export = Foo; -export var Strings = Strings; +export declare var Strings: { + a: string; + b: string; +}; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassExtendsVisibility.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassExtendsVisibility.js.diff index 8d3685964a..bb250feeab 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassExtendsVisibility.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassExtendsVisibility.js.diff @@ -38,4 +38,7 @@ - let a: string; - let b: string; -} -+export var Strings = Strings; \ No newline at end of file ++export declare var Strings: { ++ a: string; ++ b: string; ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassStatic.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassStatic.js index 72c30e4c2a..22db15c153 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassStatic.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassStatic.js @@ -56,7 +56,10 @@ declare namespace Handler { var statische: () => void; } export = Handler; -export var Strings = Strings; +export declare var Strings: { + a: string; + b: string; +}; export type HandlerOptions = { name: String; }; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassStatic.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassStatic.js.diff index 17b3390c8f..38da037666 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassStatic.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsClassStatic.js.diff @@ -41,13 +41,17 @@ - * Should be able to export a type alias at the same time. - */ - name: string; +-}; + var statische: () => void; +} +export = Handler; -+export var Strings = Strings; ++export declare var Strings: { ++ a: string; ++ b: string; ++}; +export type HandlerOptions = { + name: String; - }; ++}; +/** + * @typedef {Object} HandlerOptions + * @property {String} name diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsCrossfileMerge.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsCrossfileMerge.js index 43d7d8a23b..c7dda4b311 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsCrossfileMerge.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsCrossfileMerge.js @@ -34,4 +34,4 @@ export default validate; declare const m: typeof m; declare const _default: typeof m.default; export = _default; -export var memberName = "thing"; +export declare var memberName: string; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsCrossfileMerge.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsCrossfileMerge.js.diff index 3c0477cb71..909afdba18 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsCrossfileMerge.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsCrossfileMerge.js.diff @@ -28,4 +28,4 @@ +declare const m: typeof m; +declare const _default: typeof m.default; +export = _default; -+export var memberName = "thing"; \ No newline at end of file ++export declare var memberName: string; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.js index feff514416..3a002970dd 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.js @@ -46,6 +46,10 @@ declare const _default: { }; }; export = _default; -export var Sub = class { - constructor(); +export declare var Sub: { + new (): { + instance: { + t: number; + }; + }; }; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.js.diff index b8d1314888..635641bdd8 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub.js.diff @@ -45,6 +45,10 @@ + }; +}; +export = _default; -+export var Sub = class { -+ constructor(); ++export declare var Sub: { ++ new (): { ++ instance: { ++ t: number; ++ }; ++ }; +}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.js index 0d111728d1..0e6b5aa563 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.js @@ -51,4 +51,4 @@ declare const _default: { }; }; export = _default; -export var Another = Q; +export declare var Another: typeof Q; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.js.diff index 79b32ca0bf..426129727c 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionShadowing.js.diff @@ -52,4 +52,4 @@ + }; +}; +export = _default; -+export var Another = Q; \ No newline at end of file ++export declare var Another: typeof Q; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassInstance3.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassInstance3.js index b0cf369223..0d20499ae7 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassInstance3.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassInstance3.js @@ -30,4 +30,4 @@ declare class Foo { } declare const _default: Foo; export = _default; -export var additional = 20; +export declare var additional: number; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassInstance3.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassInstance3.js.diff index b674f89330..f60203ee9d 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassInstance3.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassInstance3.js.diff @@ -34,4 +34,4 @@ +} +declare const _default: Foo; +export = _default; -+export var additional = 20; \ No newline at end of file ++export declare var additional: number; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunction.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunction.js index f73905bca5..50c7df5365 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunction.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunction.js @@ -29,21 +29,4 @@ module.exports.MyClass.prototype = { //// [jsDeclarationsExportAssignedConstructorFunction.d.ts] -/** @constructor */ -export var MyClass = function ();; -export {}; - - -//// [DtsFileErrors] - - -out/jsDeclarationsExportAssignedConstructorFunction.d.ts(2,33): error TS1005: '{' expected. - - -==== out/jsDeclarationsExportAssignedConstructorFunction.d.ts (1 errors) ==== - /** @constructor */ - export var MyClass = function ();; - ~ -!!! error TS1005: '{' expected. - export {}; - \ No newline at end of file +export declare var MyClass: () => void; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunction.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunction.js.diff index 089c0e854d..a1e3ca15d5 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunction.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunction.js.diff @@ -20,21 +20,4 @@ -export class MyClass { - a: () => void; -} -+/** @constructor */ -+export var MyClass = function ();; -+export {}; -+ -+ -+//// [DtsFileErrors] -+ -+ -+out/jsDeclarationsExportAssignedConstructorFunction.d.ts(2,33): error TS1005: '{' expected. -+ -+ -+==== out/jsDeclarationsExportAssignedConstructorFunction.d.ts (1 errors) ==== -+ /** @constructor */ -+ export var MyClass = function ();; -+ ~ -+!!! error TS1005: '{' expected. -+ export {}; -+ \ No newline at end of file ++export declare var MyClass: () => void; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunctionWithSub.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunctionWithSub.js index f1fcca9856..329fb95300 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunctionWithSub.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunctionWithSub.js @@ -40,4 +40,4 @@ module.exports.Sub.prototype = {}; //// [jsDeclarationsExportAssignedConstructorFunctionWithSub.d.ts] declare const _default: (p: any) => void; export = _default; -export var Sub = function ();; +export declare var Sub: () => void; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunctionWithSub.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunctionWithSub.js.diff index 8724348065..552b990ef4 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunctionWithSub.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedConstructorFunctionWithSub.js.diff @@ -30,4 +30,4 @@ +//// [jsDeclarationsExportAssignedConstructorFunctionWithSub.d.ts] +declare const _default: (p: any) => void; +export = _default; -+export var Sub = function ();; \ No newline at end of file ++export declare var Sub: () => void; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignmentExpressionPlusSecondary.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignmentExpressionPlusSecondary.js index 1fafdc93b4..d364596b63 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignmentExpressionPlusSecondary.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignmentExpressionPlusSecondary.js @@ -49,4 +49,7 @@ declare const _default: { }; }; export = _default; -export var Strings = Strings; +export declare var Strings: { + a: string; + b: string; +}; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignmentExpressionPlusSecondary.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignmentExpressionPlusSecondary.js.diff index 65c013a360..b1e559719e 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignmentExpressionPlusSecondary.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignmentExpressionPlusSecondary.js.diff @@ -46,4 +46,7 @@ + }; +}; +export = _default; -+export var Strings = Strings; \ No newline at end of file ++export declare var Strings: { ++ a: string; ++ b: string; ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportForms.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportForms.js index 58e1e4b0ff..93fb7301b1 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportForms.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportForms.js @@ -195,11 +195,11 @@ export = _default; //// [cjs2.d.ts] export = ns; //// [cjs3.d.ts] -export var ns = ns; -export {}; +declare const ns: typeof ns; +export declare var ns: typeof ns; //// [cjs4.d.ts] -export var names = ns; -export {}; +declare const ns: typeof ns; +export declare var names: typeof ns; //// [includeAll.d.ts] import "./cjs4"; import "./cjs3"; @@ -218,9 +218,12 @@ import "./bar2"; out/cjs.d.ts(1,15): error TS2502: 'ns' is referenced directly or indirectly in its own type annotation. out/cjs2.d.ts(1,10): error TS2304: Cannot find name 'ns'. -out/cjs3.d.ts(1,17): error TS1039: Initializers are not allowed in ambient contexts. -out/cjs4.d.ts(1,20): error TS1039: Initializers are not allowed in ambient contexts. -out/cjs4.d.ts(1,20): error TS2304: Cannot find name 'ns'. +out/cjs3.d.ts(1,15): error TS2395: Individual declarations in merged declaration 'ns' must be all exported or all local. +out/cjs3.d.ts(1,15): error TS2451: Cannot redeclare block-scoped variable 'ns'. +out/cjs3.d.ts(2,20): error TS2395: Individual declarations in merged declaration 'ns' must be all exported or all local. +out/cjs3.d.ts(2,20): error TS2451: Cannot redeclare block-scoped variable 'ns'. +out/cjs3.d.ts(2,20): error TS2502: 'ns' is referenced directly or indirectly in its own type annotation. +out/cjs4.d.ts(1,15): error TS2502: 'ns' is referenced directly or indirectly in its own type annotation. ==== out/cls.d.ts (0 errors) ==== @@ -267,19 +270,25 @@ out/cjs4.d.ts(1,20): error TS2304: Cannot find name 'ns'. ~~ !!! error TS2304: Cannot find name 'ns'. -==== out/cjs3.d.ts (1 errors) ==== - export var ns = ns; - ~~ -!!! error TS1039: Initializers are not allowed in ambient contexts. - export {}; - -==== out/cjs4.d.ts (2 errors) ==== - export var names = ns; +==== out/cjs3.d.ts (5 errors) ==== + declare const ns: typeof ns; + ~~ +!!! error TS2395: Individual declarations in merged declaration 'ns' must be all exported or all local. + ~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'ns'. + export declare var ns: typeof ns; ~~ -!!! error TS1039: Initializers are not allowed in ambient contexts. +!!! error TS2395: Individual declarations in merged declaration 'ns' must be all exported or all local. ~~ -!!! error TS2304: Cannot find name 'ns'. - export {}; +!!! error TS2451: Cannot redeclare block-scoped variable 'ns'. + ~~ +!!! error TS2502: 'ns' is referenced directly or indirectly in its own type annotation. + +==== out/cjs4.d.ts (1 errors) ==== + declare const ns: typeof ns; + ~~ +!!! error TS2502: 'ns' is referenced directly or indirectly in its own type annotation. + export declare var names: typeof ns; ==== out/includeAll.d.ts (0 errors) ==== import "./cjs4"; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportForms.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportForms.js.diff index 0d7c673b3d..b1bcde6b98 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportForms.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportForms.js.diff @@ -93,13 +93,13 @@ //// [cjs3.d.ts] -export { ns }; -import ns = require("./cls"); -+export var ns = ns; -+export {}; ++declare const ns: typeof ns; ++export declare var ns: typeof ns; //// [cjs4.d.ts] -export { ns as names }; -import ns = require("./cls"); -+export var names = ns; -+export {}; ++declare const ns: typeof ns; ++export declare var names: typeof ns; //// [includeAll.d.ts] -export {}; +import "./cjs4"; @@ -119,9 +119,12 @@ + +out/cjs.d.ts(1,15): error TS2502: 'ns' is referenced directly or indirectly in its own type annotation. +out/cjs2.d.ts(1,10): error TS2304: Cannot find name 'ns'. -+out/cjs3.d.ts(1,17): error TS1039: Initializers are not allowed in ambient contexts. -+out/cjs4.d.ts(1,20): error TS1039: Initializers are not allowed in ambient contexts. -+out/cjs4.d.ts(1,20): error TS2304: Cannot find name 'ns'. ++out/cjs3.d.ts(1,15): error TS2395: Individual declarations in merged declaration 'ns' must be all exported or all local. ++out/cjs3.d.ts(1,15): error TS2451: Cannot redeclare block-scoped variable 'ns'. ++out/cjs3.d.ts(2,20): error TS2395: Individual declarations in merged declaration 'ns' must be all exported or all local. ++out/cjs3.d.ts(2,20): error TS2451: Cannot redeclare block-scoped variable 'ns'. ++out/cjs3.d.ts(2,20): error TS2502: 'ns' is referenced directly or indirectly in its own type annotation. ++out/cjs4.d.ts(1,15): error TS2502: 'ns' is referenced directly or indirectly in its own type annotation. + + +==== out/cls.d.ts (0 errors) ==== @@ -168,19 +171,25 @@ + ~~ +!!! error TS2304: Cannot find name 'ns'. + -+==== out/cjs3.d.ts (1 errors) ==== -+ export var ns = ns; -+ ~~ -+!!! error TS1039: Initializers are not allowed in ambient contexts. -+ export {}; -+ -+==== out/cjs4.d.ts (2 errors) ==== -+ export var names = ns; ++==== out/cjs3.d.ts (5 errors) ==== ++ declare const ns: typeof ns; ++ ~~ ++!!! error TS2395: Individual declarations in merged declaration 'ns' must be all exported or all local. ++ ~~ ++!!! error TS2451: Cannot redeclare block-scoped variable 'ns'. ++ export declare var ns: typeof ns; + ~~ -+!!! error TS1039: Initializers are not allowed in ambient contexts. ++!!! error TS2395: Individual declarations in merged declaration 'ns' must be all exported or all local. + ~~ -+!!! error TS2304: Cannot find name 'ns'. -+ export {}; ++!!! error TS2451: Cannot redeclare block-scoped variable 'ns'. ++ ~~ ++!!! error TS2502: 'ns' is referenced directly or indirectly in its own type annotation. ++ ++==== out/cjs4.d.ts (1 errors) ==== ++ declare const ns: typeof ns; ++ ~~ ++!!! error TS2502: 'ns' is referenced directly or indirectly in its own type annotation. ++ export declare var names: typeof ns; + +==== out/includeAll.d.ts (0 errors) ==== + import "./cjs4"; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportSubAssignments.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportSubAssignments.js index 0dd0b9d043..eded4b1dac 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportSubAssignments.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportSubAssignments.js @@ -26,4 +26,7 @@ module.exports.Strings = Strings; //// [cls.d.ts] export = Foo; -export var Strings = Strings; +export declare var Strings: { + a: string; + b: string; +}; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportSubAssignments.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportSubAssignments.js.diff index 94c7fd4dbd..169cc9bb8a 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportSubAssignments.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportSubAssignments.js.diff @@ -29,4 +29,7 @@ - let a: string; - let b: string; -} -+export var Strings = Strings; \ No newline at end of file ++export declare var Strings: { ++ a: string; ++ b: string; ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionsCjs.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionsCjs.js index ae049969e2..e8f0949e96 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionsCjs.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionsCjs.js @@ -145,31 +145,33 @@ module.exports.j = function j() { }; //// [index.d.ts] -export var a = function a();; -export var b = function b();; -export var c = function c();; +export declare var a: () => void; +export declare var b: () => void; +export declare var c: () => void; +export declare var d: (a: any, b: any) => any; +export declare var e: (a: any, b: any) => any; +export declare var f: (a: any) => any; /** - * @param {number} a - * @param {number} b - * @return {string} - */ -export var d = function d(a, b);; -/** - * @template T,U - * @param {T} a - * @param {U} b - * @return {T & U} + * @param {{x: string}} a + * @param {{y: typeof module.exports.b}} b */ -export var e = function e(a, b);; +declare function g(a: { + x: string; +}, b: { + y: typeof module.exports.b; +}): any; +export declare var g: typeof g; /** - * @template T - * @param {T} a + * @param {{x: string}} a + * @param {{y: typeof module.exports.b}} b */ -export var f = function f(a);; -export var g = g; -export var h = hh; -export var i = function i();; -export var ii = module.exports.i; -export var jj = module.exports.j; -export var j = function j();; -export {}; +declare function hh(a: { + x: string; +}, b: { + y: typeof module.exports.b; +}): any; +export declare var h: typeof hh; +export declare var i: () => void; +export declare var ii: () => void; +export declare var jj: () => void; +export declare var j: () => void; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionsCjs.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionsCjs.js.diff index 6c5287fed0..014da86514 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionsCjs.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsFunctionsCjs.js.diff @@ -105,56 +105,45 @@ -export function j(): void; -declare class Cls { -} --/** -- * @param {{x: string}} a -- * @param {{y: typeof module.exports.b}} b -- */ ++export declare var a: () => void; ++export declare var b: () => void; ++export declare var c: () => void; ++export declare var d: (a: any, b: any) => any; ++export declare var e: (a: any, b: any) => any; ++export declare var f: (a: any) => any; + /** + * @param {{x: string}} a + * @param {{y: typeof module.exports.b}} b + */ -export function g(a: { -- x: string; --}, b: { ++declare function g(a: { + x: string; + }, b: { - y: { - (): void; - cat: string; - }; -}): void; --/** -- * @param {{x: string}} a -- * @param {{y: typeof module.exports.b}} b -- */ --declare function hh(a: { -- x: string; --}, b: { ++ y: typeof module.exports.b; ++}): any; ++export declare var g: typeof g; + /** + * @param {{x: string}} a + * @param {{y: typeof module.exports.b}} b +@@= skipped -48, +38 lines =@@ + declare function hh(a: { + x: string; + }, b: { - y: { - (): void; - cat: string; - }; -}): void; -export { hh as h, i as ii, j as jj }; -+export var a = function a();; -+export var b = function b();; -+export var c = function c();; -+/** -+ * @param {number} a -+ * @param {number} b -+ * @return {string} -+ */ -+export var d = function d(a, b);; -+/** -+ * @template T,U -+ * @param {T} a -+ * @param {U} b -+ * @return {T & U} -+ */ -+export var e = function e(a, b);; -+/** -+ * @template T -+ * @param {T} a -+ */ -+export var f = function f(a);; -+export var g = g; -+export var h = hh; -+export var i = function i();; -+export var ii = module.exports.i; -+export var jj = module.exports.j; -+export var j = function j();; -+export {}; \ No newline at end of file ++ y: typeof module.exports.b; ++}): any; ++export declare var h: typeof hh; ++export declare var i: () => void; ++export declare var ii: () => void; ++export declare var jj: () => void; ++export declare var j: () => void; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.js index 55d6a0df23..ba40b630ab 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.js @@ -60,14 +60,7 @@ export type myTypes = { prop2: string; }; export type myTypes = myTypes.typeB | Function; -/** @typedef {string|RegExp|Array} myTypes.typeA */ -/** - * @typedef myTypes.typeB - * @property {myTypes.typeA} prop1 - Prop 1. - * @property {string} prop2 - Prop 2. - */ -/** @typedef {myTypes.typeB|Function} myTypes.typeC */ -export var myTypes = myTypes; +export declare var myTypes: any; //// [file2.d.ts] export type testFnTypes = boolean | myTypes.typeC; /** @typedef {boolean|myTypes.typeC} testFnTypes.input */ diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.js.diff index ff18b56816..bf77c50f99 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsImportAliasExposedWithinNamespaceCjs.js.diff @@ -4,24 +4,18 @@ //// [file.d.ts] -+export type myTypes = string | RegExp | Array; -+export type myTypes = { -+ prop1: myTypes.typeA; -+ prop2: string; -+}; -+export type myTypes = myTypes.typeB | Function; -+/** @typedef {string|RegExp|Array} myTypes.typeA */ - /** +-/** - * @namespace myTypes - * @global - * @type {Object} -+ * @typedef myTypes.typeB -+ * @property {myTypes.typeA} prop1 - Prop 1. -+ * @property {string} prop2 - Prop 2. - */ +- */ -export const myTypes: { - [x: string]: any; --}; ++export type myTypes = string | RegExp | Array; ++export type myTypes = { ++ prop1: myTypes.typeA; ++ prop2: string; + }; -export namespace myTypes { - type typeA = string | RegExp | Array; - type typeB = { @@ -36,14 +30,14 @@ - }; - type typeC = myTypes.typeB | Function; -} -+/** @typedef {myTypes.typeB|Function} myTypes.typeC */ -+export var myTypes = myTypes; ++export type myTypes = myTypes.typeB | Function; ++export declare var myTypes: any; //// [file2.d.ts] +export type testFnTypes = boolean | myTypes.typeC; /** @typedef {boolean|myTypes.typeC} testFnTypes.input */ /** * @function testFn -@@= skipped -30, +23 lines =@@ +@@= skipped -30, +16 lines =@@ * @param {testFnTypes.input} input - Input. * @returns {number|null} Result. */ diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences3.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences3.js index 1dca157bd6..c948d564f2 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences3.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences3.js @@ -27,5 +27,4 @@ module.exports.A.B = { //// [index.d.ts] -export var A = {}; -export {}; +export declare var A: {}; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences3.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences3.js.diff index bfcbf6de4d..f59bab52aa 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences3.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences3.js.diff @@ -23,5 +23,4 @@ -} -import Something_1 = require("fs"); -import Something = Something_1.Something; -+export var A = {}; -+export {}; \ No newline at end of file ++export declare var A: {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportAliasElementAccessExpression.js b/testdata/baselines/reference/submodule/conformance/moduleExportAliasElementAccessExpression.js index 184cf4cb72..65b2dbedb4 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportAliasElementAccessExpression.js +++ b/testdata/baselines/reference/submodule/conformance/moduleExportAliasElementAccessExpression.js @@ -20,27 +20,8 @@ exports["Does not work yet"] = D; //// [moduleExportAliasElementAccessExpression.d.ts] -export var D = D; -export var Does not work yet = D; -export {}; - - -//// [DtsFileErrors] - - -out/moduleExportAliasElementAccessExpression.d.ts(2,17): error TS1005: ',' expected. -out/moduleExportAliasElementAccessExpression.d.ts(2,21): error TS1005: ',' expected. -out/moduleExportAliasElementAccessExpression.d.ts(2,26): error TS1005: ',' expected. - - -==== out/moduleExportAliasElementAccessExpression.d.ts (3 errors) ==== - export var D = D; - export var Does not work yet = D; - ~~~ -!!! error TS1005: ',' expected. - ~~~~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS1005: ',' expected. - export {}; - \ No newline at end of file +declare function D(): void; +declare const _exported: typeof D; +export { _exported as "D" }; +declare const _exported_1: typeof D; +export { _exported_1 as "Does not work yet" }; diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportAliasElementAccessExpression.js.diff b/testdata/baselines/reference/submodule/conformance/moduleExportAliasElementAccessExpression.js.diff index 7783a7eb3e..5d2f55b2a9 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportAliasElementAccessExpression.js.diff +++ b/testdata/baselines/reference/submodule/conformance/moduleExportAliasElementAccessExpression.js.diff @@ -18,27 +18,8 @@ //// [moduleExportAliasElementAccessExpression.d.ts] -export function D(): void; -export { D as _Does_not_work_yet }; -+export var D = D; -+export var Does not work yet = D; -+export {}; -+ -+ -+//// [DtsFileErrors] -+ -+ -+out/moduleExportAliasElementAccessExpression.d.ts(2,17): error TS1005: ',' expected. -+out/moduleExportAliasElementAccessExpression.d.ts(2,21): error TS1005: ',' expected. -+out/moduleExportAliasElementAccessExpression.d.ts(2,26): error TS1005: ',' expected. -+ -+ -+==== out/moduleExportAliasElementAccessExpression.d.ts (3 errors) ==== -+ export var D = D; -+ export var Does not work yet = D; -+ ~~~ -+!!! error TS1005: ',' expected. -+ ~~~~ -+!!! error TS1005: ',' expected. -+ ~~~ -+!!! error TS1005: ',' expected. -+ export {}; -+ \ No newline at end of file ++declare function D(): void; ++declare const _exported: typeof D; ++export { _exported as "D" }; ++declare const _exported_1: typeof D; ++export { _exported_1 as "Does not work yet" }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias.js b/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias.js index 5efb46cf66..4ee7030d20 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias.js +++ b/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias.js @@ -29,8 +29,7 @@ apply(); //// [moduleExportAliasDuplicateAlias.d.ts] -export var apply = undefined; -export var apply = a; -export {}; +export declare var apply: undefined; +export declare var apply: undefined; //// [test.d.ts] export {}; diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias.js.diff b/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias.js.diff index 1f6798aa2b..da8d0fc2d2 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias.js.diff +++ b/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias.js.diff @@ -19,8 +19,7 @@ //// [moduleExportAliasDuplicateAlias.d.ts] -export { a as apply }; -declare function a(): void; -+export var apply = undefined; -+export var apply = a; -+export {}; ++export declare var apply: undefined; ++export declare var apply: undefined; //// [test.d.ts] export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias2.js b/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias2.js index 32cd447fba..464a441258 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias2.js +++ b/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias2.js @@ -30,9 +30,8 @@ apply(); //// [moduleExportAliasDuplicateAlias.d.ts] -export var apply = undefined; -export var apply = a; -export var apply = a; -export {}; +export declare var apply: undefined; +export declare var apply: undefined; +export declare var apply: undefined; //// [test.d.ts] export {}; diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias2.js.diff b/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias2.js.diff index 547d966ad9..51dfb3c53a 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias2.js.diff +++ b/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias2.js.diff @@ -20,9 +20,8 @@ //// [moduleExportAliasDuplicateAlias.d.ts] -export { a as apply }; -declare function a(): void; -+export var apply = undefined; -+export var apply = a; -+export var apply = a; -+export {}; ++export declare var apply: undefined; ++export declare var apply: undefined; ++export declare var apply: undefined; //// [test.d.ts] export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias3.js b/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias3.js index ca8ba75bb5..1826f857f2 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias3.js +++ b/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias3.js @@ -38,11 +38,10 @@ const result = apply.toFixed(); //// [moduleExportAliasDuplicateAlias.d.ts] -export var apply = undefined; -export var apply = undefined; -export var apply = a; -export var apply = 'ok'; -export var apply = 1; -export {}; +export declare var apply: undefined; +export declare var apply: undefined; +export declare var apply: undefined; +export declare var apply: undefined; +export declare var apply: undefined; //// [test.d.ts] export {}; diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias3.js.diff b/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias3.js.diff index 031199c202..e091ce0595 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias3.js.diff +++ b/testdata/baselines/reference/submodule/conformance/moduleExportDuplicateAlias3.js.diff @@ -27,11 +27,10 @@ -export const apply: "ok" | 1 | typeof a | undefined; -export { a as apply }; -declare function a(): void; -+export var apply = undefined; -+export var apply = undefined; -+export var apply = a; -+export var apply = 'ok'; -+export var apply = 1; -+export {}; ++export declare var apply: undefined; ++export declare var apply: undefined; ++export declare var apply: undefined; ++export declare var apply: undefined; ++export declare var apply: undefined; //// [test.d.ts] export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportsElementAccessAssignment.js b/testdata/baselines/reference/submodule/conformance/moduleExportsElementAccessAssignment.js index 5e70503425..fd6eb83ea9 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportsElementAccessAssignment.js +++ b/testdata/baselines/reference/submodule/conformance/moduleExportsElementAccessAssignment.js @@ -20,11 +20,22 @@ mod1.default; //// [mod1.d.ts] -export var a = { x: "x" }; -export var b = { x: "x" }; -export var default = { x: "x" }; -export var c = { x: "x" }; -export var d = {}; -export {}; +export declare var a: { + x: string; +}; +declare const _exported: { + x: string; +}; +export { _exported as "b" }; +declare const _exported_1: { + x: string; +}; +export { _exported_1 as "default" }; +declare const _exported_2: { + x: string; +}; +export { _exported_2 as "c" }; +declare const _exported_3: {}; +export { _exported_3 as "d" }; //// [mod2.d.ts] export {}; diff --git a/testdata/baselines/reference/submodule/conformance/moduleExportsElementAccessAssignment.js.diff b/testdata/baselines/reference/submodule/conformance/moduleExportsElementAccessAssignment.js.diff index 5c413072ad..68d3a6f598 100644 --- a/testdata/baselines/reference/submodule/conformance/moduleExportsElementAccessAssignment.js.diff +++ b/testdata/baselines/reference/submodule/conformance/moduleExportsElementAccessAssignment.js.diff @@ -23,11 +23,22 @@ -export namespace d { - let e: number; -} -+export var a = { x: "x" }; -+export var b = { x: "x" }; -+export var default = { x: "x" }; -+export var c = { x: "x" }; -+export var d = {}; -+export {}; ++export declare var a: { ++ x: string; ++}; ++declare const _exported: { ++ x: string; ++}; ++export { _exported as "b" }; ++declare const _exported_1: { ++ x: string; ++}; ++export { _exported_1 as "default" }; ++declare const _exported_2: { ++ x: string; ++}; ++export { _exported_2 as "c" }; ++declare const _exported_3: {}; ++export { _exported_3 as "d" }; //// [mod2.d.ts] export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/nestedDestructuringOfRequire.js b/testdata/baselines/reference/submodule/conformance/nestedDestructuringOfRequire.js index 2d323ea43f..ea7a565f31 100644 --- a/testdata/baselines/reference/submodule/conformance/nestedDestructuringOfRequire.js +++ b/testdata/baselines/reference/submodule/conformance/nestedDestructuringOfRequire.js @@ -29,7 +29,8 @@ chalk; //// [mod1.d.ts] -export var chalk = chalk; -export {}; +export declare var chalk: { + grey: {}; +}; //// [main.d.ts] export {}; diff --git a/testdata/baselines/reference/submodule/conformance/nestedDestructuringOfRequire.js.diff b/testdata/baselines/reference/submodule/conformance/nestedDestructuringOfRequire.js.diff index 4fdb156b6f..09d98a3c3a 100644 --- a/testdata/baselines/reference/submodule/conformance/nestedDestructuringOfRequire.js.diff +++ b/testdata/baselines/reference/submodule/conformance/nestedDestructuringOfRequire.js.diff @@ -20,7 +20,8 @@ -export namespace chalk { - let grey: {}; -} -+export var chalk = chalk; -+export {}; ++export declare var chalk: { ++ grey: {}; ++}; //// [main.d.ts] export {}; \ No newline at end of file From 7bf49261970b96c778581725bc4e72c6c021483d Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Mon, 27 Oct 2025 14:38:30 -0700 Subject: [PATCH 3/3] Remove dead baselines --- .../FindReferencesAfterEdit.baseline.jsonc | 36 - .../DeprecatedInheritedJSDocOverload.baseline | 53 - ...foCircularInstantiationExpression.baseline | 30 - ...oDisplayPartsTypeParameterInClass.baseline | 1008 ----------- ...splayPartsTypeParameterInFunction.baseline | 300 ---- ...playPartsTypeParameterInInterface.baseline | 1582 ----------------- 6 files changed, 3009 deletions(-) delete mode 100644 testdata/baselines/reference/fourslash/findAllRef/FindReferencesAfterEdit.baseline.jsonc delete mode 100644 testdata/baselines/reference/fourslash/hover/DeprecatedInheritedJSDocOverload.baseline delete mode 100644 testdata/baselines/reference/fourslash/hover/QuickInfoCircularInstantiationExpression.baseline delete mode 100644 testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInClass.baseline delete mode 100644 testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInFunction.baseline delete mode 100644 testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInInterface.baseline diff --git a/testdata/baselines/reference/fourslash/findAllRef/FindReferencesAfterEdit.baseline.jsonc b/testdata/baselines/reference/fourslash/findAllRef/FindReferencesAfterEdit.baseline.jsonc deleted file mode 100644 index 9123c0f239..0000000000 --- a/testdata/baselines/reference/fourslash/findAllRef/FindReferencesAfterEdit.baseline.jsonc +++ /dev/null @@ -1,36 +0,0 @@ -// === findAllReferences === -// === /a.ts === - -// interface A { -// /*FIND ALL REFS*/[|foo|]: string; -// } - - -// === /b.ts === - -// /// -// -// -// function foo(x: A) { -// x.[|foo|] -// } - - - - -// === findAllReferences === -// === /a.ts === - -// interface A { -// [|foo|]: string; -// } - - -// === /b.ts === - -// /// -// -// -// function foo(x: A) { -// x./*FIND ALL REFS*/[|foo|] -// } diff --git a/testdata/baselines/reference/fourslash/hover/DeprecatedInheritedJSDocOverload.baseline b/testdata/baselines/reference/fourslash/hover/DeprecatedInheritedJSDocOverload.baseline deleted file mode 100644 index 978f95fdd2..0000000000 --- a/testdata/baselines/reference/fourslash/hover/DeprecatedInheritedJSDocOverload.baseline +++ /dev/null @@ -1,53 +0,0 @@ -// === QuickInfo === -=== /deprecatedInheritedJSDocOverload.ts === -// interface PartialObserver {} -// interface Subscription {} -// interface Unsubscribable {} -// -// export interface Subscribable { -// subscribe(observer?: PartialObserver): Unsubscribable; -// /** @deprecated Base deprecation 1 */ -// subscribe(next: null | undefined, error: null | undefined, complete: () => void): Unsubscribable; -// /** @deprecated Base deprecation 2 */ -// subscribe(next: null | undefined, error: (error: any) => void, complete?: () => void): Unsubscribable; -// /** @deprecated Base deprecation 3 */ -// subscribe(next: (value: T) => void, error: null | undefined, complete: () => void): Unsubscribable; -// subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Unsubscribable; -// } -// interface ThingWithDeprecations extends Subscribable { -// subscribe(observer?: PartialObserver): Subscription; -// /** @deprecated 'real' deprecation */ -// subscribe(next: null | undefined, error: null | undefined, complete: () => void): Subscription; -// /** @deprecated 'real' deprecation */ -// subscribe(next: null | undefined, error: (error: any) => void, complete?: () => void): Subscription; -// } -// declare const a: ThingWithDeprecations -// a.subscribe(() => { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) ThingWithDeprecations.subscribe(observer?: PartialObserver): Subscription -// | ``` -// | -// | ---------------------------------------------------------------------- -// console.log('something happened'); -// }); -[ - { - "marker": { - "Position": 1183, - "LSPosition": { - "line": 22, - "character": 11 - }, - "Name": "", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) ThingWithDeprecations.subscribe(observer?: PartialObserver): Subscription\n```\n" - } - } - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoCircularInstantiationExpression.baseline b/testdata/baselines/reference/fourslash/hover/QuickInfoCircularInstantiationExpression.baseline deleted file mode 100644 index 9ec003e93f..0000000000 --- a/testdata/baselines/reference/fourslash/hover/QuickInfoCircularInstantiationExpression.baseline +++ /dev/null @@ -1,30 +0,0 @@ -// === QuickInfo === -=== /quickInfoCircularInstantiationExpression.ts === -// declare function foo(t: T): typeof foo; -// foo(""); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function foo(t: T): (t: T) => ... -// | ``` -// | -// | ---------------------------------------------------------------------- -[ - { - "marker": { - "Position": 46, - "LSPosition": { - "line": 1, - "character": 0 - }, - "Name": "", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction foo(t: T): (t: T) => ...\n```\n" - } - } - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInClass.baseline b/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInClass.baseline deleted file mode 100644 index 942f5396f2..0000000000 --- a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInClass.baseline +++ /dev/null @@ -1,1008 +0,0 @@ -// === QuickInfo === -=== /quickInfoDisplayPartsTypeParameterInClass.ts === -// class c { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | class c -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T -// | ``` -// | -// | ---------------------------------------------------------------------- -// constructor(a: T) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | constructor c(a: T): c -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: T -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// method(a: U, b: T) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) c.method(a: U, b: T): U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: T -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T -// | ``` -// | -// | ---------------------------------------------------------------------- -// return a; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// } -// var cInstance = new c("Hello"); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var cInstance: c -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | constructor c(a: T): c -// | ``` -// | -// | ---------------------------------------------------------------------- -// var cVal = c; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var cVal: typeof c -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | class c -// | ``` -// | -// | ---------------------------------------------------------------------- -// cInstance.method("hello", "cello"); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var cInstance: c -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) c.method<"hello">(a: U, b: T): "hello" -// | ``` -// | -// | ---------------------------------------------------------------------- -// class c2> { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | class c2> -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T extends c -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | class c -// | ``` -// | -// | ---------------------------------------------------------------------- -// constructor(a: T) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | constructor c2>(a: T): c2 -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: T -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T extends c -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// method>(a: U, b: T) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) c2.method>(a: U, b: T): U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U extends c -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | class c -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U extends c -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: T -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T extends c -// | ``` -// | -// | ---------------------------------------------------------------------- -// return a; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// } -// var cInstance1 = new c2(cInstance); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var cInstance1: c2> -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | constructor c2>(a: T): c2> -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var cInstance: c -// | ``` -// | -// | ---------------------------------------------------------------------- -// var cVal2 = c2; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var cVal2: typeof c2 -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | class c2> -// | ``` -// | -// | ---------------------------------------------------------------------- -// cInstance1.method(cInstance, cInstance); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var cInstance1: c2> -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) c2.method>(a: U, b: T): c -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var cInstance: c -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var cInstance: c -// | ``` -// | -// | ---------------------------------------------------------------------- -[ - { - "marker": { - "Position": 6, - "LSPosition": { - "line": 0, - "character": 6 - }, - "Name": "1", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nclass c\n```\n" - } - } - }, - { - "marker": { - "Position": 8, - "LSPosition": { - "line": 0, - "character": 8 - }, - "Name": "2", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T\n```\n" - } - } - }, - { - "marker": { - "Position": 17, - "LSPosition": { - "line": 1, - "character": 4 - }, - "Name": "3", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nconstructor c(a: T): c\n```\n" - } - } - }, - { - "marker": { - "Position": 29, - "LSPosition": { - "line": 1, - "character": 16 - }, - "Name": "4", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: T\n```\n" - } - } - }, - { - "marker": { - "Position": 32, - "LSPosition": { - "line": 1, - "character": 19 - }, - "Name": "5", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T\n```\n" - } - } - }, - { - "marker": { - "Position": 47, - "LSPosition": { - "line": 3, - "character": 4 - }, - "Name": "6", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) c.method(a: U, b: T): U\n```\n" - } - } - }, - { - "marker": { - "Position": 54, - "LSPosition": { - "line": 3, - "character": 11 - }, - "Name": "7", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U\n```\n" - } - } - }, - { - "marker": { - "Position": 57, - "LSPosition": { - "line": 3, - "character": 14 - }, - "Name": "8", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 60, - "LSPosition": { - "line": 3, - "character": 17 - }, - "Name": "9", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U\n```\n" - } - } - }, - { - "marker": { - "Position": 63, - "LSPosition": { - "line": 3, - "character": 20 - }, - "Name": "10", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: T\n```\n" - } - } - }, - { - "marker": { - "Position": 66, - "LSPosition": { - "line": 3, - "character": 23 - }, - "Name": "11", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T\n```\n" - } - } - }, - { - "marker": { - "Position": 86, - "LSPosition": { - "line": 4, - "character": 15 - }, - "Name": "12", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 101, - "LSPosition": { - "line": 7, - "character": 4 - }, - "Name": "13", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar cInstance: c\n```\n" - } - } - }, - { - "marker": { - "Position": 117, - "LSPosition": { - "line": 7, - "character": 20 - }, - "Name": "14", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nconstructor c(a: T): c\n```\n" - } - } - }, - { - "marker": { - "Position": 133, - "LSPosition": { - "line": 8, - "character": 4 - }, - "Name": "15", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar cVal: typeof c\n```\n" - } - } - }, - { - "marker": { - "Position": 140, - "LSPosition": { - "line": 8, - "character": 11 - }, - "Name": "16", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nclass c\n```\n" - } - } - }, - { - "marker": { - "Position": 143, - "LSPosition": { - "line": 9, - "character": 0 - }, - "Name": "17", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar cInstance: c\n```\n" - } - } - }, - { - "marker": { - "Position": 153, - "LSPosition": { - "line": 9, - "character": 10 - }, - "Name": "18", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) c.method<\"hello\">(a: U, b: T): \"hello\"\n```\n" - } - } - }, - { - "marker": { - "Position": 185, - "LSPosition": { - "line": 10, - "character": 6 - }, - "Name": "19", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nclass c2>\n```\n" - } - } - }, - { - "marker": { - "Position": 188, - "LSPosition": { - "line": 10, - "character": 9 - }, - "Name": "20", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T extends c\n```\n" - } - } - }, - { - "marker": { - "Position": 198, - "LSPosition": { - "line": 10, - "character": 19 - }, - "Name": "21", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nclass c\n```\n" - } - } - }, - { - "marker": { - "Position": 215, - "LSPosition": { - "line": 11, - "character": 4 - }, - "Name": "22", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nconstructor c2>(a: T): c2\n```\n" - } - } - }, - { - "marker": { - "Position": 227, - "LSPosition": { - "line": 11, - "character": 16 - }, - "Name": "23", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: T\n```\n" - } - } - }, - { - "marker": { - "Position": 230, - "LSPosition": { - "line": 11, - "character": 19 - }, - "Name": "24", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T extends c\n```\n" - } - } - }, - { - "marker": { - "Position": 245, - "LSPosition": { - "line": 13, - "character": 4 - }, - "Name": "25", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) c2.method>(a: U, b: T): U\n```\n" - } - } - }, - { - "marker": { - "Position": 252, - "LSPosition": { - "line": 13, - "character": 11 - }, - "Name": "26", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U extends c\n```\n" - } - } - }, - { - "marker": { - "Position": 262, - "LSPosition": { - "line": 13, - "character": 21 - }, - "Name": "27", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nclass c\n```\n" - } - } - }, - { - "marker": { - "Position": 273, - "LSPosition": { - "line": 13, - "character": 32 - }, - "Name": "28", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 276, - "LSPosition": { - "line": 13, - "character": 35 - }, - "Name": "29", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U extends c\n```\n" - } - } - }, - { - "marker": { - "Position": 279, - "LSPosition": { - "line": 13, - "character": 38 - }, - "Name": "30", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: T\n```\n" - } - } - }, - { - "marker": { - "Position": 282, - "LSPosition": { - "line": 13, - "character": 41 - }, - "Name": "31", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T extends c\n```\n" - } - } - }, - { - "marker": { - "Position": 302, - "LSPosition": { - "line": 14, - "character": 15 - }, - "Name": "32", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 317, - "LSPosition": { - "line": 17, - "character": 4 - }, - "Name": "33", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar cInstance1: c2>\n```\n" - } - } - }, - { - "marker": { - "Position": 334, - "LSPosition": { - "line": 17, - "character": 21 - }, - "Name": "34", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nconstructor c2>(a: T): c2>\n```\n" - } - } - }, - { - "marker": { - "Position": 337, - "LSPosition": { - "line": 17, - "character": 24 - }, - "Name": "35", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar cInstance: c\n```\n" - } - } - }, - { - "marker": { - "Position": 353, - "LSPosition": { - "line": 18, - "character": 4 - }, - "Name": "36", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar cVal2: typeof c2\n```\n" - } - } - }, - { - "marker": { - "Position": 361, - "LSPosition": { - "line": 18, - "character": 12 - }, - "Name": "37", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nclass c2>\n```\n" - } - } - }, - { - "marker": { - "Position": 365, - "LSPosition": { - "line": 19, - "character": 0 - }, - "Name": "38", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar cInstance1: c2>\n```\n" - } - } - }, - { - "marker": { - "Position": 376, - "LSPosition": { - "line": 19, - "character": 11 - }, - "Name": "39", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) c2.method>(a: U, b: T): c\n```\n" - } - } - }, - { - "marker": { - "Position": 383, - "LSPosition": { - "line": 19, - "character": 18 - }, - "Name": "40", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar cInstance: c\n```\n" - } - } - }, - { - "marker": { - "Position": 394, - "LSPosition": { - "line": 19, - "character": 29 - }, - "Name": "41", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar cInstance: c\n```\n" - } - } - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInFunction.baseline b/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInFunction.baseline deleted file mode 100644 index 733547f244..0000000000 --- a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInFunction.baseline +++ /dev/null @@ -1,300 +0,0 @@ -// === QuickInfo === -=== /quickInfoDisplayPartsTypeParameterInFunction.ts === -// function foo(a: U) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function foo(a: U): U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U -// | ``` -// | -// | ---------------------------------------------------------------------- -// return a; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// foo("Hello"); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function foo<"Hello">(a: U): "Hello" -// | ``` -// | -// | ---------------------------------------------------------------------- -// function foo2(a: U) { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function foo2(a: U): U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U extends string -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U extends string -// | ``` -// | -// | ---------------------------------------------------------------------- -// return a; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// foo2("hello"); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | function foo2<"hello">(a: U): "hello" -// | ``` -// | -// | ---------------------------------------------------------------------- -[ - { - "marker": { - "Position": 9, - "LSPosition": { - "line": 0, - "character": 9 - }, - "Name": "1", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction foo(a: U): U\n```\n" - } - } - }, - { - "marker": { - "Position": 13, - "LSPosition": { - "line": 0, - "character": 13 - }, - "Name": "2", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U\n```\n" - } - } - }, - { - "marker": { - "Position": 16, - "LSPosition": { - "line": 0, - "character": 16 - }, - "Name": "3", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 19, - "LSPosition": { - "line": 0, - "character": 19 - }, - "Name": "4", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U\n```\n" - } - } - }, - { - "marker": { - "Position": 35, - "LSPosition": { - "line": 1, - "character": 11 - }, - "Name": "5", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 40, - "LSPosition": { - "line": 3, - "character": 0 - }, - "Name": "6", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction foo<\"Hello\">(a: U): \"Hello\"\n```\n" - } - } - }, - { - "marker": { - "Position": 63, - "LSPosition": { - "line": 4, - "character": 9 - }, - "Name": "7", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction foo2(a: U): U\n```\n" - } - } - }, - { - "marker": { - "Position": 68, - "LSPosition": { - "line": 4, - "character": 14 - }, - "Name": "8", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U extends string\n```\n" - } - } - }, - { - "marker": { - "Position": 86, - "LSPosition": { - "line": 4, - "character": 32 - }, - "Name": "9", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 89, - "LSPosition": { - "line": 4, - "character": 35 - }, - "Name": "10", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U extends string\n```\n" - } - } - }, - { - "marker": { - "Position": 105, - "LSPosition": { - "line": 5, - "character": 11 - }, - "Name": "11", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 110, - "LSPosition": { - "line": 7, - "character": 0 - }, - "Name": "12", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nfunction foo2<\"hello\">(a: U): \"hello\"\n```\n" - } - } - } -] \ No newline at end of file diff --git a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInInterface.baseline b/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInInterface.baseline deleted file mode 100644 index e9c1a10dd5..0000000000 --- a/testdata/baselines/reference/fourslash/hover/QuickInfoDisplayPartsTypeParameterInInterface.baseline +++ /dev/null @@ -1,1582 +0,0 @@ -// === QuickInfo === -=== /quickInfoDisplayPartsTypeParameterInInterface.ts === -// interface I { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | interface I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T -// | ``` -// | -// | ---------------------------------------------------------------------- -// new (a: U, b: T): U; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: T -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U -// | ``` -// | -// | ---------------------------------------------------------------------- -// (a: U, b: T): U; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: T -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U -// | ``` -// | -// | ---------------------------------------------------------------------- -// method(a: U, b: T): U; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) I.method(a: U, b: T): U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: T -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// var iVal: I; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal: I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | interface I -// | ``` -// | -// | ---------------------------------------------------------------------- -// new iVal("hello", "hello"); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal: I -// | ``` -// | -// | ---------------------------------------------------------------------- -// iVal("hello", "hello"); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal: I -// | ``` -// | -// | ---------------------------------------------------------------------- -// iVal.method("hello", "hello"); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal: I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) I.method<"hello">(a: U, b: T): "hello" -// | ``` -// | -// | ---------------------------------------------------------------------- -// interface I1> { -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | interface I1> -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T extends I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | interface I -// | ``` -// | -// | ---------------------------------------------------------------------- -// new >(a: U, b: T): U; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U extends I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | interface I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U extends I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: T -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T extends I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U extends I -// | ``` -// | -// | ---------------------------------------------------------------------- -// >(a: U, b: T): U; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U extends I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | interface I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U extends I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: T -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T extends I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U extends I -// | ``` -// | -// | ---------------------------------------------------------------------- -// method>(a: U, b: T): U; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) I1.method>(a: U, b: T): U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U extends I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | interface I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) a: U -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U extends I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (parameter) b: T -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) T extends I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (type parameter) U extends I -// | ``` -// | -// | ---------------------------------------------------------------------- -// } -// var iVal1: I1>; -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal1: I1> -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | interface I1> -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | interface I -// | ``` -// | -// | ---------------------------------------------------------------------- -// new iVal1(iVal, iVal); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal1: I1> -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal: I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal: I -// | ``` -// | -// | ---------------------------------------------------------------------- -// iVal1(iVal, iVal); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal1: I1> -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal: I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal: I -// | ``` -// | -// | ---------------------------------------------------------------------- -// iVal1.method(iVal, iVal); -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal1: I1> -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | (method) I1.method>(a: U, b: T): I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal: I -// | ``` -// | -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | ```tsx -// | var iVal: I -// | ``` -// | -// | ---------------------------------------------------------------------- -[ - { - "marker": { - "Position": 10, - "LSPosition": { - "line": 0, - "character": 10 - }, - "Name": "1", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\ninterface I\n```\n" - } - } - }, - { - "marker": { - "Position": 12, - "LSPosition": { - "line": 0, - "character": 12 - }, - "Name": "2", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T\n```\n" - } - } - }, - { - "marker": { - "Position": 26, - "LSPosition": { - "line": 1, - "character": 9 - }, - "Name": "3", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U\n```\n" - } - } - }, - { - "marker": { - "Position": 29, - "LSPosition": { - "line": 1, - "character": 12 - }, - "Name": "4", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 32, - "LSPosition": { - "line": 1, - "character": 15 - }, - "Name": "5", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U\n```\n" - } - } - }, - { - "marker": { - "Position": 35, - "LSPosition": { - "line": 1, - "character": 18 - }, - "Name": "6", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: T\n```\n" - } - } - }, - { - "marker": { - "Position": 38, - "LSPosition": { - "line": 1, - "character": 21 - }, - "Name": "7", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T\n```\n" - } - } - }, - { - "marker": { - "Position": 42, - "LSPosition": { - "line": 1, - "character": 25 - }, - "Name": "8", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U\n```\n" - } - } - }, - { - "marker": { - "Position": 50, - "LSPosition": { - "line": 2, - "character": 5 - }, - "Name": "9", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U\n```\n" - } - } - }, - { - "marker": { - "Position": 53, - "LSPosition": { - "line": 2, - "character": 8 - }, - "Name": "10", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 56, - "LSPosition": { - "line": 2, - "character": 11 - }, - "Name": "11", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U\n```\n" - } - } - }, - { - "marker": { - "Position": 59, - "LSPosition": { - "line": 2, - "character": 14 - }, - "Name": "12", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: T\n```\n" - } - } - }, - { - "marker": { - "Position": 62, - "LSPosition": { - "line": 2, - "character": 17 - }, - "Name": "13", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T\n```\n" - } - } - }, - { - "marker": { - "Position": 66, - "LSPosition": { - "line": 2, - "character": 21 - }, - "Name": "14", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U\n```\n" - } - } - }, - { - "marker": { - "Position": 73, - "LSPosition": { - "line": 3, - "character": 4 - }, - "Name": "15", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) I.method(a: U, b: T): U\n```\n" - } - } - }, - { - "marker": { - "Position": 80, - "LSPosition": { - "line": 3, - "character": 11 - }, - "Name": "16", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U\n```\n" - } - } - }, - { - "marker": { - "Position": 83, - "LSPosition": { - "line": 3, - "character": 14 - }, - "Name": "17", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 86, - "LSPosition": { - "line": 3, - "character": 17 - }, - "Name": "18", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U\n```\n" - } - } - }, - { - "marker": { - "Position": 89, - "LSPosition": { - "line": 3, - "character": 20 - }, - "Name": "19", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: T\n```\n" - } - } - }, - { - "marker": { - "Position": 92, - "LSPosition": { - "line": 3, - "character": 23 - }, - "Name": "20", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T\n```\n" - } - } - }, - { - "marker": { - "Position": 96, - "LSPosition": { - "line": 3, - "character": 27 - }, - "Name": "21", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U\n```\n" - } - } - }, - { - "marker": { - "Position": 105, - "LSPosition": { - "line": 5, - "character": 4 - }, - "Name": "22", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal: I\n```\n" - } - } - }, - { - "marker": { - "Position": 111, - "LSPosition": { - "line": 5, - "character": 10 - }, - "Name": "23", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\ninterface I\n```\n" - } - } - }, - { - "marker": { - "Position": 126, - "LSPosition": { - "line": 6, - "character": 4 - }, - "Name": "24", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal: I\n```\n" - } - } - }, - { - "marker": { - "Position": 150, - "LSPosition": { - "line": 7, - "character": 0 - }, - "Name": "25", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal: I\n```\n" - } - } - }, - { - "marker": { - "Position": 174, - "LSPosition": { - "line": 8, - "character": 0 - }, - "Name": "26", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal: I\n```\n" - } - } - }, - { - "marker": { - "Position": 179, - "LSPosition": { - "line": 8, - "character": 5 - }, - "Name": "27", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) I.method<\"hello\">(a: U, b: T): \"hello\"\n```\n" - } - } - }, - { - "marker": { - "Position": 215, - "LSPosition": { - "line": 9, - "character": 10 - }, - "Name": "28", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\ninterface I1>\n```\n" - } - } - }, - { - "marker": { - "Position": 218, - "LSPosition": { - "line": 9, - "character": 13 - }, - "Name": "29", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T extends I\n```\n" - } - } - }, - { - "marker": { - "Position": 228, - "LSPosition": { - "line": 9, - "character": 23 - }, - "Name": "30", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\ninterface I\n```\n" - } - } - }, - { - "marker": { - "Position": 250, - "LSPosition": { - "line": 10, - "character": 9 - }, - "Name": "31", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U extends I\n```\n" - } - } - }, - { - "marker": { - "Position": 260, - "LSPosition": { - "line": 10, - "character": 19 - }, - "Name": "32", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\ninterface I\n```\n" - } - } - }, - { - "marker": { - "Position": 271, - "LSPosition": { - "line": 10, - "character": 30 - }, - "Name": "33", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 274, - "LSPosition": { - "line": 10, - "character": 33 - }, - "Name": "34", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U extends I\n```\n" - } - } - }, - { - "marker": { - "Position": 277, - "LSPosition": { - "line": 10, - "character": 36 - }, - "Name": "35", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: T\n```\n" - } - } - }, - { - "marker": { - "Position": 280, - "LSPosition": { - "line": 10, - "character": 39 - }, - "Name": "36", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T extends I\n```\n" - } - } - }, - { - "marker": { - "Position": 284, - "LSPosition": { - "line": 10, - "character": 43 - }, - "Name": "37", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U extends I\n```\n" - } - } - }, - { - "marker": { - "Position": 292, - "LSPosition": { - "line": 11, - "character": 5 - }, - "Name": "38", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U extends I\n```\n" - } - } - }, - { - "marker": { - "Position": 302, - "LSPosition": { - "line": 11, - "character": 15 - }, - "Name": "39", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\ninterface I\n```\n" - } - } - }, - { - "marker": { - "Position": 313, - "LSPosition": { - "line": 11, - "character": 26 - }, - "Name": "40", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 316, - "LSPosition": { - "line": 11, - "character": 29 - }, - "Name": "41", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U extends I\n```\n" - } - } - }, - { - "marker": { - "Position": 319, - "LSPosition": { - "line": 11, - "character": 32 - }, - "Name": "42", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: T\n```\n" - } - } - }, - { - "marker": { - "Position": 322, - "LSPosition": { - "line": 11, - "character": 35 - }, - "Name": "43", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T extends I\n```\n" - } - } - }, - { - "marker": { - "Position": 326, - "LSPosition": { - "line": 11, - "character": 39 - }, - "Name": "44", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U extends I\n```\n" - } - } - }, - { - "marker": { - "Position": 333, - "LSPosition": { - "line": 12, - "character": 4 - }, - "Name": "45", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) I1.method>(a: U, b: T): U\n```\n" - } - } - }, - { - "marker": { - "Position": 340, - "LSPosition": { - "line": 12, - "character": 11 - }, - "Name": "46", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U extends I\n```\n" - } - } - }, - { - "marker": { - "Position": 350, - "LSPosition": { - "line": 12, - "character": 21 - }, - "Name": "47", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\ninterface I\n```\n" - } - } - }, - { - "marker": { - "Position": 361, - "LSPosition": { - "line": 12, - "character": 32 - }, - "Name": "48", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) a: U\n```\n" - } - } - }, - { - "marker": { - "Position": 364, - "LSPosition": { - "line": 12, - "character": 35 - }, - "Name": "49", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U extends I\n```\n" - } - } - }, - { - "marker": { - "Position": 367, - "LSPosition": { - "line": 12, - "character": 38 - }, - "Name": "50", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(parameter) b: T\n```\n" - } - } - }, - { - "marker": { - "Position": 370, - "LSPosition": { - "line": 12, - "character": 41 - }, - "Name": "51", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) T extends I\n```\n" - } - } - }, - { - "marker": { - "Position": 374, - "LSPosition": { - "line": 12, - "character": 45 - }, - "Name": "52", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(type parameter) U extends I\n```\n" - } - } - }, - { - "marker": { - "Position": 383, - "LSPosition": { - "line": 14, - "character": 4 - }, - "Name": "53", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal1: I1>\n```\n" - } - } - }, - { - "marker": { - "Position": 390, - "LSPosition": { - "line": 14, - "character": 11 - }, - "Name": "54", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\ninterface I1>\n```\n" - } - } - }, - { - "marker": { - "Position": 393, - "LSPosition": { - "line": 14, - "character": 14 - }, - "Name": "55", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\ninterface I\n```\n" - } - } - }, - { - "marker": { - "Position": 409, - "LSPosition": { - "line": 15, - "character": 4 - }, - "Name": "56", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal1: I1>\n```\n" - } - } - }, - { - "marker": { - "Position": 415, - "LSPosition": { - "line": 15, - "character": 10 - }, - "Name": "57", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal: I\n```\n" - } - } - }, - { - "marker": { - "Position": 421, - "LSPosition": { - "line": 15, - "character": 16 - }, - "Name": "58", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal: I\n```\n" - } - } - }, - { - "marker": { - "Position": 428, - "LSPosition": { - "line": 16, - "character": 0 - }, - "Name": "59", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal1: I1>\n```\n" - } - } - }, - { - "marker": { - "Position": 434, - "LSPosition": { - "line": 16, - "character": 6 - }, - "Name": "60", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal: I\n```\n" - } - } - }, - { - "marker": { - "Position": 440, - "LSPosition": { - "line": 16, - "character": 12 - }, - "Name": "61", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal: I\n```\n" - } - } - }, - { - "marker": { - "Position": 447, - "LSPosition": { - "line": 17, - "character": 0 - }, - "Name": "62", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal1: I1>\n```\n" - } - } - }, - { - "marker": { - "Position": 453, - "LSPosition": { - "line": 17, - "character": 6 - }, - "Name": "63", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\n(method) I1.method>(a: U, b: T): I\n```\n" - } - } - }, - { - "marker": { - "Position": 460, - "LSPosition": { - "line": 17, - "character": 13 - }, - "Name": "64", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal: I\n```\n" - } - } - }, - { - "marker": { - "Position": 466, - "LSPosition": { - "line": 17, - "character": 19 - }, - "Name": "65", - "Data": {} - }, - "item": { - "contents": { - "kind": "markdown", - "value": "```tsx\nvar iVal: I\n```\n" - } - } - } -] \ No newline at end of file