diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index fffce12a88419..3e70ca4db0688 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -1972,18 +1972,53 @@ export class TestState { const baselineFile = this.getBaselineFileNameForContainingTestFile(); const result = ts.arrayFrom(this.testData.markerPositions.entries(), ([name, marker]) => ({ marker: { ...marker, name }, - quickInfo: this.languageService.getQuickInfoAtPosition(marker.fileName, marker.position) + item: this.languageService.getQuickInfoAtPosition(marker.fileName, marker.position) })); - Harness.Baseline.runBaseline(baselineFile, stringify(result)); + const annotations = this.annotateContentWithTooltips( + result, + "quickinfo", + item => item.textSpan, + ({ displayParts, documentation, tags }) => [ + ...(displayParts ? displayParts.map(p => p.text).join("").split("\n") : []), + ...(documentation?.length ? documentation.map(p => p.text).join("").split("\n") : []), + ...(tags?.length ? tags.map(p => `@${p.name} ${p.text?.map(dp => dp.text).join("") ?? ""}`).join("\n").split("\n") : []) + ]); + Harness.Baseline.runBaseline(baselineFile, annotations + "\n\n" + stringify(result)); } public baselineSignatureHelp() { const baselineFile = this.getBaselineFileNameForContainingTestFile(); const result = ts.arrayFrom(this.testData.markerPositions.entries(), ([name, marker]) => ({ marker: { ...marker, name }, - signatureHelp: this.languageService.getSignatureHelpItems(marker.fileName, marker.position, /*options*/ undefined) + item: this.languageService.getSignatureHelpItems(marker.fileName, marker.position, /*options*/ undefined) })); - Harness.Baseline.runBaseline(baselineFile, stringify(result)); + const annotations = this.annotateContentWithTooltips( + result, + "signature help", + () => undefined, // use default: marker.position + (item, previous) => { + const { documentation, tags, prefixDisplayParts, suffixDisplayParts, separatorDisplayParts, parameters } = item.items[item.selectedItemIndex]; + const tooltip = []; + let signature = ""; + if (prefixDisplayParts.length) signature += prefixDisplayParts.map(p => p.text).join(""); + const separator = separatorDisplayParts.map(p => p.text).join(""); + signature += parameters.map((p, i) => { + const text = p.displayParts.map(dp => dp.text).join(""); + return i === item.argumentIndex ? "**" + text + "**" : text; + }).join(separator); + if (suffixDisplayParts.length) signature += suffixDisplayParts.map(p => p.text).join(""); + tooltip.push(signature); + // only display signature documentation on the last argument when multiple arguments are marked + if (previous?.applicableSpan.start !== item.applicableSpan.start) { + if (documentation?.length) tooltip.push(...documentation.map(p => p.text).join("").split("\n")); + if (tags?.length) { + tooltip.push(...tags.map(p => `@${p.name} ${p.text?.map(dp => dp.text).join("") ?? ""}`).join("\n").split("\n")); + } + } + return tooltip; + } + ); + Harness.Baseline.runBaseline(baselineFile, annotations + "\n\n" + stringify(result)); } public baselineCompletions(preferences?: ts.UserPreferences) { @@ -1993,7 +2028,7 @@ export class TestState { const completions = this.getCompletionListAtCaret(preferences); return { marker: { ...marker, name }, - completionList: { + item: { ...completions, entries: completions?.entries.map(entry => ({ ...entry, @@ -2002,7 +2037,60 @@ export class TestState { } }; }); - Harness.Baseline.runBaseline(baselineFile, stringify(result)); + const annotations = this.annotateContentWithTooltips( + result, + "completions", + item => item.optionalReplacementSpan, + item => item.entries?.flatMap( + entry => entry.displayParts + ? entry.displayParts.map(p => p.text).join("").split("\n") + : [`(${entry.kindModifiers}${entry.kind}) ${entry.name}`]) + ); + Harness.Baseline.runBaseline(baselineFile, annotations + "\n\n" + stringify(result)); + } + + private annotateContentWithTooltips( + items: ({ + marker: Marker & { name: string }, + item: T | undefined + })[], + opName: "completions" | "quickinfo" | "signature help", + getSpan: (t: T) => ts.TextSpan | undefined, + getToolTipContents: (t: T, prev: T | undefined) => string[] | undefined): string { + const bar = "-".repeat(70); + const sorted = items.slice(); + // sort by file, then *backwards* by position in the file so I can insert multiple times on a line without counting + sorted.sort((q1, q2) => + q1.marker.fileName === q1.marker.fileName + ? (q1.marker.position > q2.marker.position ? -1 : 1) + : (q1.marker.fileName > q1.marker.fileName ? 1 : -1)); + const files: Map = new Map(); + let previous: T | undefined; + for (const { marker, item } of sorted) { + const span = (item ? getSpan(item) : undefined) ?? { start: marker.position, length: 1 }; + const startLc = this.languageServiceAdapterHost.positionToLineAndCharacter(marker.fileName, span.start); + const underline = " ".repeat(startLc.character) + "^".repeat(span.length); + let tooltip = [ + bar, + ...(item ? getToolTipContents(item, previous) : undefined) ?? [`No ${opName} at /*${marker.name}*/.`], + bar, + ]; + tooltip = tooltip.map(l => "| " + l); + const lines = files.get(marker.fileName) ?? this.getFileContent(marker.fileName).split(/\r?\n/); + lines.splice(startLc.line + 1, 0, underline, ...tooltip); + files.set(marker.fileName, lines); + previous = item; + } + return Array.from(files.entries(), ([fileName, lines]) => `=== ${fileName} ===\n` + lines.map(l => "// " + l).join("\n")) + .join("\n\n"); } public baselineSmartSelection() { diff --git a/tests/baselines/reference/completionDetailsOfContextSensitiveParameterNoCrash.baseline b/tests/baselines/reference/completionDetailsOfContextSensitiveParameterNoCrash.baseline index d440e03a4274e..2479767063e2d 100644 --- a/tests/baselines/reference/completionDetailsOfContextSensitiveParameterNoCrash.baseline +++ b/tests/baselines/reference/completionDetailsOfContextSensitiveParameterNoCrash.baseline @@ -1,3 +1,95 @@ +=== /tests/cases/fourslash/completionDetailsOfContextSensitiveParameterNoCrash.ts === +// type __ = never; +// +// interface CurriedFunction1 { +// (): CurriedFunction1; +// (t1: T1): R; +// } +// interface CurriedFunction2 { +// (): CurriedFunction2; +// (t1: T1): CurriedFunction1; +// (t1: __, t2: T2): CurriedFunction1; +// (t1: T1, t2: T2): R; +// } +// +// interface CurriedFunction3 { +// (): CurriedFunction3; +// (t1: T1): CurriedFunction2; +// (t1: __, t2: T2): CurriedFunction2; +// (t1: T1, t2: T2): CurriedFunction1; +// (t1: __, t2: __, t3: T3): CurriedFunction2; +// (t1: T1, t2: __, t3: T3): CurriedFunction1; +// (t1: __, t2: T2, t3: T3): CurriedFunction1; +// (t1: T1, t2: T2, t3: T3): R; +// } +// +// interface CurriedFunction4 { +// (): CurriedFunction4; +// (t1: T1): CurriedFunction3; +// (t1: __, t2: T2): CurriedFunction3; +// (t1: T1, t2: T2): CurriedFunction2; +// (t1: __, t2: __, t3: T3): CurriedFunction3; +// (t1: __, t2: __, t3: T3): CurriedFunction2; +// (t1: __, t2: T2, t3: T3): CurriedFunction2; +// (t1: T1, t2: T2, t3: T3): CurriedFunction1; +// (t1: __, t2: __, t3: __, t4: T4): CurriedFunction3; +// (t1: T1, t2: __, t3: __, t4: T4): CurriedFunction2; +// (t1: __, t2: T2, t3: __, t4: T4): CurriedFunction2; +// (t1: __, t2: __, t3: T3, t4: T4): CurriedFunction2; +// (t1: T1, t2: T2, t3: __, t4: T4): CurriedFunction1; +// (t1: T1, t2: __, t3: T3, t4: T4): CurriedFunction1; +// (t1: __, t2: T2, t3: T3, t4: T4): CurriedFunction1; +// (t1: T1, t2: T2, t3: T3, t4: T4): R; +// } +// +// declare var curry: { +// (func: (t1: T1) => R, arity?: number): CurriedFunction1; +// (func: (t1: T1, t2: T2) => R, arity?: number): CurriedFunction2; +// (func: (t1: T1, t2: T2, t3: T3) => R, arity?: number): CurriedFunction3; +// (func: (t1: T1, t2: T2, t3: T3, t4: T4) => R, arity?: number): CurriedFunction4; +// (func: (...args: any[]) => any, arity?: number): (...args: any[]) => any; +// placeholder: __; +// }; +// +// export type StylingFunction = ( +// keys: (string | false | undefined) | (string | false | undefined)[], +// ...rest: unknown[] +// ) => object; +// +// declare const getStylingByKeys: ( +// mergedStyling: object, +// keys: (string | false | undefined) | (string | false | undefined)[], +// ...args: unknown[] +// ) => object; +// +// declare var mergedStyling: object; +// +// export const createStyling: CurriedFunction3< +// (base16Theme: object) => unknown, +// object | undefined, +// object | undefined, +// StylingFunction +// > = curry< +// (base16Theme: object) => unknown, +// object | undefined, +// object | undefined, +// StylingFunction +// >( +// ( +// getStylingFromBase16: (base16Theme: object) => unknown, +// options: object = {}, +// themeOrStyling: object = {}, +// ...args +// ): StylingFunction => { +// return curry(getStylingByKeys, 2)(mergedStyling, ...args); +// ^^^^ +// | ---------------------------------------------------------------------- +// | (parameter) args: any +// | ---------------------------------------------------------------------- +// }, +// 3 +// ); + [ { "marker": { @@ -5,7 +97,7 @@ "position": 3101, "name": "" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/completionEntryForUnionMethod.baseline b/tests/baselines/reference/completionEntryForUnionMethod.baseline index 09b3963f919eb..738d7249b298b 100644 --- a/tests/baselines/reference/completionEntryForUnionMethod.baseline +++ b/tests/baselines/reference/completionEntryForUnionMethod.baseline @@ -1,3 +1,60 @@ +=== /tests/cases/fourslash/completionEntryForUnionMethod.ts === +// var y: Array|Array; +// y.map( +// ^^^ +// | ---------------------------------------------------------------------- +// | (property) Array.concat: { +// | (...items: ConcatArray[]): string[]; +// | (...items: (string | ConcatArray)[]): string[]; +// | } | { +// | (...items: ConcatArray[]): number[]; +// | (...items: (number | ConcatArray<...>)[]): number[]; +// | } +// | (property) Array.every: { +// | (predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): this is S[]; +// | (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean; +// | } | { +// | ...; +// | } +// | (property) Array.filter: { +// | (predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; +// | (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[]; +// | } | { +// | ...; +// | } +// | (method) Array.forEach(callbackfn: ((value: string, index: number, array: string[]) => void) & ((value: number, index: number, array: number[]) => void), thisArg: any): void +// | (method) Array.indexOf(searchElement: never, fromIndex: number): number +// | (method) Array.join(separator?: string): string +// | (method) Array.lastIndexOf(searchElement: never, fromIndex: number): number +// | (property) Array.length: number +// | (method) Array.map(callbackfn: ((value: string, index: number, array: string[]) => unknown) & ((value: number, index: number, array: number[]) => unknown), thisArg: any): unknown[] +// | (method) Array.pop(): string | number +// | (method) Array.push(items: never[]): number +// | (property) Array.reduce: { +// | (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; +// | (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; +// | (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; +// | } | { +// | ...; +// | } +// | (property) Array.reduceRight: { +// | (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; +// | (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; +// | (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; +// | } | { +// | ...; +// | } +// | (method) Array.reverse(): string[] | number[] +// | (method) Array.shift(): string | number +// | (method) Array.slice(start?: number, end?: number): string[] | number[] +// | (method) Array.some(predicate: ((value: string, index: number, array: string[]) => unknown) & ((value: number, index: number, array: number[]) => unknown), thisArg: any): boolean +// | (method) Array.sort(compareFn: ((a: string, b: string) => number) & ((a: number, b: number) => number)): string[] | number[] +// | (method) Array.splice(start: number, deleteCount?: number): string[] | number[] (+2 overloads) +// | (method) Array.toLocaleString(): string +// | (method) Array.toString(): string +// | (method) Array.unshift(items: never[]): number +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +62,7 @@ "position": 41, "name": "" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, diff --git a/tests/baselines/reference/completionForStringLiteralImport3.baseline b/tests/baselines/reference/completionForStringLiteralImport3.baseline index eb38cecad9ea7..674ef9f361abb 100644 --- a/tests/baselines/reference/completionForStringLiteralImport3.baseline +++ b/tests/baselines/reference/completionForStringLiteralImport3.baseline @@ -1,3 +1,9 @@ +=== /a.ts === +// import * as foo from ""; +// ^ +// | ---------------------------------------------------------------------- +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +11,7 @@ "position": 22, "name": "" }, - "completionList": { + "item": { "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, diff --git a/tests/baselines/reference/completionImportCallAssertion.baseline b/tests/baselines/reference/completionImportCallAssertion.baseline index 2e54c403997e0..a4c3b58bd0ebc 100644 --- a/tests/baselines/reference/completionImportCallAssertion.baseline +++ b/tests/baselines/reference/completionImportCallAssertion.baseline @@ -1,3 +1,15 @@ +=== /tests/cases/fourslash/main.ts === +// import("./other.json", {}); +// ^ +// | ---------------------------------------------------------------------- +// | (property) ImportCallOptions.assert?: ImportAssertions +// | ---------------------------------------------------------------------- +// import("./other.json", { asse}); +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) ImportCallOptions.assert?: ImportAssertions +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +17,7 @@ "position": 24, "name": "0" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -73,7 +85,7 @@ "position": 57, "name": "1" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, diff --git a/tests/baselines/reference/completionsClassMembers1.baseline b/tests/baselines/reference/completionsClassMembers1.baseline index e08c00fcc4481..0e52f77721648 100644 --- a/tests/baselines/reference/completionsClassMembers1.baseline +++ b/tests/baselines/reference/completionsClassMembers1.baseline @@ -1,11 +1,38 @@ +=== /tests/cases/fourslash/completionsClassMembers1.ts === +// interface I { +// method(): void; +// } +// +// export class C implements I { +// property = "foo" +// +// ^ +// | ---------------------------------------------------------------------- +// | (method) I.method(): void +// | abstract +// | accessor +// | async +// | constructor +// | declare +// | get +// | override +// | private +// | protected +// | public +// | readonly +// | set +// | static +// | ---------------------------------------------------------------------- +// } + [ { "marker": { "fileName": "/tests/cases/fourslash/completionsClassMembers1.ts", - "position": 93, + "position": 92, "name": "" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, diff --git a/tests/baselines/reference/completionsClassMembers2.baseline b/tests/baselines/reference/completionsClassMembers2.baseline index ee7b6c598776f..9ce2a64b7b6d1 100644 --- a/tests/baselines/reference/completionsClassMembers2.baseline +++ b/tests/baselines/reference/completionsClassMembers2.baseline @@ -1,11 +1,38 @@ +=== /tests/cases/fourslash/completionsClassMembers2.ts === +// interface I { +// method(): void; +// } +// +// export class C implements I { +// property = "foo" +// +// ^ +// | ---------------------------------------------------------------------- +// | abstract +// | accessor +// | async +// | constructor +// | declare +// | get +// | override +// | private +// | protected +// | public +// | readonly +// | set +// | static +// | (method) I.method(): void +// | ---------------------------------------------------------------------- +// } + [ { "marker": { "fileName": "/tests/cases/fourslash/completionsClassMembers2.ts", - "position": 93, + "position": 92, "name": "" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, diff --git a/tests/baselines/reference/completionsClassMembers3.baseline b/tests/baselines/reference/completionsClassMembers3.baseline index 4d83c1f170378..0c61b0064e564 100644 --- a/tests/baselines/reference/completionsClassMembers3.baseline +++ b/tests/baselines/reference/completionsClassMembers3.baseline @@ -1,11 +1,38 @@ +=== /tests/cases/fourslash/completionsClassMembers3.ts === +// interface I { +// method(): void; +// } +// +// export class C implements I { +// property = "foo" + "foo" +// +// ^ +// | ---------------------------------------------------------------------- +// | (method) I.method(): void +// | abstract +// | accessor +// | async +// | constructor +// | declare +// | get +// | override +// | private +// | protected +// | public +// | readonly +// | set +// | static +// | ---------------------------------------------------------------------- +// } + [ { "marker": { "fileName": "/tests/cases/fourslash/completionsClassMembers3.ts", - "position": 101, + "position": 100, "name": "" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, diff --git a/tests/baselines/reference/completionsCommentsClass.baseline b/tests/baselines/reference/completionsCommentsClass.baseline index a550ca56675ac..9c84a387981c4 100644 --- a/tests/baselines/reference/completionsCommentsClass.baseline +++ b/tests/baselines/reference/completionsCommentsClass.baseline @@ -1,3 +1,219 @@ +=== /tests/cases/fourslash/completionsCommentsClass.ts === +// /** This is class c2 without constructor*/ +// class c2 { +// } +// var i2 = new c2(); +// var i2_c = c2; +// class c3 { +// /** Constructor comment*/ +// constructor() { +// } +// } +// var i3 = new c3(); +// var i3_c = c3; +// /** Class comment*/ +// class c4 { +// /** Constructor comment*/ +// constructor() { +// } +// } +// var i4 = new c4(); +// var i4_c = c4; +// /** Class with statics*/ +// class c5 { +// static s1: number; +// } +// var i5 = new c5(); +// var i5_c = c5; +// /** class with statics and constructor*/ +// class c6 { +// /** s1 comment*/ +// static s1: number; +// /** constructor comment*/ +// constructor() { +// } +// } +// var i6 = new c6(); +// var i6_c = c6; +// +// ^ +// | ---------------------------------------------------------------------- +// | class a +// | class c2 +// | class c3 +// | class c4 +// | class c5 +// | class c6 +// | var i2: c2 +// | var i2_c: typeof c2 +// | var i3: c3 +// | var i3_c: typeof c3 +// | var i4: c4 +// | var i4_c: typeof c4 +// | var i5: c5 +// | var i5_c: typeof c5 +// | var i6: c6 +// | var i6_c: typeof c6 +// | namespace m +// | var myVar: m.m2.c1 +// | abstract +// | any +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | asserts +// | async +// | await +// | bigint +// | boolean +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | declare +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | infer +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | keyof +// | let +// | interface Math +// | var Math: Math +// | module +// | namespace +// | var NaN: number +// | never +// | new +// | null +// | number +// | interface Number +// | var Number: NumberConstructor +// | object +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | readonly +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | string +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | symbol +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | unique +// | unknown +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// class a { +// /** +// constructor for a +// @param a this is my a +// */ +// constructor(a: string) { +// } +// } +// new a("Hello"); +// module m { +// export module m2 { +// /** class comment */ +// export class c1 { +// /** constructor comment*/ +// constructor() { +// } +// } +// } +// } +// var myVar = new m.m2.c1(); + [ { "marker": { @@ -5,7 +221,7 @@ "position": 599, "name": "26" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, diff --git a/tests/baselines/reference/completionsCommentsClassMembers.baseline b/tests/baselines/reference/completionsCommentsClassMembers.baseline index 2f7c8f4303da9..cf4807c1d83c6 100644 --- a/tests/baselines/reference/completionsCommentsClassMembers.baseline +++ b/tests/baselines/reference/completionsCommentsClassMembers.baseline @@ -1,3 +1,3338 @@ +=== /tests/cases/fourslash/completionsCommentsClassMembers.ts === +// /** This is comment for c1*/ +// class c1 { +// /** p1 is property of c1*/ +// public p1: number; +// /** sum with property*/ +// public p2(/** number to add*/b: number) { +// return this.p1 + b; +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p1: number +// | (method) c1.nc_p2(b: number): number +// | (property) c1.nc_p3: number +// | (property) c1.nc_pp1: number +// | (method) c1.nc_pp2(b: number): number +// | (property) c1.nc_pp3: number +// | (property) c1.p1: number +// | (method) c1.p2(b: number): number +// | (property) c1.p3: number +// | (property) c1.pp1: number +// | (method) c1.pp2(b: number): number +// | (property) c1.pp3: number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | (parameter) b: number +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// /** getter property 1*/ +// public get p3() { +// return this.p2(this.p1); +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p1: number +// | (method) c1.nc_p2(b: number): number +// | (property) c1.nc_p3: number +// | (property) c1.nc_pp1: number +// | (method) c1.nc_pp2(b: number): number +// | (property) c1.nc_pp3: number +// | (property) c1.p1: number +// | (method) c1.p2(b: number): number +// | (property) c1.p3: number +// | (property) c1.pp1: number +// | (method) c1.pp2(b: number): number +// | (property) c1.pp3: number +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p1: number +// | (method) c1.nc_p2(b: number): number +// | (property) c1.nc_p3: number +// | (property) c1.nc_pp1: number +// | (method) c1.nc_pp2(b: number): number +// | (property) c1.nc_pp3: number +// | (property) c1.p1: number +// | (method) c1.p2(b: number): number +// | (property) c1.p3: number +// | (property) c1.pp1: number +// | (method) c1.pp2(b: number): number +// | (property) c1.pp3: number +// | ---------------------------------------------------------------------- +// } +// /** setter property 1*/ +// public set p3(/** this is value*/value: number) { +// this.p1 = this.p2(value); +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p1: number +// | (method) c1.nc_p2(b: number): number +// | (property) c1.nc_p3: number +// | (property) c1.nc_pp1: number +// | (method) c1.nc_pp2(b: number): number +// | (property) c1.nc_pp3: number +// | (property) c1.p1: number +// | (method) c1.p2(b: number): number +// | (property) c1.p3: number +// | (property) c1.pp1: number +// | (method) c1.pp2(b: number): number +// | (property) c1.pp3: number +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p1: number +// | (method) c1.nc_p2(b: number): number +// | (property) c1.nc_p3: number +// | (property) c1.nc_pp1: number +// | (method) c1.nc_pp2(b: number): number +// | (property) c1.nc_pp3: number +// | (property) c1.p1: number +// | (method) c1.p2(b: number): number +// | (property) c1.p3: number +// | (property) c1.pp1: number +// | (method) c1.pp2(b: number): number +// | (property) c1.pp3: number +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | (parameter) value: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// /** pp1 is property of c1*/ +// private pp1: number; +// /** sum with property*/ +// private pp2(/** number to add*/b: number) { +// return this.p1 + b; +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p1: number +// | (method) c1.nc_p2(b: number): number +// | (property) c1.nc_p3: number +// | (property) c1.nc_pp1: number +// | (method) c1.nc_pp2(b: number): number +// | (property) c1.nc_pp3: number +// | (property) c1.p1: number +// | (method) c1.p2(b: number): number +// | (property) c1.p3: number +// | (property) c1.pp1: number +// | (method) c1.pp2(b: number): number +// | (property) c1.pp3: number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | (parameter) b: number +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// /** getter property 2*/ +// private get pp3() { +// return this.pp2(this.pp1); +// ^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p1: number +// | (method) c1.nc_p2(b: number): number +// | (property) c1.nc_p3: number +// | (property) c1.nc_pp1: number +// | (method) c1.nc_pp2(b: number): number +// | (property) c1.nc_pp3: number +// | (property) c1.p1: number +// | (method) c1.p2(b: number): number +// | (property) c1.p3: number +// | (property) c1.pp1: number +// | (method) c1.pp2(b: number): number +// | (property) c1.pp3: number +// | ---------------------------------------------------------------------- +// ^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p1: number +// | (method) c1.nc_p2(b: number): number +// | (property) c1.nc_p3: number +// | (property) c1.nc_pp1: number +// | (method) c1.nc_pp2(b: number): number +// | (property) c1.nc_pp3: number +// | (property) c1.p1: number +// | (method) c1.p2(b: number): number +// | (property) c1.p3: number +// | (property) c1.pp1: number +// | (method) c1.pp2(b: number): number +// | (property) c1.pp3: number +// | ---------------------------------------------------------------------- +// } +// /** setter property 2*/ +// private set pp3( /** this is value*/value: number) { +// this.pp1 = this.pp2(value); +// ^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p1: number +// | (method) c1.nc_p2(b: number): number +// | (property) c1.nc_p3: number +// | (property) c1.nc_pp1: number +// | (method) c1.nc_pp2(b: number): number +// | (property) c1.nc_pp3: number +// | (property) c1.p1: number +// | (method) c1.p2(b: number): number +// | (property) c1.p3: number +// | (property) c1.pp1: number +// | (method) c1.pp2(b: number): number +// | (property) c1.pp3: number +// | ---------------------------------------------------------------------- +// ^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p1: number +// | (method) c1.nc_p2(b: number): number +// | (property) c1.nc_p3: number +// | (property) c1.nc_pp1: number +// | (method) c1.nc_pp2(b: number): number +// | (property) c1.nc_pp3: number +// | (property) c1.p1: number +// | (method) c1.p2(b: number): number +// | (property) c1.p3: number +// | (property) c1.pp1: number +// | (method) c1.pp2(b: number): number +// | (property) c1.pp3: number +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | (parameter) value: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// /** Constructor method*/ +// constructor() { +// } +// /** s1 is static property of c1*/ +// static s1: number; +// /** static sum with property*/ +// static s2(/** number to add*/b: number) { +// return c1.s1 + b; +// ^^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | (parameter) b: number +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_s1: number +// | (method) c1.nc_s2(b: number): number +// | (property) c1.nc_s3: number +// | (property) c1.s1: number +// | (method) c1.s2(b: number): number +// | (property) c1.s3: number +// | (method) Function.apply(this: Function, thisArg: any, argArray?: any): any +// | (property) Function.arguments: any +// | (method) Function.bind(this: Function, thisArg: any, ...argArray: any[]): any +// | (method) Function.call(this: Function, thisArg: any, ...argArray: any[]): any +// | (property) Function.caller: Function +// | (property) Function.length: number +// | (property) c1.prototype: c1 +// | (method) Function.toString(): string +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | (parameter) b: number +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// /** static getter property*/ +// static get s3() { +// return c1.s2(c1.s1); +// ^^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_s1: number +// | (method) c1.nc_s2(b: number): number +// | (property) c1.nc_s3: number +// | (property) c1.s1: number +// | (method) c1.s2(b: number): number +// | (property) c1.s3: number +// | (method) Function.apply(this: Function, thisArg: any, argArray?: any): any +// | (property) Function.arguments: any +// | (method) Function.bind(this: Function, thisArg: any, ...argArray: any[]): any +// | (method) Function.call(this: Function, thisArg: any, ...argArray: any[]): any +// | (property) Function.caller: Function +// | (property) Function.length: number +// | (property) c1.prototype: c1 +// | (method) Function.toString(): string +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_s1: number +// | (method) c1.nc_s2(b: number): number +// | (property) c1.nc_s3: number +// | (property) c1.s1: number +// | (method) c1.s2(b: number): number +// | (property) c1.s3: number +// | (method) Function.apply(this: Function, thisArg: any, argArray?: any): any +// | (property) Function.arguments: any +// | (method) Function.bind(this: Function, thisArg: any, ...argArray: any[]): any +// | (method) Function.call(this: Function, thisArg: any, ...argArray: any[]): any +// | (property) Function.caller: Function +// | (property) Function.length: number +// | (property) c1.prototype: c1 +// | (method) Function.toString(): string +// | ---------------------------------------------------------------------- +// } +// /** setter property 3*/ +// static set s3( /** this is value*/value: number) { +// c1.s1 = c1.s2(value); +// ^^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | (parameter) value: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_s1: number +// | (method) c1.nc_s2(b: number): number +// | (property) c1.nc_s3: number +// | (property) c1.s1: number +// | (method) c1.s2(b: number): number +// | (property) c1.s3: number +// | (method) Function.apply(this: Function, thisArg: any, argArray?: any): any +// | (property) Function.arguments: any +// | (method) Function.bind(this: Function, thisArg: any, ...argArray: any[]): any +// | (method) Function.call(this: Function, thisArg: any, ...argArray: any[]): any +// | (property) Function.caller: Function +// | (property) Function.length: number +// | (property) c1.prototype: c1 +// | (method) Function.toString(): string +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | (parameter) value: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_s1: number +// | (method) c1.nc_s2(b: number): number +// | (property) c1.nc_s3: number +// | (property) c1.s1: number +// | (method) c1.s2(b: number): number +// | (property) c1.s3: number +// | (method) Function.apply(this: Function, thisArg: any, argArray?: any): any +// | (property) Function.arguments: any +// | (method) Function.bind(this: Function, thisArg: any, ...argArray: any[]): any +// | (method) Function.call(this: Function, thisArg: any, ...argArray: any[]): any +// | (property) Function.caller: Function +// | (property) Function.length: number +// | (property) c1.prototype: c1 +// | (method) Function.toString(): string +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | (parameter) value: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// public nc_p1: number; +// public nc_p2(b: number) { +// return this.nc_p1 + b; +// ^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | (parameter) b: number +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// public get nc_p3() { +// return this.nc_p2(this.nc_p1); +// } +// public set nc_p3(value: number) { +// this.nc_p1 = this.nc_p2(value); +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | (parameter) value: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// private nc_pp1: number; +// private nc_pp2(b: number) { +// return this.nc_pp1 + b; +// ^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | (parameter) b: number +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// private get nc_pp3() { +// return this.nc_pp2(this.nc_pp1); +// } +// private set nc_pp3(value: number) { +// this.nc_pp1 = this.nc_pp2(value); +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | (parameter) value: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// static nc_s1: number; +// static nc_s2(b: number) { +// return c1.nc_s1 + b; +// ^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | (parameter) b: number +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// static get nc_s3() { +// return c1.nc_s2(c1.nc_s1); +// } +// static set nc_s3(value: number) { +// c1.nc_s1 = c1.nc_s2(value); +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (local var) arguments: IArguments +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | (parameter) value: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// } +// var i1 = new c1(); +// var i1_p = i1.p1; +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p1: number +// | (method) c1.nc_p2(b: number): number +// | (property) c1.nc_p3: number +// | (property) c1.p1: number +// | (method) c1.p2(b: number): number +// | (property) c1.p3: number +// | ---------------------------------------------------------------------- +// var i1_f = i1.p2; +// var i1_r = i1.p2(20); +// var i1_prop = i1.p3; +// i1.p3 = i1_prop; +// var i1_nc_p = i1.nc_p1; +// var i1_ncf = i1.nc_p2; +// var i1_ncr = i1.nc_p2(20); +// var i1_ncprop = i1.nc_p3; +// i1.nc_p3 = i1_ncprop; +// var i1_s_p = c1.s1; +// ^^ +// | ---------------------------------------------------------------------- +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | abstract +// | any +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | asserts +// | async +// | await +// | bigint +// | boolean +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | declare +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | infer +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | keyof +// | let +// | interface Math +// | var Math: Math +// | module +// | namespace +// | var NaN: number +// | never +// | new +// | null +// | number +// | interface Number +// | var Number: NumberConstructor +// | object +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | readonly +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | string +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | symbol +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | unique +// | unknown +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_s1: number +// | (method) c1.nc_s2(b: number): number +// | (property) c1.nc_s3: number +// | (property) c1.s1: number +// | (method) c1.s2(b: number): number +// | (property) c1.s3: number +// | (method) Function.apply(this: Function, thisArg: any, argArray?: any): any +// | (property) Function.arguments: any +// | (method) Function.bind(this: Function, thisArg: any, ...argArray: any[]): any +// | (method) Function.call(this: Function, thisArg: any, ...argArray: any[]): any +// | (property) Function.caller: Function +// | (property) Function.length: number +// | (property) c1.prototype: c1 +// | (method) Function.toString(): string +// | ---------------------------------------------------------------------- +// var i1_s_f = c1.s2; +// var i1_s_r = c1.s2(20); +// var i1_s_prop = c1.s3; +// c1.s3 = i1_s_prop; +// var i1_s_nc_p = c1.nc_s1; +// var i1_s_ncf = c1.nc_s2; +// var i1_s_ncr = c1.nc_s2(20); +// var i1_s_ncprop = c1.nc_s3; +// c1.nc_s3 = i1_s_ncprop; +// var i1_c = c1; +// +// ^ +// | ---------------------------------------------------------------------- +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | abstract +// | any +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | asserts +// | async +// | await +// | bigint +// | boolean +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | declare +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | infer +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | keyof +// | let +// | interface Math +// | var Math: Math +// | module +// | namespace +// | var NaN: number +// | never +// | new +// | null +// | number +// | interface Number +// | var Number: NumberConstructor +// | object +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | readonly +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | string +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | symbol +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | unique +// | unknown +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// class cProperties { +// private val: number; +// /** getter only property*/ +// public get p1() { +// return this.val; +// } +// public get nc_p1() { +// return this.val; +// } +// /**setter only property*/ +// public set p2(value: number) { +// this.val = value; +// } +// public set nc_p2(value: number) { +// this.val = value; +// } +// } +// var cProperties_i = new cProperties(); +// cProperties_i.p2 = cProperties_i.p1; +// ^^ +// | ---------------------------------------------------------------------- +// | (property) cProperties.nc_p1: number +// | (property) cProperties.nc_p2: number +// | (property) cProperties.p1: number +// | (property) cProperties.p2: number +// | ---------------------------------------------------------------------- +// cProperties_i.nc_p2 = cProperties_i.nc_p1; +// class cWithConstructorProperty { +// /** +// * this is class cWithConstructorProperty's constructor +// * @param a this is first parameter a +// */ +// constructor(/**more info about a*/public a: number) { +// var bbbb = 10; +// this.a = a + 2 + bbbb; +// ^ +// | ---------------------------------------------------------------------- +// | (property) cWithConstructorProperty.a: number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | (local var) arguments: IArguments +// | (local var) bbbb: number +// | class c1 +// | class cProperties +// | var cProperties_i: cProperties +// | class cWithConstructorProperty +// | var i1: c1 +// | var i1_c: typeof c1 +// | var i1_f: (b: number) => number +// | var i1_nc_p: number +// | var i1_ncf: (b: number) => number +// | var i1_ncprop: number +// | var i1_ncr: number +// | var i1_p: number +// | var i1_prop: number +// | var i1_r: number +// | var i1_s_f: (b: number) => number +// | var i1_s_nc_p: number +// | var i1_s_ncf: (b: number) => number +// | var i1_s_ncprop: number +// | var i1_s_ncr: number +// | var i1_s_p: number +// | var i1_s_prop: number +// | var i1_s_r: number +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// } + [ { "marker": { @@ -5,7 +3340,7 @@ "position": 188, "name": "4" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -754,7 +4089,7 @@ "position": 193, "name": "5" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -4843,7 +8178,7 @@ "position": 272, "name": "7" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -5592,7 +8927,7 @@ "position": 280, "name": "9" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -6341,7 +9676,7 @@ "position": 386, "name": "11" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -7090,7 +10425,7 @@ "position": 396, "name": "12" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -7839,7 +11174,7 @@ "position": 399, "name": "13" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -11928,7 +15263,7 @@ "position": 566, "name": "16" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -12677,7 +16012,7 @@ "position": 571, "name": "17" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -16766,7 +20101,7 @@ "position": 652, "name": "19" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -17515,7 +20850,7 @@ "position": 661, "name": "21" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -18264,7 +21599,7 @@ "position": 771, "name": "23" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -19013,7 +22348,7 @@ "position": 782, "name": "24" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -19762,7 +23097,7 @@ "position": 786, "name": "25" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -23851,7 +27186,7 @@ "position": 1012, "name": "29" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, @@ -27940,7 +31275,7 @@ "position": 1015, "name": "30" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -29096,7 +32431,7 @@ "position": 1020, "name": "31" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -33185,7 +36520,7 @@ "position": 1099, "name": "33" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, @@ -37228,7 +40563,7 @@ "position": 1102, "name": "34" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -38384,7 +41719,7 @@ "position": 1105, "name": "35" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -42427,7 +45762,7 @@ "position": 1108, "name": "36" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -43583,7 +46918,7 @@ "position": 1210, "name": "38" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, @@ -47672,7 +51007,7 @@ "position": 1213, "name": "39" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -48828,7 +52163,7 @@ "position": 1218, "name": "40" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -52917,7 +56252,7 @@ "position": 1221, "name": "41" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -54073,7 +57408,7 @@ "position": 1224, "name": "42" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -58162,7 +61497,7 @@ "position": 1322, "name": "45" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -62246,7 +65581,7 @@ "position": 1471, "name": "49" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -66330,7 +69665,7 @@ "position": 1574, "name": "52" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -70414,7 +73749,7 @@ "position": 1731, "name": "56" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -74498,7 +77833,7 @@ "position": 1827, "name": "59" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -78582,7 +81917,7 @@ "position": 1968, "name": "63" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -82666,7 +86001,7 @@ "position": 2017, "name": "67" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -83050,7 +86385,7 @@ "position": 2234, "name": "87" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -87235,7 +90570,7 @@ "position": 2237, "name": "88" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -88391,7 +91726,7 @@ "position": 2474, "name": "109" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, @@ -92605,7 +95940,7 @@ "position": 2882, "name": "110" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -92830,7 +96165,7 @@ "position": 3190, "name": "114" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, @@ -92930,7 +96265,7 @@ "position": 3194, "name": "115" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, diff --git a/tests/baselines/reference/completionsCommentsCommentParsing.baseline b/tests/baselines/reference/completionsCommentsCommentParsing.baseline index 2d826f426fa8d..b7823ca0e0d46 100644 --- a/tests/baselines/reference/completionsCommentsCommentParsing.baseline +++ b/tests/baselines/reference/completionsCommentsCommentParsing.baseline @@ -1,3 +1,1326 @@ +=== /tests/cases/fourslash/completionsCommentsCommentParsing.ts === +// /// This is simple /// comments +// function simple() { +// } +// +// simple( ); +// +// /// multiLine /// Comments +// /// This is example of multiline /// comments +// /// Another multiLine +// function multiLine() { +// } +// multiLine( ); +// +// /** this is eg of single line jsdoc style comment */ +// function jsDocSingleLine() { +// } +// jsDocSingleLine(); +// +// +// /** this is multiple line jsdoc stule comment +// *New line1 +// *New Line2*/ +// function jsDocMultiLine() { +// } +// jsDocMultiLine(); +// +// /** multiple line jsdoc comments no longer merge +// *New line1 +// *New Line2*/ +// /** Shoul mege this line as well +// * and this too*/ /** Another this one too*/ +// function jsDocMultiLineMerge() { +// } +// jsDocMultiLineMerge(); +// +// +// /// Triple slash comment +// /** jsdoc comment */ +// function jsDocMixedComments1() { +// } +// jsDocMixedComments1(); +// +// /// Triple slash comment +// /** jsdoc comment */ /** another jsDocComment*/ +// function jsDocMixedComments2() { +// } +// jsDocMixedComments2(); +// +// /** jsdoc comment */ /*** triplestar jsDocComment*/ +// /// Triple slash comment +// function jsDocMixedComments3() { +// } +// jsDocMixedComments3(); +// +// /** jsdoc comment */ /** another jsDocComment*/ +// /// Triple slash comment +// /// Triple slash comment 2 +// function jsDocMixedComments4() { +// } +// jsDocMixedComments4(); +// +// /// Triple slash comment 1 +// /** jsdoc comment */ /** another jsDocComment*/ +// /// Triple slash comment +// /// Triple slash comment 2 +// function jsDocMixedComments5() { +// } +// jsDocMixedComments5(); +// +// /** another jsDocComment*/ +// /// Triple slash comment 1 +// /// Triple slash comment +// /// Triple slash comment 2 +// /** jsdoc comment */ +// function jsDocMixedComments6() { +// } +// jsDocMixedComments6(); +// +// // This shoulnot be help comment +// function noHelpComment1() { +// } +// noHelpComment1(); +// +// /* This shoulnot be help comment */ +// function noHelpComment2() { +// } +// noHelpComment2(); +// +// function noHelpComment3() { +// } +// noHelpComment3(); +// /** Adds two integers and returns the result +// * @param {number} a first number +// * @param b second number +// */ +// function sum(a: number, b: number) { +// return a + b; +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | (local var) arguments: IArguments +// | (parameter) b: number +// | function divide(a: number, b: number): void +// | function f1(a: number): any (+1 overload) +// | function fooBar(foo: string, bar: string): string +// | function jsDocCommentAlignmentTest1(): void +// | function jsDocCommentAlignmentTest2(): void +// | function jsDocCommentAlignmentTest3(a: string, b: any, c: any): void +// | function jsDocMixedComments1(): void +// | function jsDocMixedComments2(): void +// | function jsDocMixedComments3(): void +// | function jsDocMixedComments4(): void +// | function jsDocMixedComments5(): void +// | function jsDocMixedComments6(): void +// | function jsDocMultiLine(): void +// | function jsDocMultiLineMerge(): void +// | function jsDocParamTest(a: number, b: number, c: number, d: number): number +// | function jsDocSingleLine(): void +// | function multiLine(): void +// | function multiply(a: number, b: number, c?: number, d?: any, e?: any): void +// | function noHelpComment1(): void +// | function noHelpComment2(): void +// | function noHelpComment3(): void +// | class NoQuickInfoClass +// | function simple(): void +// | function square(a: number): number +// | function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | function sum(a: number, b: number): number +// | var x: any +// | var y: any +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// sum(10, 20); +// ^^^ +// | ---------------------------------------------------------------------- +// | function divide(a: number, b: number): void +// | function f1(a: number): any (+1 overload) +// | function fooBar(foo: string, bar: string): string +// | function jsDocCommentAlignmentTest1(): void +// | function jsDocCommentAlignmentTest2(): void +// | function jsDocCommentAlignmentTest3(a: string, b: any, c: any): void +// | function jsDocMixedComments1(): void +// | function jsDocMixedComments2(): void +// | function jsDocMixedComments3(): void +// | function jsDocMixedComments4(): void +// | function jsDocMixedComments5(): void +// | function jsDocMixedComments6(): void +// | function jsDocMultiLine(): void +// | function jsDocMultiLineMerge(): void +// | function jsDocParamTest(a: number, b: number, c: number, d: number): number +// | function jsDocSingleLine(): void +// | function multiLine(): void +// | function multiply(a: number, b: number, c?: number, d?: any, e?: any): void +// | function noHelpComment1(): void +// | function noHelpComment2(): void +// | function noHelpComment3(): void +// | class NoQuickInfoClass +// | function simple(): void +// | function square(a: number): number +// | function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | function sum(a: number, b: number): number +// | var x: any +// | var y: any +// | var Array: ArrayConstructor +// | (arrayLength?: number) => any[] (+2 overloads) +// | interface Array +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | var Boolean: BooleanConstructor +// | (value?: T) => boolean +// | interface Boolean +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | var Date: DateConstructor +// | () => string +// | interface Date +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | var Error: ErrorConstructor +// | (message?: string) => Error +// | interface Error +// | function eval(x: string): any +// | var EvalError: EvalErrorConstructor +// | (message?: string) => EvalError (+1 overload) +// | interface EvalError +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | var Function: FunctionConstructor +// | (...args: string[]) => Function +// | interface Function +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | var Number: NumberConstructor +// | (value?: any) => number +// | interface Number +// | var Object: ObjectConstructor +// | () => any (+1 overload) +// | interface Object +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | var RangeError: RangeErrorConstructor +// | (message?: string) => RangeError (+1 overload) +// | interface RangeError +// | var ReferenceError: ReferenceErrorConstructor +// | (message?: string) => ReferenceError (+1 overload) +// | interface ReferenceError +// | var RegExp: RegExpConstructor +// | (pattern: string | RegExp) => RegExp (+1 overload) +// | interface RegExp +// | return +// | satisfies +// | var String: StringConstructor +// | (value?: any) => string +// | interface String +// | super +// | switch +// | var SyntaxError: SyntaxErrorConstructor +// | (message?: string) => SyntaxError (+1 overload) +// | interface SyntaxError +// | this +// | throw +// | true +// | try +// | type +// | var TypeError: TypeErrorConstructor +// | (message?: string) => TypeError (+1 overload) +// | interface TypeError +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | var URIError: URIErrorConstructor +// | (message?: string) => URIError (+1 overload) +// | interface URIError +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// /** This is multiplication function +// * @param +// * @param a first number +// * @param b +// * @param c { +// @param d @anotherTag +// * @param e LastParam @anotherTag*/ +// function multiply(a: number, b: number, c?: number, d?, e?) { +// } +// multiply(10, 20, 30, 40, 50); +// /** fn f1 with number +// * @param { string} b about b +// */ +// function f1(a: number); +// function f1(b: string); +// /**@param opt optional parameter*/ +// function f1(aOrb, opt?) { +// return aOrb; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (parameter) aOrb: any +// | (local var) arguments: IArguments +// | function divide(a: number, b: number): void +// | function f1(a: number): any (+1 overload) +// | function fooBar(foo: string, bar: string): string +// | function jsDocCommentAlignmentTest1(): void +// | function jsDocCommentAlignmentTest2(): void +// | function jsDocCommentAlignmentTest3(a: string, b: any, c: any): void +// | function jsDocMixedComments1(): void +// | function jsDocMixedComments2(): void +// | function jsDocMixedComments3(): void +// | function jsDocMixedComments4(): void +// | function jsDocMixedComments5(): void +// | function jsDocMixedComments6(): void +// | function jsDocMultiLine(): void +// | function jsDocMultiLineMerge(): void +// | function jsDocParamTest(a: number, b: number, c: number, d: number): number +// | function jsDocSingleLine(): void +// | function multiLine(): void +// | function multiply(a: number, b: number, c?: number, d?: any, e?: any): void +// | function noHelpComment1(): void +// | function noHelpComment2(): void +// | function noHelpComment3(): void +// | class NoQuickInfoClass +// | (parameter) opt: any +// | function simple(): void +// | function square(a: number): number +// | function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | function sum(a: number, b: number): number +// | var x: any +// | var y: any +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// f1(10); +// f1("hello"); +// +// ^ +// | ---------------------------------------------------------------------- +// | function divide(a: number, b: number): void +// | function f1(a: number): any (+1 overload) +// | function fooBar(foo: string, bar: string): string +// | function jsDocCommentAlignmentTest1(): void +// | function jsDocCommentAlignmentTest2(): void +// | function jsDocCommentAlignmentTest3(a: string, b: any, c: any): void +// | function jsDocMixedComments1(): void +// | function jsDocMixedComments2(): void +// | function jsDocMixedComments3(): void +// | function jsDocMixedComments4(): void +// | function jsDocMixedComments5(): void +// | function jsDocMixedComments6(): void +// | function jsDocMultiLine(): void +// | function jsDocMultiLineMerge(): void +// | function jsDocParamTest(a: number, b: number, c: number, d: number): number +// | function jsDocSingleLine(): void +// | function multiLine(): void +// | function multiply(a: number, b: number, c?: number, d?: any, e?: any): void +// | function noHelpComment1(): void +// | function noHelpComment2(): void +// | function noHelpComment3(): void +// | class NoQuickInfoClass +// | function simple(): void +// | function square(a: number): number +// | function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | function sum(a: number, b: number): number +// | var x: any +// | var y: any +// | abstract +// | any +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | asserts +// | async +// | await +// | bigint +// | boolean +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | declare +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | infer +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | keyof +// | let +// | interface Math +// | var Math: Math +// | module +// | namespace +// | var NaN: number +// | never +// | new +// | null +// | number +// | interface Number +// | var Number: NumberConstructor +// | object +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | readonly +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | string +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | symbol +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | unique +// | unknown +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// /** This is subtract function +// @param { a +// *@param { number | } b this is about b +// @param { { () => string; } } c this is optional param c +// @param { { () => string; } d this is optional param d +// @param { { () => string; } } e this is optional param e +// @param { { { () => string; } } f this is optional param f +// */ +// function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string) { +// } +// subtract(10, 20, null, null, null, null); +// /** this is square function +// @paramTag { number } a this is input number of paramTag +// @param { number } a this is input number +// @returnType { number } it is return type +// */ +// function square(a: number) { +// return a * a; +// } +// square(10); +// /** this is divide function +// @param { number} a this is a +// @paramTag { number } g this is optional param g +// @param { number} b this is b +// */ +// function divide(a: number, b: number) { +// } +// divide(10, 20); +// /** +// Function returns string concat of foo and bar +// @param {string} foo is string +// @param {string} bar is second string +// */ +// function fooBar(foo: string, bar: string) { +// return foo + bar; +// } +// fooBar("foo","bar"); +// /** This is a comment */ +// var x; +// /** +// * This is a comment +// */ +// var y; +// /** this is jsdoc style function with param tag as well as inline parameter help +// *@param a it is first parameter +// *@param c it is third parameter +// */ +// function jsDocParamTest(/** this is inline comment for a */a: number, /** this is inline comment for b*/ b: number, c: number, d: number) { +// return a + b + c + d; +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | (local var) arguments: IArguments +// | (parameter) b: number +// | (parameter) c: number +// | (parameter) d: number +// | function divide(a: number, b: number): void +// | function f1(a: number): any (+1 overload) +// | function fooBar(foo: string, bar: string): string +// | function jsDocCommentAlignmentTest1(): void +// | function jsDocCommentAlignmentTest2(): void +// | function jsDocCommentAlignmentTest3(a: string, b: any, c: any): void +// | function jsDocMixedComments1(): void +// | function jsDocMixedComments2(): void +// | function jsDocMixedComments3(): void +// | function jsDocMixedComments4(): void +// | function jsDocMixedComments5(): void +// | function jsDocMixedComments6(): void +// | function jsDocMultiLine(): void +// | function jsDocMultiLineMerge(): void +// | function jsDocParamTest(a: number, b: number, c: number, d: number): number +// | function jsDocSingleLine(): void +// | function multiLine(): void +// | function multiply(a: number, b: number, c?: number, d?: any, e?: any): void +// | function noHelpComment1(): void +// | function noHelpComment2(): void +// | function noHelpComment3(): void +// | class NoQuickInfoClass +// | function simple(): void +// | function square(a: number): number +// | function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | function sum(a: number, b: number): number +// | var x: any +// | var y: any +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// jsDocParamTest(30, 40, 50, 60); +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function divide(a: number, b: number): void +// | function f1(a: number): any (+1 overload) +// | function fooBar(foo: string, bar: string): string +// | function jsDocCommentAlignmentTest1(): void +// | function jsDocCommentAlignmentTest2(): void +// | function jsDocCommentAlignmentTest3(a: string, b: any, c: any): void +// | function jsDocMixedComments1(): void +// | function jsDocMixedComments2(): void +// | function jsDocMixedComments3(): void +// | function jsDocMixedComments4(): void +// | function jsDocMixedComments5(): void +// | function jsDocMixedComments6(): void +// | function jsDocMultiLine(): void +// | function jsDocMultiLineMerge(): void +// | function jsDocParamTest(a: number, b: number, c: number, d: number): number +// | function jsDocSingleLine(): void +// | function multiLine(): void +// | function multiply(a: number, b: number, c?: number, d?: any, e?: any): void +// | function noHelpComment1(): void +// | function noHelpComment2(): void +// | function noHelpComment3(): void +// | class NoQuickInfoClass +// | function simple(): void +// | function square(a: number): number +// | function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | function sum(a: number, b: number): number +// | var x: any +// | var y: any +// | var Array: ArrayConstructor +// | (arrayLength?: number) => any[] (+2 overloads) +// | interface Array +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | var Boolean: BooleanConstructor +// | (value?: T) => boolean +// | interface Boolean +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | var Date: DateConstructor +// | () => string +// | interface Date +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | var Error: ErrorConstructor +// | (message?: string) => Error +// | interface Error +// | function eval(x: string): any +// | var EvalError: EvalErrorConstructor +// | (message?: string) => EvalError (+1 overload) +// | interface EvalError +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | var Function: FunctionConstructor +// | (...args: string[]) => Function +// | interface Function +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | var Number: NumberConstructor +// | (value?: any) => number +// | interface Number +// | var Object: ObjectConstructor +// | () => any (+1 overload) +// | interface Object +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | var RangeError: RangeErrorConstructor +// | (message?: string) => RangeError (+1 overload) +// | interface RangeError +// | var ReferenceError: ReferenceErrorConstructor +// | (message?: string) => ReferenceError (+1 overload) +// | interface ReferenceError +// | var RegExp: RegExpConstructor +// | (pattern: string | RegExp) => RegExp (+1 overload) +// | interface RegExp +// | return +// | satisfies +// | var String: StringConstructor +// | (value?: any) => string +// | interface String +// | super +// | switch +// | var SyntaxError: SyntaxErrorConstructor +// | (message?: string) => SyntaxError (+1 overload) +// | interface SyntaxError +// | this +// | throw +// | true +// | try +// | type +// | var TypeError: TypeErrorConstructor +// | (message?: string) => TypeError (+1 overload) +// | interface TypeError +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | var URIError: URIErrorConstructor +// | (message?: string) => URIError (+1 overload) +// | interface URIError +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// /** This is function comment +// * And properly aligned comment +// */ +// function jsDocCommentAlignmentTest1() { +// } +// jsDocCommentAlignmentTest1(); +// /** This is function comment +// * And aligned with 4 space char margin +// */ +// function jsDocCommentAlignmentTest2() { +// } +// jsDocCommentAlignmentTest2(); +// /** This is function comment +// * And aligned with 4 space char margin +// * @param {string} a this is info about a +// * spanning on two lines and aligned perfectly +// * @param b this is info about b +// * spanning on two lines and aligned perfectly +// * spanning one more line alined perfectly +// * spanning another line with more margin +// * @param c this is info about b +// * not aligned text about parameter will eat only one space +// */ +// function jsDocCommentAlignmentTest3(a: string, b, c) { +// } +// jsDocCommentAlignmentTest3("hello",1, 2); +// +// ^ +// | ---------------------------------------------------------------------- +// | function divide(a: number, b: number): void +// | function f1(a: number): any (+1 overload) +// | function fooBar(foo: string, bar: string): string +// | function jsDocCommentAlignmentTest1(): void +// | function jsDocCommentAlignmentTest2(): void +// | function jsDocCommentAlignmentTest3(a: string, b: any, c: any): void +// | function jsDocMixedComments1(): void +// | function jsDocMixedComments2(): void +// | function jsDocMixedComments3(): void +// | function jsDocMixedComments4(): void +// | function jsDocMixedComments5(): void +// | function jsDocMixedComments6(): void +// | function jsDocMultiLine(): void +// | function jsDocMultiLineMerge(): void +// | function jsDocParamTest(a: number, b: number, c: number, d: number): number +// | function jsDocSingleLine(): void +// | function multiLine(): void +// | function multiply(a: number, b: number, c?: number, d?: any, e?: any): void +// | function noHelpComment1(): void +// | function noHelpComment2(): void +// | function noHelpComment3(): void +// | class NoQuickInfoClass +// | function simple(): void +// | function square(a: number): number +// | function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | function sum(a: number, b: number): number +// | var x: any +// | var y: any +// | abstract +// | any +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | asserts +// | async +// | await +// | bigint +// | boolean +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | declare +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | infer +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | keyof +// | let +// | interface Math +// | var Math: Math +// | module +// | namespace +// | var NaN: number +// | never +// | new +// | null +// | number +// | interface Number +// | var Number: NumberConstructor +// | object +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | readonly +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | string +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | symbol +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | unique +// | unknown +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// class NoQuickInfoClass { +// } + [ { "marker": { @@ -5,7 +1328,7 @@ "position": 1915, "name": "18" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, @@ -5677,7 +7000,7 @@ "position": 1924, "name": "15" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, @@ -12145,7 +13468,7 @@ "position": 2361, "name": "24" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, @@ -17793,7 +19116,7 @@ "position": 2390, "name": "27" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, @@ -23506,7 +24829,7 @@ "position": 3874, "name": "39" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, @@ -29273,7 +30596,7 @@ "position": 3891, "name": "44" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, @@ -35741,7 +37064,7 @@ "position": 4841, "name": "" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, diff --git a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline index df5b2c5a1a61a..e8b72b51f629b 100644 --- a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline @@ -1,3 +1,427 @@ +=== /tests/cases/fourslash/completionsCommentsFunctionDeclaration.ts === +// /** This comment should appear for foo*/ +// function foo() { +// } +// foo(); +// ^^^ +// | ---------------------------------------------------------------------- +// | function fn(a: string): any +// | function foo(): void +// | function fooWithParameters(a: string, b: number): void +// | var Array: ArrayConstructor +// | (arrayLength?: number) => any[] (+2 overloads) +// | interface Array +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | var Boolean: BooleanConstructor +// | (value?: T) => boolean +// | interface Boolean +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | var Date: DateConstructor +// | () => string +// | interface Date +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | var Error: ErrorConstructor +// | (message?: string) => Error +// | interface Error +// | function eval(x: string): any +// | var EvalError: EvalErrorConstructor +// | (message?: string) => EvalError (+1 overload) +// | interface EvalError +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | var Function: FunctionConstructor +// | (...args: string[]) => Function +// | interface Function +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | var Number: NumberConstructor +// | (value?: any) => number +// | interface Number +// | var Object: ObjectConstructor +// | () => any (+1 overload) +// | interface Object +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | var RangeError: RangeErrorConstructor +// | (message?: string) => RangeError (+1 overload) +// | interface RangeError +// | var ReferenceError: ReferenceErrorConstructor +// | (message?: string) => ReferenceError (+1 overload) +// | interface ReferenceError +// | var RegExp: RegExpConstructor +// | (pattern: string | RegExp) => RegExp (+1 overload) +// | interface RegExp +// | return +// | satisfies +// | var String: StringConstructor +// | (value?: any) => string +// | interface String +// | super +// | switch +// | var SyntaxError: SyntaxErrorConstructor +// | (message?: string) => SyntaxError (+1 overload) +// | interface SyntaxError +// | this +// | throw +// | true +// | try +// | type +// | var TypeError: TypeErrorConstructor +// | (message?: string) => TypeError (+1 overload) +// | interface TypeError +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | var URIError: URIErrorConstructor +// | (message?: string) => URIError (+1 overload) +// | interface URIError +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// /** This is comment for function signature*/ +// function fooWithParameters(/** this is comment about a*/a: string, +// /** this is comment for b*/ +// b: number) { +// var d = a; +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: string +// | (local var) arguments: IArguments +// | (parameter) b: number +// | function fn(a: string): any +// | function foo(): void +// | function fooWithParameters(a: string, b: number): void +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// fooWithParameters("a",10); +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function fn(a: string): any +// | function foo(): void +// | function fooWithParameters(a: string, b: number): void +// | var Array: ArrayConstructor +// | (arrayLength?: number) => any[] (+2 overloads) +// | interface Array +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | var Boolean: BooleanConstructor +// | (value?: T) => boolean +// | interface Boolean +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | var Date: DateConstructor +// | () => string +// | interface Date +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | var Error: ErrorConstructor +// | (message?: string) => Error +// | interface Error +// | function eval(x: string): any +// | var EvalError: EvalErrorConstructor +// | (message?: string) => EvalError (+1 overload) +// | interface EvalError +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | var Function: FunctionConstructor +// | (...args: string[]) => Function +// | interface Function +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | var Number: NumberConstructor +// | (value?: any) => number +// | interface Number +// | var Object: ObjectConstructor +// | () => any (+1 overload) +// | interface Object +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | var RangeError: RangeErrorConstructor +// | (message?: string) => RangeError (+1 overload) +// | interface RangeError +// | var ReferenceError: ReferenceErrorConstructor +// | (message?: string) => ReferenceError (+1 overload) +// | interface ReferenceError +// | var RegExp: RegExpConstructor +// | (pattern: string | RegExp) => RegExp (+1 overload) +// | interface RegExp +// | return +// | satisfies +// | var String: StringConstructor +// | (value?: any) => string +// | interface String +// | super +// | switch +// | var SyntaxError: SyntaxErrorConstructor +// | (message?: string) => SyntaxError (+1 overload) +// | interface SyntaxError +// | this +// | throw +// | true +// | try +// | type +// | var TypeError: TypeErrorConstructor +// | (message?: string) => TypeError (+1 overload) +// | interface TypeError +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | var URIError: URIErrorConstructor +// | (message?: string) => URIError (+1 overload) +// | interface URIError +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// /** +// * Does something +// * @param a a string +// */ +// declare function fn(a: string); +// fn("hello"); + [ { "marker": { @@ -5,7 +429,7 @@ "position": 63, "name": "3" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, @@ -4340,7 +4764,7 @@ "position": 240, "name": "7" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -7841,7 +8265,7 @@ "position": 262, "name": "9" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, diff --git a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline index 7a354bdbd0513..dbafae6e08da1 100644 --- a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline @@ -1,3 +1,601 @@ +=== /tests/cases/fourslash/completionsCommentsFunctionExpression.ts === +// /** lambdaFoo var comment*/ +// var lambdaFoo = /** this is lambda comment*/ (/**param a*/a: number, /**param b*/b: number) => a + b; +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | function anotherFunc(a: number): string +// | var assigned: (s: string) => number +// | (parameter) b: number +// | var lambdaFoo: (a: number, b: number) => number +// | var lambddaNoVarComment: (a: number, b: number) => number +// | abstract +// | any +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | asserts +// | async +// | await +// | bigint +// | boolean +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | declare +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | infer +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | keyof +// | let +// | interface Math +// | var Math: Math +// | module +// | namespace +// | var NaN: number +// | never +// | new +// | null +// | number +// | interface Number +// | var Number: NumberConstructor +// | object +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | readonly +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | string +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | symbol +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | unique +// | unknown +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// var lambddaNoVarComment = /** this is lambda multiplication*/ (/**param a*/a: number, /**param b*/b: number) => a * b; +// lambdaFoo(10, 20); +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function anotherFunc(a: number): string +// | var assigned: (s: string) => number +// | var lambdaFoo: (a: number, b: number) => number +// | var lambddaNoVarComment: (a: number, b: number) => number +// | abstract +// | any +// | var Array: ArrayConstructor +// | (arrayLength?: number) => any[] (+2 overloads) +// | interface Array +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | asserts +// | async +// | await +// | bigint +// | boolean +// | var Boolean: BooleanConstructor +// | (value?: T) => boolean +// | interface Boolean +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | var Date: DateConstructor +// | () => string +// | interface Date +// | debugger +// | declare +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | var Error: ErrorConstructor +// | (message?: string) => Error +// | interface Error +// | function eval(x: string): any +// | var EvalError: EvalErrorConstructor +// | (message?: string) => EvalError (+1 overload) +// | interface EvalError +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | var Function: FunctionConstructor +// | (...args: string[]) => Function +// | interface Function +// | module globalThis +// | if +// | implements +// | import +// | in +// | infer +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | keyof +// | let +// | interface Math +// | var Math: Math +// | module +// | namespace +// | var NaN: number +// | never +// | new +// | null +// | number +// | var Number: NumberConstructor +// | (value?: any) => number +// | interface Number +// | object +// | var Object: ObjectConstructor +// | () => any (+1 overload) +// | interface Object +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | var RangeError: RangeErrorConstructor +// | (message?: string) => RangeError (+1 overload) +// | interface RangeError +// | readonly +// | var ReferenceError: ReferenceErrorConstructor +// | (message?: string) => ReferenceError (+1 overload) +// | interface ReferenceError +// | var RegExp: RegExpConstructor +// | (pattern: string | RegExp) => RegExp (+1 overload) +// | interface RegExp +// | return +// | satisfies +// | string +// | var String: StringConstructor +// | (value?: any) => string +// | interface String +// | super +// | switch +// | symbol +// | var SyntaxError: SyntaxErrorConstructor +// | (message?: string) => SyntaxError (+1 overload) +// | interface SyntaxError +// | this +// | throw +// | true +// | try +// | type +// | var TypeError: TypeErrorConstructor +// | (message?: string) => TypeError (+1 overload) +// | interface TypeError +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | unique +// | unknown +// | var URIError: URIErrorConstructor +// | (message?: string) => URIError (+1 overload) +// | interface URIError +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// function anotherFunc(a: number) { +// /** documentation +// @param b {string} inner parameter */ +// var lambdaVar = /** inner docs */(b: string) => { +// var localVar = "Hello "; +// return localVar + b; +// } +// return lambdaVar("World") + a; +// } +// /** +// * On variable +// * @param s the first parameter! +// * @returns the parameter's length +// */ +// var assigned = /** +// * Summary on expression +// * @param s param on expression +// * @returns return on expression +// */function(/** On parameter */s: string) { +// return s.length; +// ^ +// | ---------------------------------------------------------------------- +// | function anotherFunc(a: number): string +// | (local var) arguments: IArguments +// | var assigned: (s: string) => number +// | var lambdaFoo: (a: number, b: number) => number +// | var lambddaNoVarComment: (a: number, b: number) => number +// | (parameter) s: string +// | interface Array +// | var Array: ArrayConstructor +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | interface Boolean +// | var Boolean: BooleanConstructor +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | interface Date +// | var Date: DateConstructor +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | interface Error +// | var Error: ErrorConstructor +// | function eval(x: string): any +// | interface EvalError +// | var EvalError: EvalErrorConstructor +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | interface Function +// | var Function: FunctionConstructor +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | interface Number +// | var Number: NumberConstructor +// | interface Object +// | var Object: ObjectConstructor +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | interface RangeError +// | var RangeError: RangeErrorConstructor +// | interface ReferenceError +// | var ReferenceError: ReferenceErrorConstructor +// | interface RegExp +// | var RegExp: RegExpConstructor +// | return +// | satisfies +// | interface String +// | var String: StringConstructor +// | super +// | switch +// | interface SyntaxError +// | var SyntaxError: SyntaxErrorConstructor +// | this +// | throw +// | true +// | try +// | type +// | interface TypeError +// | var TypeError: TypeErrorConstructor +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | interface URIError +// | var URIError: URIErrorConstructor +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- +// } +// assigned("hey"); +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function anotherFunc(a: number): string +// | var assigned: (s: string) => number +// | var lambdaFoo: (a: number, b: number) => number +// | var lambddaNoVarComment: (a: number, b: number) => number +// | var Array: ArrayConstructor +// | (arrayLength?: number) => any[] (+2 overloads) +// | interface Array +// | interface ArrayBuffer +// | var ArrayBuffer: ArrayBufferConstructor +// | as +// | async +// | await +// | var Boolean: BooleanConstructor +// | (value?: T) => boolean +// | interface Boolean +// | break +// | case +// | catch +// | class +// | const +// | continue +// | interface DataView +// | var DataView: DataViewConstructor +// | var Date: DateConstructor +// | () => string +// | interface Date +// | debugger +// | function decodeURI(encodedURI: string): string +// | function decodeURIComponent(encodedURIComponent: string): string +// | default +// | delete +// | do +// | else +// | function encodeURI(uri: string): string +// | function encodeURIComponent(uriComponent: string | number | boolean): string +// | enum +// | var Error: ErrorConstructor +// | (message?: string) => Error +// | interface Error +// | function eval(x: string): any +// | var EvalError: EvalErrorConstructor +// | (message?: string) => EvalError (+1 overload) +// | interface EvalError +// | export +// | extends +// | false +// | finally +// | interface Float32Array +// | var Float32Array: Float32ArrayConstructor +// | interface Float64Array +// | var Float64Array: Float64ArrayConstructor +// | for +// | function +// | var Function: FunctionConstructor +// | (...args: string[]) => Function +// | interface Function +// | module globalThis +// | if +// | implements +// | import +// | in +// | var Infinity: number +// | instanceof +// | interface Int16Array +// | var Int16Array: Int16ArrayConstructor +// | interface Int32Array +// | var Int32Array: Int32ArrayConstructor +// | interface Int8Array +// | var Int8Array: Int8ArrayConstructor +// | interface +// | namespace Intl +// | function isFinite(number: number): boolean +// | function isNaN(number: number): boolean +// | interface JSON +// | var JSON: JSON +// | let +// | interface Math +// | var Math: Math +// | var NaN: number +// | new +// | null +// | var Number: NumberConstructor +// | (value?: any) => number +// | interface Number +// | var Object: ObjectConstructor +// | () => any (+1 overload) +// | interface Object +// | package +// | function parseFloat(string: string): number +// | function parseInt(string: string, radix?: number): number +// | var RangeError: RangeErrorConstructor +// | (message?: string) => RangeError (+1 overload) +// | interface RangeError +// | var ReferenceError: ReferenceErrorConstructor +// | (message?: string) => ReferenceError (+1 overload) +// | interface ReferenceError +// | var RegExp: RegExpConstructor +// | (pattern: string | RegExp) => RegExp (+1 overload) +// | interface RegExp +// | return +// | satisfies +// | var String: StringConstructor +// | (value?: any) => string +// | interface String +// | super +// | switch +// | var SyntaxError: SyntaxErrorConstructor +// | (message?: string) => SyntaxError (+1 overload) +// | interface SyntaxError +// | this +// | throw +// | true +// | try +// | type +// | var TypeError: TypeErrorConstructor +// | (message?: string) => TypeError (+1 overload) +// | interface TypeError +// | typeof +// | interface Uint16Array +// | var Uint16Array: Uint16ArrayConstructor +// | interface Uint32Array +// | var Uint32Array: Uint32ArrayConstructor +// | interface Uint8Array +// | var Uint8Array: Uint8ArrayConstructor +// | interface Uint8ClampedArray +// | var Uint8ClampedArray: Uint8ClampedArrayConstructor +// | var undefined +// | var URIError: URIErrorConstructor +// | (message?: string) => URIError (+1 overload) +// | interface URIError +// | var +// | void +// | while +// | with +// | yield +// | function escape(string: string): string +// | function unescape(string: string): string +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +603,7 @@ "position": 123, "name": "2" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": false, @@ -3865,7 +4463,7 @@ "position": 249, "name": "4" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, @@ -8600,7 +9198,7 @@ "position": 841, "name": "15" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, @@ -12291,7 +12889,7 @@ "position": 861, "name": "17" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": true, "isMemberCompletion": false, diff --git a/tests/baselines/reference/completionsJSDocTags.baseline b/tests/baselines/reference/completionsJSDocTags.baseline index 945b84dd88ba7..b2a527a86800a 100644 --- a/tests/baselines/reference/completionsJSDocTags.baseline +++ b/tests/baselines/reference/completionsJSDocTags.baseline @@ -1,3 +1,73 @@ +=== /tests/cases/fourslash/completionsJSDocTags.ts === +// /** +// * This is class Foo. +// * @mytag comment1 comment2 +// */ +// class Foo { +// /** +// * This is the constructor. +// * @myjsdoctag this is a comment +// */ +// constructor(value: number) {} +// /** +// * method1 documentation +// * @mytag comment1 comment2 +// */ +// static method1() {} +// /** +// * @mytag +// */ +// method2() {} +// /** +// * @mytag comment1 comment2 +// */ +// property1: string; +// /** +// * @mytag1 some comments +// * some more comments about mytag1 +// * @mytag2 +// * here all the comments are on a new line +// * @mytag3 +// * @mytag +// */ +// property2: number; +// /** +// * @returns {number} a value +// */ +// method3(): number { return 3; } +// /** +// * @param {string} foo A value. +// * @returns {number} Another value +// * @mytag +// */ +// method4(foo: string): number { return 3; } +// /** @mytag */ +// method5() {} +// /** method documentation +// * @mytag a JSDoc tag +// */ +// newMethod() {} +// } +// var foo = new Foo(4); +// Foo.method1(); +// foo.method2(); +// foo.method3(); +// foo.method4(); +// foo.property1; +// foo.property2; +// foo.method5(); +// foo.newMet +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) Foo.method2(): void +// | (method) Foo.method3(): number +// | (method) Foo.method4(foo: string): number +// | (method) Foo.method5(): void +// | (method) Foo.newMethod(): void +// | (property) Foo.property1: string +// | (property) Foo.property2: number +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +75,7 @@ "position": 1100, "name": "14" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, diff --git a/tests/baselines/reference/completionsOverridingMethod15.baseline b/tests/baselines/reference/completionsOverridingMethod15.baseline index 4c594a35f3527..62cfd2456b6c7 100644 --- a/tests/baselines/reference/completionsOverridingMethod15.baseline +++ b/tests/baselines/reference/completionsOverridingMethod15.baseline @@ -1,3 +1,29 @@ +=== /tests/cases/fourslash/completionsOverridingMethod15.ts === +// declare class B { +// get foo(): any; +// set foo(value: any); +// } +// class A extends B { +// +// ^ +// | ---------------------------------------------------------------------- +// | abstract +// | accessor +// | async +// | constructor +// | declare +// | get +// | override +// | private +// | protected +// | public +// | readonly +// | set +// | static +// | (property) B.foo: any +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +31,7 @@ "position": 89, "name": "" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, diff --git a/tests/baselines/reference/completionsOverridingMethod16.baseline b/tests/baselines/reference/completionsOverridingMethod16.baseline index 9bfad8e55a321..3f414dd075a12 100644 --- a/tests/baselines/reference/completionsOverridingMethod16.baseline +++ b/tests/baselines/reference/completionsOverridingMethod16.baseline @@ -1,3 +1,29 @@ +=== /tests/cases/fourslash/completionsOverridingMethod16.ts === +// declare class B { +// set foo(value: any); +// get foo(): any; +// } +// class A extends B { +// +// ^ +// | ---------------------------------------------------------------------- +// | abstract +// | accessor +// | async +// | constructor +// | declare +// | get +// | override +// | private +// | protected +// | public +// | readonly +// | set +// | static +// | (property) B.foo: any +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +31,7 @@ "position": 89, "name": "" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, diff --git a/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline b/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline index 732ce4a31642a..9fa60615f106c 100644 --- a/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline +++ b/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline @@ -1,3 +1,24 @@ +=== /tests/cases/fourslash/something.js === +// var C = function () { } +// /** +// * The prototype method. +// * @param {string} a Parameter definition. +// */ +// function f(a) {} +// C.prototype.m = f; +// +// var x = new C(); +// x.m(); +// ^ +// | ---------------------------------------------------------------------- +// | (property) C.m: (a: string) => void +// | (warning) a +// | (warning) C +// | (warning) f +// | (warning) prototype +// | (warning) x +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +26,7 @@ "position": 156, "name": "2" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, diff --git a/tests/baselines/reference/completionsStringMethods.baseline b/tests/baselines/reference/completionsStringMethods.baseline index d40c12a3539b0..dcbbb6336c9bf 100644 --- a/tests/baselines/reference/completionsStringMethods.baseline +++ b/tests/baselines/reference/completionsStringMethods.baseline @@ -1,3 +1,30 @@ +=== /tests/cases/fourslash/completionsStringMethods.ts === +// var s = "foo". +// ^ +// | ---------------------------------------------------------------------- +// | (method) String.charAt(pos: number): string +// | (method) String.charCodeAt(index: number): number +// | (method) String.concat(...strings: string[]): string +// | (method) String.indexOf(searchString: string, position?: number): number +// | (method) String.lastIndexOf(searchString: string, position?: number): number +// | (property) String.length: number +// | (method) String.localeCompare(that: string): number (+1 overload) +// | (method) String.match(regexp: string | RegExp): RegExpMatchArray +// | (method) String.replace(searchValue: string | RegExp, replaceValue: string): string (+1 overload) +// | (method) String.search(regexp: string | RegExp): number +// | (method) String.slice(start?: number, end?: number): string +// | (method) String.split(separator: string | RegExp, limit?: number): string[] +// | (method) String.substring(start: number, end?: number): string +// | (method) String.toLocaleLowerCase(locales?: string | string[]): string +// | (method) String.toLocaleUpperCase(locales?: string | string[]): string +// | (method) String.toLowerCase(): string +// | (method) String.toString(): string +// | (method) String.toUpperCase(): string +// | (method) String.trim(): string +// | (method) String.valueOf(): string +// | (method) String.substr(from: number, length?: number): string +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +32,7 @@ "position": 14, "name": "1" }, - "completionList": { + "item": { "flags": 0, "isGlobalCompletion": false, "isMemberCompletion": true, diff --git a/tests/baselines/reference/deprecatedInheritedJSDocOverload.baseline b/tests/baselines/reference/deprecatedInheritedJSDocOverload.baseline index 5bfdc82fecaa8..6fe36668283c8 100644 --- a/tests/baselines/reference/deprecatedInheritedJSDocOverload.baseline +++ b/tests/baselines/reference/deprecatedInheritedJSDocOverload.baseline @@ -1,3 +1,34 @@ +=== /tests/cases/fourslash/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(() => { +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) ThingWithDeprecations.subscribe(observer?: PartialObserver): Subscription (+2 overloads) +// | ---------------------------------------------------------------------- +// console.log('something happened'); +// }); + [ { "marker": { @@ -5,7 +36,7 @@ "position": 1183, "name": "" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/jsDocAliasQuickInfo.baseline b/tests/baselines/reference/jsDocAliasQuickInfo.baseline index 1c41394a85610..6cefb8e5eee21 100644 --- a/tests/baselines/reference/jsDocAliasQuickInfo.baseline +++ b/tests/baselines/reference/jsDocAliasQuickInfo.baseline @@ -1,3 +1,31 @@ +=== /jsDocAliasQuickInfo.ts === +// /** +// * Comment +// * @type {number} +// */ +// export default 10; +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) default: 10 +// | Comment +// | @type {number} +// | ---------------------------------------------------------------------- + +=== /test.ts === +// export { default as test } from "./jsDocAliasQuickInfo"; +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) default: 10 +// | Comment +// | @type {number} +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | export test +// | Comment +// | @type {number} +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +33,7 @@ "position": 44, "name": "1" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "export", "textSpan": { @@ -71,7 +99,7 @@ "position": 9, "name": "2" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "export", "textSpan": { @@ -137,7 +165,7 @@ "position": 20, "name": "3" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "export", "textSpan": { diff --git a/tests/baselines/reference/jsDocDontBreakWithNamespaces.baseline b/tests/baselines/reference/jsDocDontBreakWithNamespaces.baseline index df5d7365580d6..6193417fbcfbe 100644 --- a/tests/baselines/reference/jsDocDontBreakWithNamespaces.baseline +++ b/tests/baselines/reference/jsDocDontBreakWithNamespaces.baseline @@ -1,3 +1,33 @@ +=== /tests/cases/fourslash/jsDocDontBreakWithNamespaces.js === +// /** +// * @returns {module:@nodefuel/web~Webserver~wsServer#hello} Websocket server object +// */ +// function foo() { } +// foo(''); +// ^ +// | ---------------------------------------------------------------------- +// | foo(): any +// | @returns Websocket server object +// | ---------------------------------------------------------------------- +// +// /** +// * @type {module:xxxxx} */ +// */ +// function bar() { } +// bar(''); +// ^ +// | ---------------------------------------------------------------------- +// | bar(): void +// | ---------------------------------------------------------------------- +// +// /** @type {function(module:xxxx, module:xxxx): module:xxxxx} */ +// function zee() { } +// zee(''); +// ^ +// | ---------------------------------------------------------------------- +// | zee(**arg0: any**, arg1: any, arg2: any): any +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +35,7 @@ "position": 117, "name": "foo" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -77,7 +107,7 @@ "position": 181, "name": "bar" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -139,7 +169,7 @@ "position": 274, "name": "zee" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/jsDocFunctionSignatures5.baseline b/tests/baselines/reference/jsDocFunctionSignatures5.baseline index 7b2c9b728d29c..003c9614018be 100644 --- a/tests/baselines/reference/jsDocFunctionSignatures5.baseline +++ b/tests/baselines/reference/jsDocFunctionSignatures5.baseline @@ -1,3 +1,27 @@ +=== /tests/cases/fourslash/Foo.js === +// /** +// * Filters a path based on a regexp or glob pattern. +// * @param {String} basePath The base path where the search will be performed. +// * @param {String} pattern A string defining a regexp of a glob pattern. +// * @param {String} type The search pattern type, can be a regexp or a glob. +// * @param {Object} options A object containing options to the search. +// * @return {Array} A list containing the filtered paths. +// */ +// function pathFilter(basePath, pattern, type, options){ +// //... +// } +// pathFilter('foo', 'bar', 'baz', {}); +// ^ +// | ---------------------------------------------------------------------- +// | pathFilter(**basePath: string**, pattern: string, type: string, options: any): any[] +// | Filters a path based on a regexp or glob pattern. +// | @param basePath The base path where the search will be performed. +// | @param pattern A string defining a regexp of a glob pattern. +// | @param type The search pattern type, can be a regexp or a glob. +// | @param options A object containing options to the search. +// | @return A list containing the filtered paths. +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +29,7 @@ "position": 489, "name": "" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/jsDocFunctionSignatures6.baseline b/tests/baselines/reference/jsDocFunctionSignatures6.baseline index 2d5e8aebc8397..643979b9f02f6 100644 --- a/tests/baselines/reference/jsDocFunctionSignatures6.baseline +++ b/tests/baselines/reference/jsDocFunctionSignatures6.baseline @@ -1,3 +1,33 @@ +=== /tests/cases/fourslash/Foo.js === +// /** +// * @param {string} p1 - A string param +// * @param {string?} p2 - An optional param +// * @param {string} [p3] - Another optional param +// * @param {string} [p4="test"] - An optional param with a default value +// */ +// function f1(p1, p2, p3, p4){} +// f1('foo', 'bar', 'baz', 'qux'); +// ^ +// | ---------------------------------------------------------------------- +// | f1(**p1: string**, p2: string, p3?: string, p4?: string): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | f1(p1: string, **p2: string**, p3?: string, p4?: string): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | f1(p1: string, p2: string, **p3?: string**, p4?: string): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | f1(p1: string, p2: string, p3?: string, **p4?: string**): void +// | @param p1 - A string param +// | @param p2 - An optional param +// | @param p3 - Another optional param +// | @param p4 - An optional param with a default value +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +35,7 @@ "position": 244, "name": "1" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -261,7 +291,7 @@ "position": 251, "name": "2" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -517,7 +547,7 @@ "position": 258, "name": "3" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -773,7 +803,7 @@ "position": 265, "name": "4" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/jsDocSignature-43394.baseline b/tests/baselines/reference/jsDocSignature-43394.baseline index 905b7e8bcccaa..1dccabe0b2c9d 100644 --- a/tests/baselines/reference/jsDocSignature-43394.baseline +++ b/tests/baselines/reference/jsDocSignature-43394.baseline @@ -1,3 +1,14 @@ +=== /tests/cases/fourslash/jsDocSignature-43394.ts === +// /** +// * @typedef {Object} Foo +// * @property {number} ... +// * @typedef {number} Bar +// ^ +// | ---------------------------------------------------------------------- +// | No signature help at /**/. +// | ---------------------------------------------------------------------- +// */ + [ { "marker": { diff --git a/tests/baselines/reference/jsDocTypeTagQuickInfo1.baseline b/tests/baselines/reference/jsDocTypeTagQuickInfo1.baseline index 26cd8417670c6..816b0a69d14eb 100644 --- a/tests/baselines/reference/jsDocTypeTagQuickInfo1.baseline +++ b/tests/baselines/reference/jsDocTypeTagQuickInfo1.baseline @@ -1,3 +1,96 @@ +=== /tests/cases/fourslash/jsDocTypeTag1.js === +// /** @type {String} */ +// var S; +// ^ +// | ---------------------------------------------------------------------- +// | var S: string +// | @type {String} +// | ---------------------------------------------------------------------- +// /** @type {Number} */ +// var N; +// ^ +// | ---------------------------------------------------------------------- +// | var N: number +// | @type {Number} +// | ---------------------------------------------------------------------- +// /** @type {Boolean} */ +// var B; +// ^ +// | ---------------------------------------------------------------------- +// | var B: boolean +// | @type {Boolean} +// | ---------------------------------------------------------------------- +// /** @type {Void} */ +// var V; +// ^ +// | ---------------------------------------------------------------------- +// | var V: void +// | @type {Void} +// | ---------------------------------------------------------------------- +// /** @type {Undefined} */ +// var U; +// ^ +// | ---------------------------------------------------------------------- +// | var U: undefined +// | @type {Undefined} +// | ---------------------------------------------------------------------- +// /** @type {Null} */ +// var Nl; +// ^^ +// | ---------------------------------------------------------------------- +// | var Nl: null +// | @type {Null} +// | ---------------------------------------------------------------------- +// /** @type {Array} */ +// var A; +// ^ +// | ---------------------------------------------------------------------- +// | var A: any[] +// | @type {Array} +// | ---------------------------------------------------------------------- +// /** @type {Promise} */ +// var P; +// ^ +// | ---------------------------------------------------------------------- +// | var P: Promise +// | @type {Promise} +// | ---------------------------------------------------------------------- +// /** @type {Object} */ +// var Obj; +// ^^^ +// | ---------------------------------------------------------------------- +// | var Obj: any +// | @type {Object} +// | ---------------------------------------------------------------------- +// /** @type {Function} */ +// var Func; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var Func: Function +// | @type {Function} +// | ---------------------------------------------------------------------- +// /** @type {*} */ +// var AnyType; +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | var AnyType: any +// | @type {*} +// | ---------------------------------------------------------------------- +// /** @type {?} */ +// var QType; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | var QType: any +// | @type {?} +// | ---------------------------------------------------------------------- +// /** @type {String|Number} */ +// var SOrN; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var SOrN: string | number +// | @type {String|Number} +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +98,7 @@ "position": 26, "name": "1" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -58,7 +151,7 @@ "position": 55, "name": "2" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -111,7 +204,7 @@ "position": 85, "name": "3" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -164,7 +257,7 @@ "position": 112, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -217,7 +310,7 @@ "position": 144, "name": "5" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -270,7 +363,7 @@ "position": 171, "name": "6" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -323,7 +416,7 @@ "position": 200, "name": "7" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -384,7 +477,7 @@ "position": 230, "name": "8" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -449,7 +542,7 @@ "position": 259, "name": "9" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -502,7 +595,7 @@ "position": 292, "name": "10" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -555,7 +648,7 @@ "position": 319, "name": "11" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -608,7 +701,7 @@ "position": 349, "name": "12" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -661,7 +754,7 @@ "position": 389, "name": "13" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/jsDocTypeTagQuickInfo2.baseline b/tests/baselines/reference/jsDocTypeTagQuickInfo2.baseline index 3548af40911e8..2c1244f0f50c0 100644 --- a/tests/baselines/reference/jsDocTypeTagQuickInfo2.baseline +++ b/tests/baselines/reference/jsDocTypeTagQuickInfo2.baseline @@ -1,3 +1,89 @@ +=== /tests/cases/fourslash/jsDocTypeTag2.js === +// /** @type {string} */ +// var s; +// ^ +// | ---------------------------------------------------------------------- +// | var s: string +// | @type {string} +// | ---------------------------------------------------------------------- +// /** @type {number} */ +// var n; +// ^ +// | ---------------------------------------------------------------------- +// | var n: number +// | @type {number} +// | ---------------------------------------------------------------------- +// /** @type {boolean} */ +// var b; +// ^ +// | ---------------------------------------------------------------------- +// | var b: boolean +// | @type {boolean} +// | ---------------------------------------------------------------------- +// /** @type {void} */ +// var v; +// ^ +// | ---------------------------------------------------------------------- +// | var v: void +// | @type {void} +// | ---------------------------------------------------------------------- +// /** @type {undefined} */ +// var u; +// ^ +// | ---------------------------------------------------------------------- +// | var u: undefined +// | @type {undefined} +// | ---------------------------------------------------------------------- +// /** @type {null} */ +// var nl; +// ^^ +// | ---------------------------------------------------------------------- +// | var nl: null +// | @type {null} +// | ---------------------------------------------------------------------- +// /** @type {array} */ +// var a; +// ^ +// | ---------------------------------------------------------------------- +// | var a: any[] +// | @type {array} +// | ---------------------------------------------------------------------- +// /** @type {promise} */ +// var p; +// ^ +// | ---------------------------------------------------------------------- +// | var p: Promise +// | @type {promise} +// | ---------------------------------------------------------------------- +// /** @type {?number} */ +// var nullable; +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var nullable: number +// | @type {?number} +// | ---------------------------------------------------------------------- +// /** @type {function} */ +// var func; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var func: Function +// | @type {function} +// | ---------------------------------------------------------------------- +// /** @type {function (number): number} */ +// var func1; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | var func1: (arg0: number) => number +// | @type {function (number): number} +// | ---------------------------------------------------------------------- +// /** @type {string | number} */ +// var sOrn; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var sOrn: string | number +// | @type {string | number} +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +91,7 @@ "position": 26, "name": "1" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -58,7 +144,7 @@ "position": 55, "name": "2" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -111,7 +197,7 @@ "position": 85, "name": "3" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -164,7 +250,7 @@ "position": 112, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -217,7 +303,7 @@ "position": 144, "name": "5" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -270,7 +356,7 @@ "position": 171, "name": "6" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -323,7 +409,7 @@ "position": 200, "name": "7" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -384,7 +470,7 @@ "position": 230, "name": "8" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -449,7 +535,7 @@ "position": 260, "name": "9" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -502,7 +588,7 @@ "position": 298, "name": "10" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -555,7 +641,7 @@ "position": 349, "name": "11" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -644,7 +730,7 @@ "position": 391, "name": "12" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/jsDocTypedefQuickInfo1.baseline b/tests/baselines/reference/jsDocTypedefQuickInfo1.baseline index c37fbca418bec..b2a5af5fbcf3d 100644 --- a/tests/baselines/reference/jsDocTypedefQuickInfo1.baseline +++ b/tests/baselines/reference/jsDocTypedefQuickInfo1.baseline @@ -1,15 +1,52 @@ +=== /tests/cases/fourslash/jsDocTypedef1.js === +// /** +// * @typedef {Object} Opts +// * @property {string} x +// * @property {string=} y +// * @property {string} [z] +// * @property {string} [w="hi"] +// * +// * @param {Opts} opts +// */ +// function foo(opts) { +// ^^^^ +// | ---------------------------------------------------------------------- +// | (parameter) opts: Opts +// | @param opts +// | ---------------------------------------------------------------------- +// opts.x; +// } +// foo({x: 'abc'}); +// /** +// * @typedef {object} Opts1 +// * @property {string} x +// * @property {string=} y +// * @property {string} [z] +// * @property {string} [w="hi"] +// * +// * @param {Opts1} opts +// */ +// function foo1(opts1) { +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (parameter) opts1: any +// | ---------------------------------------------------------------------- +// opts1.x; +// } +// foo1({x: 'abc'}); + [ { "marker": { "fileName": "/tests/cases/fourslash/jsDocTypedef1.js", - "position": 189, + "position": 179, "name": "1" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { - "start": 189, + "start": 179, "length": 4 }, "displayParts": [ @@ -63,14 +100,14 @@ { "marker": { "fileName": "/tests/cases/fourslash/jsDocTypedef1.js", - "position": 424, + "position": 400, "name": "2" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { - "start": 424, + "start": 400, "length": 5 }, "displayParts": [ diff --git a/tests/baselines/reference/jsdocLink1.baseline b/tests/baselines/reference/jsdocLink1.baseline index 3a35ef85b028d..d97a97d7a1956 100644 --- a/tests/baselines/reference/jsdocLink1.baseline +++ b/tests/baselines/reference/jsdocLink1.baseline @@ -1,3 +1,27 @@ +=== /tests/cases/fourslash/jsdocLink1.ts === +// class C { +// } +// /** +// * {@link C} +// * @wat Makes a {@link C}. A default one. +// * {@link C()} +// * {@link C|postfix text} +// * {@link unformatted postfix text} +// * @see {@link C} its great +// */ +// function CC() { +// ^^ +// | ---------------------------------------------------------------------- +// | function CC(): void +// | {@link C} +// | @wat Makes a {@link C}. A default one. +// | {@link C()} +// | {@link Cpostfix text} +// | {@link unformatted postfix text} +// | @see {@link C} its great +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +29,7 @@ "position": 189, "name": "" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/jsdocLink2.baseline b/tests/baselines/reference/jsdocLink2.baseline index fe6b30a63a193..80887fc8182cb 100644 --- a/tests/baselines/reference/jsdocLink2.baseline +++ b/tests/baselines/reference/jsdocLink2.baseline @@ -1,3 +1,25 @@ +=== /tests/cases/fourslash/script.ts === +// /** +// * {@link C} +// * @wat Makes a {@link C}. A default one. +// * {@link C()} +// * {@link C|postfix text} +// * {@link unformatted postfix text} +// * @see {@link C} its great +// */ +// function CC() { +// ^^ +// | ---------------------------------------------------------------------- +// | function CC(): void +// | {@link C} +// | @wat Makes a {@link C}. A default one. +// | {@link C()} +// | {@link Cpostfix text} +// | {@link unformatted postfix text} +// | @see {@link C} its great +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +27,7 @@ "position": 177, "name": "" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/jsdocLink3.baseline b/tests/baselines/reference/jsdocLink3.baseline index 039d48a13af58..f8304c54287ed 100644 --- a/tests/baselines/reference/jsdocLink3.baseline +++ b/tests/baselines/reference/jsdocLink3.baseline @@ -1,3 +1,26 @@ +=== /module1.ts === +// import { C } from './jsdocLink3' +// /** +// * {@link C} +// * @wat Makes a {@link C}. A default one. +// * {@link C()} +// * {@link C|postfix text} +// * {@link unformatted postfix text} +// * @see {@link C} its great +// */ +// function CC() { +// ^^ +// | ---------------------------------------------------------------------- +// | function CC(): void +// | {@link C} +// | @wat Makes a {@link C}. A default one. +// | {@link C()} +// | {@link Cpostfix text} +// | {@link unformatted postfix text} +// | @see {@link C} its great +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +28,7 @@ "position": 210, "name": "" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/jsdocLink4.baseline b/tests/baselines/reference/jsdocLink4.baseline index 26ed32c30ed1a..966cbb71f371e 100644 --- a/tests/baselines/reference/jsdocLink4.baseline +++ b/tests/baselines/reference/jsdocLink4.baseline @@ -1,3 +1,35 @@ +=== /tests/cases/fourslash/jsdocLink4.ts === +// declare class I { +// /** {@link I} */ +// bar(): void +// ^^^ +// | ---------------------------------------------------------------------- +// | (method) I.bar(): void +// | {@link I} +// | ---------------------------------------------------------------------- +// } +// /** {@link I} */ +// var n = 1 +// ^ +// | ---------------------------------------------------------------------- +// | var n: number +// | {@link I} +// | ---------------------------------------------------------------------- +// /** +// * A real, very serious {@link I to an interface}. Right there. +// * @param x one {@link Pos here too} +// */ +// function f(x) { +// } +// f() +// ^ +// | ---------------------------------------------------------------------- +// | function f(x: any): void +// | A real, very serious {@link Ito an interface}. Right there. +// | @param x one {@link Poshere too} +// | ---------------------------------------------------------------------- +// type Pos = [number, number] + [ { "marker": { @@ -5,7 +37,7 @@ "position": 42, "name": "1" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "declare", "textSpan": { @@ -95,7 +127,7 @@ "position": 75, "name": "2" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -161,7 +193,7 @@ "position": 208, "name": "3" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/jsdocLink5.baseline b/tests/baselines/reference/jsdocLink5.baseline index ddb421a4830f0..6140e7db4f738 100644 --- a/tests/baselines/reference/jsdocLink5.baseline +++ b/tests/baselines/reference/jsdocLink5.baseline @@ -1,3 +1,19 @@ +=== /tests/cases/fourslash/jsdocLink5.ts === +// function g() { } +// /** +// * {@link g()} {@link g() } {@link g ()} {@link g () 0} {@link g()1} {@link g() 2} +// * {@link u()} {@link u() } {@link u ()} {@link u () 0} {@link u()1} {@link u() 2} +// */ +// function f(x) { +// } +// f() +// ^ +// | ---------------------------------------------------------------------- +// | function f(x: any): void +// | {@link g()} {@link g() } {@link g()} {@link g() 0} {@link g()1} {@link g() 2} +// | {@link u()} {@link u() } {@link u()} {@link u() 0} {@link u()1} {@link u() 2} +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +21,7 @@ "position": 210, "name": "3" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/jsdocOnInheritedMembers1.baseline b/tests/baselines/reference/jsdocOnInheritedMembers1.baseline index c13ee2d742a8f..920aab2d2a432 100644 --- a/tests/baselines/reference/jsdocOnInheritedMembers1.baseline +++ b/tests/baselines/reference/jsdocOnInheritedMembers1.baseline @@ -1,3 +1,23 @@ +=== /a.js === +// /** @template T */ +// class A { +// /** Method documentation. */ +// method() {} +// } +// +// /** @extends {A} */ +// class B extends A { +// method() {} +// } +// +// const b = new B(); +// b.method; +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) B.method(): void +// | Method documentation. +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +25,7 @@ "position": 175, "name": "" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/jsdocOnInheritedMembers2.baseline b/tests/baselines/reference/jsdocOnInheritedMembers2.baseline index c039b7c64045c..a46cad1a89ba0 100644 --- a/tests/baselines/reference/jsdocOnInheritedMembers2.baseline +++ b/tests/baselines/reference/jsdocOnInheritedMembers2.baseline @@ -1,3 +1,23 @@ +=== /a.js === +// /** @template T */ +// class A { +// /** Method documentation. */ +// method() {} +// } +// +// /** @extends {A} */ +// const B = class extends A { +// method() {} +// } +// +// const b = new B(); +// b.method; +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) B.method(): void +// | Method documentation. +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +25,7 @@ "position": 183, "name": "" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/jsdocReturnsTag.baseline b/tests/baselines/reference/jsdocReturnsTag.baseline index 9ee6f61706e63..4bfc851f6c5fd 100644 --- a/tests/baselines/reference/jsdocReturnsTag.baseline +++ b/tests/baselines/reference/jsdocReturnsTag.baseline @@ -1,3 +1,24 @@ +=== /tests/cases/fourslash/dummy.js === +// /** +// * Find an item +// * @template T +// * @param {T[]} l +// * @param {T} x +// * @returns {?T} The names of the found item(s). +// */ +// function find(l, x) { +// } +// find(''); +// ^ +// | ---------------------------------------------------------------------- +// | find(**l: any[]**, x: any): any +// | Find an item +// | @template T +// | @param l +// | @param x +// | @returns The names of the found item(s). +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +26,7 @@ "position": 154, "name": "" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/nodeNextPathCompletions.baseline b/tests/baselines/reference/nodeNextPathCompletions.baseline index 3e493c991d426..c6bfcf570178c 100644 --- a/tests/baselines/reference/nodeNextPathCompletions.baseline +++ b/tests/baselines/reference/nodeNextPathCompletions.baseline @@ -1,3 +1,10 @@ +=== /src/foo.ts === +// import { fooFromIndex } from ""; +// ^ +// | ---------------------------------------------------------------------- +// | dependency +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +12,7 @@ "position": 30, "name": "" }, - "completionList": { + "item": { "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, diff --git a/tests/baselines/reference/nonJsDeclarationFilePathCompletions.baseline b/tests/baselines/reference/nonJsDeclarationFilePathCompletions.baseline index 2ce80bec17d0c..70fe83fefe554 100644 --- a/tests/baselines/reference/nonJsDeclarationFilePathCompletions.baseline +++ b/tests/baselines/reference/nonJsDeclarationFilePathCompletions.baseline @@ -1,3 +1,16 @@ +=== /project/usage.ts === +// import { HtmlModuleThing } from "./"; +// ^ +// | ---------------------------------------------------------------------- +// | mod.html +// | node_modules +// | ---------------------------------------------------------------------- +// import { PackageHtmlModuleThing } from "package/"; +// ^ +// | ---------------------------------------------------------------------- +// | mod.html +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +18,7 @@ "position": 35, "name": "1" }, - "completionList": { + "item": { "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, @@ -45,7 +58,7 @@ "position": 86, "name": "2" }, - "completionList": { + "item": { "isGlobalCompletion": false, "isMemberCompletion": false, "isNewIdentifierLocation": true, diff --git a/tests/baselines/reference/quickInfoAlias.baseline b/tests/baselines/reference/quickInfoAlias.baseline index b295074dcd3e6..3da8bf5437756 100644 --- a/tests/baselines/reference/quickInfoAlias.baseline +++ b/tests/baselines/reference/quickInfoAlias.baseline @@ -1,3 +1,35 @@ +=== /c.ts === +// /** +// * Doc 2 +// * @tag Tag text 2 +// */ +// import { +// /** +// * Doc 3 +// * @tag Tag text 3 +// */ +// x +// } from "./a"; +// x; +// ^ +// | ---------------------------------------------------------------------- +// | (alias) const x: 0 +// | import x +// | Doc +// | @tag Tag text +// | ---------------------------------------------------------------------- + +=== /b.ts === +// import { x } from "./a"; +// x; +// ^ +// | ---------------------------------------------------------------------- +// | (alias) const x: 0 +// | import x +// | Doc +// | @tag Tag text +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +37,7 @@ "position": 26, "name": "b" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "export", "textSpan": { @@ -95,7 +127,7 @@ "position": 118, "name": "c" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "export", "textSpan": { diff --git a/tests/baselines/reference/quickInfoCommentsClass.baseline b/tests/baselines/reference/quickInfoCommentsClass.baseline index 7d20cbf175bd1..2320404ca1ce7 100644 --- a/tests/baselines/reference/quickInfoCommentsClass.baseline +++ b/tests/baselines/reference/quickInfoCommentsClass.baseline @@ -1,3 +1,180 @@ +=== /tests/cases/fourslash/quickInfoCommentsClass.ts === +// /** This is class c2 without constructor*/ +// class c2 { +// ^^ +// | ---------------------------------------------------------------------- +// | class c2 +// | This is class c2 without constructor +// | ---------------------------------------------------------------------- +// } +// var i2 = new c2(); +// ^^ +// | ---------------------------------------------------------------------- +// | var i2: c2 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | constructor c2(): c2 +// | This is class c2 without constructor +// | ---------------------------------------------------------------------- +// var i2_c = c2; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var i2_c: typeof c2 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | class c2 +// | This is class c2 without constructor +// | ---------------------------------------------------------------------- +// class c3 { +// ^^ +// | ---------------------------------------------------------------------- +// | class c3 +// | ---------------------------------------------------------------------- +// /** Constructor comment*/ +// constructor() { +// } +// } +// var i3 = new c3(); +// ^^ +// | ---------------------------------------------------------------------- +// | var i3: c3 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | constructor c3(): c3 +// | Constructor comment +// | ---------------------------------------------------------------------- +// var i3_c = c3; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var i3_c: typeof c3 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | class c3 +// | ---------------------------------------------------------------------- +// /** Class comment*/ +// class c4 { +// ^^ +// | ---------------------------------------------------------------------- +// | class c4 +// | Class comment +// | ---------------------------------------------------------------------- +// /** Constructor comment*/ +// constructor() { +// } +// } +// var i4 = new c4(); +// ^^ +// | ---------------------------------------------------------------------- +// | var i4: c4 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | constructor c4(): c4 +// | Constructor comment +// | ---------------------------------------------------------------------- +// var i4_c = c4; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var i4_c: typeof c4 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | class c4 +// | Class comment +// | ---------------------------------------------------------------------- +// /** Class with statics*/ +// class c5 { +// ^^ +// | ---------------------------------------------------------------------- +// | class c5 +// | Class with statics +// | ---------------------------------------------------------------------- +// static s1: number; +// } +// var i5 = new c5(); +// ^^ +// | ---------------------------------------------------------------------- +// | var i5: c5 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | constructor c5(): c5 +// | Class with statics +// | ---------------------------------------------------------------------- +// var i5_c = c5; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var i5_c: typeof c5 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | class c5 +// | Class with statics +// | ---------------------------------------------------------------------- +// /** class with statics and constructor*/ +// class c6 { +// ^^ +// | ---------------------------------------------------------------------- +// | class c6 +// | class with statics and constructor +// | ---------------------------------------------------------------------- +// /** s1 comment*/ +// static s1: number; +// /** constructor comment*/ +// constructor() { +// } +// } +// var i6 = new c6(); +// ^^ +// | ---------------------------------------------------------------------- +// | var i6: c6 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | constructor c6(): c6 +// | constructor comment +// | ---------------------------------------------------------------------- +// var i6_c = c6; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var i6_c: typeof c6 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | class c6 +// | class with statics and constructor +// | ---------------------------------------------------------------------- +// +// class a { +// /** +// constructor for a +// @param a this is my a +// */ +// constructor(a: string) { +// } +// } +// new a("Hello"); +// module m { +// export module m2 { +// /** class comment */ +// export class c1 { +// /** constructor comment*/ +// constructor() { +// } +// } +// } +// } +// var myVar = new m.m2.c1(); +// ^^ +// | ---------------------------------------------------------------------- +// | constructor m.m2.c1(): m.m2.c1 +// | constructor comment +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +182,7 @@ "position": 50, "name": "1" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -40,7 +217,7 @@ "position": 61, "name": "2" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -82,7 +259,7 @@ "position": 70, "name": "28" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -137,7 +314,7 @@ "position": 81, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -187,7 +364,7 @@ "position": 87, "name": "5" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -222,7 +399,7 @@ "position": 97, "name": "6" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -252,7 +429,7 @@ "position": 164, "name": "7" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -294,7 +471,7 @@ "position": 173, "name": "29" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -349,7 +526,7 @@ "position": 184, "name": "9" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -399,7 +576,7 @@ "position": 190, "name": "10" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -429,7 +606,7 @@ "position": 220, "name": "11" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -464,7 +641,7 @@ "position": 287, "name": "12" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -506,7 +683,7 @@ "position": 296, "name": "30" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -561,7 +738,7 @@ "position": 307, "name": "14" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -611,7 +788,7 @@ "position": 313, "name": "15" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -646,7 +823,7 @@ "position": 348, "name": "16" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -681,7 +858,7 @@ "position": 382, "name": "17" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -723,7 +900,7 @@ "position": 391, "name": "31" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -778,7 +955,7 @@ "position": 403, "name": "19" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -828,7 +1005,7 @@ "position": 408, "name": "20" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -863,7 +1040,7 @@ "position": 459, "name": "21" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -898,7 +1075,7 @@ "position": 570, "name": "22" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -940,7 +1117,7 @@ "position": 579, "name": "32" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -995,7 +1172,7 @@ "position": 590, "name": "24" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1045,7 +1222,7 @@ "position": 596, "name": "25" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -1080,7 +1257,7 @@ "position": 935, "name": "33" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "export", "textSpan": { diff --git a/tests/baselines/reference/quickInfoCommentsClassMembers.baseline b/tests/baselines/reference/quickInfoCommentsClassMembers.baseline index 3bc54a7828c8d..795b95e7da939 100644 --- a/tests/baselines/reference/quickInfoCommentsClassMembers.baseline +++ b/tests/baselines/reference/quickInfoCommentsClassMembers.baseline @@ -1,3 +1,550 @@ +=== /tests/cases/fourslash/quickInfoCommentsClassMembers.ts === +// /** This is comment for c1*/ +// class c1 { +// ^^ +// | ---------------------------------------------------------------------- +// | class c1 +// | This is comment for c1 +// | ---------------------------------------------------------------------- +// /** p1 is property of c1*/ +// public p1: number; +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.p1: number +// | p1 is property of c1 +// | ---------------------------------------------------------------------- +// /** sum with property*/ +// public p2(/** number to add*/b: number) { +// ^^ +// | ---------------------------------------------------------------------- +// | (method) c1.p2(b: number): number +// | sum with property +// | ---------------------------------------------------------------------- +// return this.p1 + b; +// } +// /** getter property 1*/ +// public get p3() { +// ^^ +// | ---------------------------------------------------------------------- +// | (getter) c1.p3: number +// | getter property 1 +// | ---------------------------------------------------------------------- +// return this.p2(this.p1); +// ^^ +// | ---------------------------------------------------------------------- +// | (method) c1.p2(b: number): number +// | sum with property +// | ---------------------------------------------------------------------- +// } +// /** setter property 1*/ +// public set p3(/** this is value*/value: number) { +// ^^ +// | ---------------------------------------------------------------------- +// | (setter) c1.p3: number +// | setter property 1 +// | ---------------------------------------------------------------------- +// this.p1 = this.p2(value); +// ^^ +// | ---------------------------------------------------------------------- +// | (method) c1.p2(b: number): number +// | sum with property +// | ---------------------------------------------------------------------- +// } +// /** pp1 is property of c1*/ +// private pp1: number; +// ^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.pp1: number +// | pp1 is property of c1 +// | ---------------------------------------------------------------------- +// /** sum with property*/ +// private pp2(/** number to add*/b: number) { +// ^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.pp2(b: number): number +// | sum with property +// | ---------------------------------------------------------------------- +// return this.p1 + b; +// } +// /** getter property 2*/ +// private get pp3() { +// ^^^ +// | ---------------------------------------------------------------------- +// | (getter) c1.pp3: number +// | getter property 2 +// | ---------------------------------------------------------------------- +// return this.pp2(this.pp1); +// ^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.pp2(b: number): number +// | sum with property +// | ---------------------------------------------------------------------- +// } +// /** setter property 2*/ +// private set pp3( /** this is value*/value: number) { +// ^^^ +// | ---------------------------------------------------------------------- +// | (setter) c1.pp3: number +// | setter property 2 +// | ---------------------------------------------------------------------- +// this.pp1 = this.pp2(value); +// ^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.pp2(b: number): number +// | sum with property +// | ---------------------------------------------------------------------- +// } +// /** Constructor method*/ +// constructor() { +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor c1(): c1 +// | Constructor method +// | ---------------------------------------------------------------------- +// } +// /** s1 is static property of c1*/ +// static s1: number; +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.s1: number +// | s1 is static property of c1 +// | ---------------------------------------------------------------------- +// /** static sum with property*/ +// static s2(/** number to add*/b: number) { +// ^^ +// | ---------------------------------------------------------------------- +// | (method) c1.s2(b: number): number +// | static sum with property +// | ---------------------------------------------------------------------- +// return c1.s1 + b; +// } +// /** static getter property*/ +// static get s3() { +// ^^ +// | ---------------------------------------------------------------------- +// | (getter) c1.s3: number +// | static getter property +// | ---------------------------------------------------------------------- +// return c1.s2(c1.s1); +// ^^ +// | ---------------------------------------------------------------------- +// | (method) c1.s2(b: number): number +// | static sum with property +// | ---------------------------------------------------------------------- +// } +// /** setter property 3*/ +// static set s3( /** this is value*/value: number) { +// ^^ +// | ---------------------------------------------------------------------- +// | (setter) c1.s3: number +// | setter property 3 +// | ---------------------------------------------------------------------- +// c1.s1 = c1.s2(value); +// ^^ +// | ---------------------------------------------------------------------- +// | (method) c1.s2(b: number): number +// | static sum with property +// | ---------------------------------------------------------------------- +// } +// public nc_p1: number; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p1: number +// | ---------------------------------------------------------------------- +// public nc_p2(b: number) { +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.nc_p2(b: number): number +// | ---------------------------------------------------------------------- +// return this.nc_p1 + b; +// } +// public get nc_p3() { +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (getter) c1.nc_p3: number +// | ---------------------------------------------------------------------- +// return this.nc_p2(this.nc_p1); +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.nc_p2(b: number): number +// | ---------------------------------------------------------------------- +// } +// public set nc_p3(value: number) { +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (setter) c1.nc_p3: number +// | ---------------------------------------------------------------------- +// this.nc_p1 = this.nc_p2(value); +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.nc_p2(b: number): number +// | ---------------------------------------------------------------------- +// } +// private nc_pp1: number; +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_pp1: number +// | ---------------------------------------------------------------------- +// private nc_pp2(b: number) { +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.nc_pp2(b: number): number +// | ---------------------------------------------------------------------- +// return this.nc_pp1 + b; +// } +// private get nc_pp3() { +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (getter) c1.nc_pp3: number +// | ---------------------------------------------------------------------- +// return this.nc_pp2(this.nc_pp1); +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.nc_pp2(b: number): number +// | ---------------------------------------------------------------------- +// } +// private set nc_pp3(value: number) { +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (setter) c1.nc_pp3: number +// | ---------------------------------------------------------------------- +// this.nc_pp1 = this.nc_pp2(value); +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.nc_pp2(b: number): number +// | ---------------------------------------------------------------------- +// } +// static nc_s1: number; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_s1: number +// | ---------------------------------------------------------------------- +// static nc_s2(b: number) { +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.nc_s2(b: number): number +// | ---------------------------------------------------------------------- +// return c1.nc_s1 + b; +// } +// static get nc_s3() { +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (getter) c1.nc_s3: number +// | ---------------------------------------------------------------------- +// return c1.nc_s2(c1.nc_s1); +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.nc_s2(b: number): number +// | ---------------------------------------------------------------------- +// } +// static set nc_s3(value: number) { +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (setter) c1.nc_s3: number +// | ---------------------------------------------------------------------- +// c1.nc_s1 = c1.nc_s2(value); +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.nc_s2(b: number): number +// | ---------------------------------------------------------------------- +// } +// } +// var i1 = new c1(); +// ^^ +// | ---------------------------------------------------------------------- +// | var i1: c1 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | constructor c1(): c1 +// | Constructor method +// | ---------------------------------------------------------------------- +// var i1_p = i1.p1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var i1_p: number +// | ---------------------------------------------------------------------- +// var i1_f = i1.p2; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var i1_f: (b: number) => number +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (method) c1.p2(b: number): number +// | sum with property +// | ---------------------------------------------------------------------- +// var i1_r = i1.p2(20); +// ^^^^ +// | ---------------------------------------------------------------------- +// | var i1_r: number +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (method) c1.p2(b: number): number +// | sum with property +// | ---------------------------------------------------------------------- +// var i1_prop = i1.p3; +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_prop: number +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.p3: number +// | getter property 1 +// | setter property 1 +// | ---------------------------------------------------------------------- +// i1.p3 = i1_prop; +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.p3: number +// | getter property 1 +// | setter property 1 +// | ---------------------------------------------------------------------- +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_prop: number +// | ---------------------------------------------------------------------- +// var i1_nc_p = i1.nc_p1; +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_nc_p: number +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p1: number +// | ---------------------------------------------------------------------- +// var i1_ncf = i1.nc_p2; +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_ncf: (b: number) => number +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.nc_p2(b: number): number +// | ---------------------------------------------------------------------- +// var i1_ncr = i1.nc_p2(20); +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_ncr: number +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.nc_p2(b: number): number +// | ---------------------------------------------------------------------- +// var i1_ncprop = i1.nc_p3; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_ncprop: number +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p3: number +// | ---------------------------------------------------------------------- +// i1.nc_p3 = i1_ncprop; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_p3: number +// | ---------------------------------------------------------------------- +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_ncprop: number +// | ---------------------------------------------------------------------- +// var i1_s_p = c1.s1; +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_s_p: number +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | class c1 +// | This is comment for c1 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.s1: number +// | s1 is static property of c1 +// | ---------------------------------------------------------------------- +// var i1_s_f = c1.s2; +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_s_f: (b: number) => number +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (method) c1.s2(b: number): number +// | static sum with property +// | ---------------------------------------------------------------------- +// var i1_s_r = c1.s2(20); +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_s_r: number +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (method) c1.s2(b: number): number +// | static sum with property +// | ---------------------------------------------------------------------- +// var i1_s_prop = c1.s3; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_s_prop: number +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.s3: number +// | static getter property +// | setter property 3 +// | ---------------------------------------------------------------------- +// c1.s3 = i1_s_prop; +// ^^ +// | ---------------------------------------------------------------------- +// | (property) c1.s3: number +// | static getter property +// | setter property 3 +// | ---------------------------------------------------------------------- +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_s_prop: number +// | ---------------------------------------------------------------------- +// var i1_s_nc_p = c1.nc_s1; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_s_nc_p: number +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_s1: number +// | ---------------------------------------------------------------------- +// var i1_s_ncf = c1.nc_s2; +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_s_ncf: (b: number) => number +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.nc_s2(b: number): number +// | ---------------------------------------------------------------------- +// var i1_s_ncr = c1.nc_s2(20); +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_s_ncr: number +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c1.nc_s2(b: number): number +// | ---------------------------------------------------------------------- +// var i1_s_ncprop = c1.nc_s3; +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_s_ncprop: number +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_s3: number +// | ---------------------------------------------------------------------- +// c1.nc_s3 = i1_s_ncprop; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c1.nc_s3: number +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var i1_s_ncprop: number +// | ---------------------------------------------------------------------- +// var i1_c = c1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var i1_c: typeof c1 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | class c1 +// | This is comment for c1 +// | ---------------------------------------------------------------------- +// +// class cProperties { +// private val: number; +// /** getter only property*/ +// public get p1() { +// return this.val; +// } +// public get nc_p1() { +// return this.val; +// } +// /**setter only property*/ +// public set p2(value: number) { +// this.val = value; +// } +// public set nc_p2(value: number) { +// this.val = value; +// } +// } +// var cProperties_i = new cProperties(); +// cProperties_i.p2 = cProperties_i.p1; +// ^^ +// | ---------------------------------------------------------------------- +// | (property) cProperties.p2: number +// | setter only property +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (property) cProperties.p1: number +// | getter only property +// | ---------------------------------------------------------------------- +// cProperties_i.nc_p2 = cProperties_i.nc_p1; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (property) cProperties.nc_p2: number +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (property) cProperties.nc_p1: number +// | ---------------------------------------------------------------------- +// class cWithConstructorProperty { +// /** +// * this is class cWithConstructorProperty's constructor +// * @param a this is first parameter a +// */ +// constructor(/**more info about a*/public a: number) { +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor cWithConstructorProperty(a: number): cWithConstructorProperty +// | this is class cWithConstructorProperty's constructor +// | @param a this is first parameter a +// | ---------------------------------------------------------------------- +// var bbbb = 10; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (local var) bbbb: number +// | ---------------------------------------------------------------------- +// this.a = a + 2 + bbbb; +// ^^^^ +// | ---------------------------------------------------------------------- +// | this: this +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (property) cWithConstructorProperty.a: number +// | more info about a +// | this is first parameter a +// | @param a this is first parameter a +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | more info about a +// | this is first parameter a +// | @param a this is first parameter a +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | (local var) bbbb: number +// | ---------------------------------------------------------------------- +// } +// } + [ { "marker": { @@ -5,7 +552,7 @@ "position": 36, "name": "1" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -40,7 +587,7 @@ "position": 83, "name": "2" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -103,7 +650,7 @@ "position": 134, "name": "3" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -190,7 +737,7 @@ "position": 246, "name": "6" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "public", "textSpan": { @@ -253,7 +800,7 @@ "position": 273, "name": "8q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -340,7 +887,7 @@ "position": 335, "name": "10" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "public", "textSpan": { @@ -403,7 +950,7 @@ "position": 397, "name": "13q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -490,7 +1037,7 @@ "position": 458, "name": "14" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private", "textSpan": { @@ -553,7 +1100,7 @@ "position": 511, "name": "15" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "private", "textSpan": { @@ -640,7 +1187,7 @@ "position": 625, "name": "18" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "private", "textSpan": { @@ -703,7 +1250,7 @@ "position": 653, "name": "20q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "private", "textSpan": { @@ -790,7 +1337,7 @@ "position": 718, "name": "22" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "private", "textSpan": { @@ -853,7 +1400,7 @@ "position": 783, "name": "25q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "private", "textSpan": { @@ -940,7 +1487,7 @@ "position": 840, "name": "26" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -995,7 +1542,7 @@ "position": 905, "name": "27" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -1058,7 +1605,7 @@ "position": 963, "name": "28" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -1145,7 +1692,7 @@ "position": 1078, "name": "32" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "static", "textSpan": { @@ -1208,7 +1755,7 @@ "position": 1103, "name": "35q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -1295,7 +1842,7 @@ "position": 1163, "name": "37" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "static", "textSpan": { @@ -1358,7 +1905,7 @@ "position": 1222, "name": "42q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -1445,7 +1992,7 @@ "position": 1252, "name": "43" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -1503,7 +2050,7 @@ "position": 1278, "name": "44" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -1585,7 +2132,7 @@ "position": 1349, "name": "46" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "public", "textSpan": { @@ -1643,7 +2190,7 @@ "position": 1378, "name": "47q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -1725,7 +2272,7 @@ "position": 1418, "name": "48" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "public", "textSpan": { @@ -1783,7 +2330,7 @@ "position": 1467, "name": "49q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -1865,7 +2412,7 @@ "position": 1499, "name": "50" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private", "textSpan": { @@ -1923,7 +2470,7 @@ "position": 1528, "name": "51" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "private", "textSpan": { @@ -2005,7 +2552,7 @@ "position": 1601, "name": "53" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "private", "textSpan": { @@ -2063,7 +2610,7 @@ "position": 1633, "name": "54q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "private", "textSpan": { @@ -2145,7 +2692,7 @@ "position": 1677, "name": "55" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "private", "textSpan": { @@ -2203,7 +2750,7 @@ "position": 1724, "name": "56q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "private", "textSpan": { @@ -2285,7 +2832,7 @@ "position": 1758, "name": "57" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -2343,7 +2890,7 @@ "position": 1784, "name": "58" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -2425,7 +2972,7 @@ "position": 1853, "name": "60" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "static", "textSpan": { @@ -2483,7 +3030,7 @@ "position": 1881, "name": "61q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -2565,7 +3112,7 @@ "position": 1919, "name": "62" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "static", "textSpan": { @@ -2623,7 +3170,7 @@ "position": 1965, "name": "63q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -2705,7 +3252,7 @@ "position": 1989, "name": "64" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -2747,7 +3294,7 @@ "position": 1998, "name": "65q" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -2802,7 +3349,7 @@ "position": 2009, "name": "66" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -2844,7 +3391,7 @@ "position": 2027, "name": "68" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -2922,7 +3469,7 @@ "position": 2036, "name": "69" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -3009,7 +3556,7 @@ "position": 2045, "name": "70" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -3051,7 +3598,7 @@ "position": 2054, "name": "71q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -3138,7 +3685,7 @@ "position": 2069, "name": "72" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -3180,7 +3727,7 @@ "position": 2078, "name": "73" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -3251,7 +3798,7 @@ "position": 2085, "name": "74" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -3322,7 +3869,7 @@ "position": 2093, "name": "75" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -3364,7 +3911,7 @@ "position": 2106, "name": "76" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -3406,7 +3953,7 @@ "position": 2117, "name": "77" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -3464,7 +4011,7 @@ "position": 2129, "name": "78" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -3542,7 +4089,7 @@ "position": 2142, "name": "79" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -3624,7 +4171,7 @@ "position": 2153, "name": "80" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -3666,7 +4213,7 @@ "position": 2164, "name": "81q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -3748,7 +4295,7 @@ "position": 2181, "name": "82" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -3790,7 +4337,7 @@ "position": 2193, "name": "83" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -3848,7 +4395,7 @@ "position": 2204, "name": "84" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -3906,7 +4453,7 @@ "position": 2213, "name": "85" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -3948,7 +4495,7 @@ "position": 2228, "name": "86" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -3990,7 +4537,7 @@ "position": 2234, "name": "87" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -4025,7 +4572,7 @@ "position": 2237, "name": "88" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -4088,7 +4635,7 @@ "position": 2249, "name": "89" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -4166,7 +4713,7 @@ "position": 2257, "name": "90" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -4253,7 +4800,7 @@ "position": 2268, "name": "91" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -4295,7 +4842,7 @@ "position": 2278, "name": "92q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -4382,7 +4929,7 @@ "position": 2293, "name": "93" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -4424,7 +4971,7 @@ "position": 2305, "name": "94" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -4495,7 +5042,7 @@ "position": 2312, "name": "95" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -4566,7 +5113,7 @@ "position": 2320, "name": "96" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -4608,7 +5155,7 @@ "position": 2335, "name": "97" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -4650,7 +5197,7 @@ "position": 2347, "name": "98" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -4708,7 +5255,7 @@ "position": 2362, "name": "99" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -4786,7 +5333,7 @@ "position": 2373, "name": "100" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -4868,7 +5415,7 @@ "position": 2387, "name": "101" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -4910,7 +5457,7 @@ "position": 2397, "name": "102q" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -4992,7 +5539,7 @@ "position": 2417, "name": "103" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -5034,7 +5581,7 @@ "position": 2430, "name": "104" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -5092,7 +5639,7 @@ "position": 2440, "name": "105" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -5150,7 +5697,7 @@ "position": 2453, "name": "106" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -5192,7 +5739,7 @@ "position": 2465, "name": "107" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -5242,7 +5789,7 @@ "position": 2471, "name": "108" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -5277,7 +5824,7 @@ "position": 2882, "name": "110" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -5340,7 +5887,7 @@ "position": 2902, "name": "111" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -5403,7 +5950,7 @@ "position": 2921, "name": "112" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -5461,7 +6008,7 @@ "position": 2943, "name": "113" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -5519,7 +6066,7 @@ "position": 3100, "name": "119" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -5609,7 +6156,7 @@ "position": 3167, "name": "118" }, - "quickInfo": { + "item": { "kind": "local var", "kindModifiers": "", "textSpan": { @@ -5659,7 +6206,7 @@ "position": 3187, "name": "116" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -5693,7 +6240,7 @@ "position": 3190, "name": "114" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -5783,7 +6330,7 @@ "position": 3194, "name": "115" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "public", "textSpan": { @@ -5865,7 +6412,7 @@ "position": 3204, "name": "117" }, - "quickInfo": { + "item": { "kind": "local var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoCommentsCommentParsing.baseline b/tests/baselines/reference/quickInfoCommentsCommentParsing.baseline index d6e13b4e7051c..07a3aa1dd220f 100644 --- a/tests/baselines/reference/quickInfoCommentsCommentParsing.baseline +++ b/tests/baselines/reference/quickInfoCommentsCommentParsing.baseline @@ -1,3 +1,539 @@ +=== /tests/cases/fourslash/quickInfoCommentsCommentParsing.ts === +// /// This is simple /// comments +// function simple() { +// } +// +// simple( ); +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | function simple(): void +// | ---------------------------------------------------------------------- +// +// /// multiLine /// Comments +// /// This is example of multiline /// comments +// /// Another multiLine +// function multiLine() { +// } +// multiLine( ); +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function multiLine(): void +// | ---------------------------------------------------------------------- +// +// /** this is eg of single line jsdoc style comment */ +// function jsDocSingleLine() { +// } +// jsDocSingleLine(); +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function jsDocSingleLine(): void +// | this is eg of single line jsdoc style comment +// | ---------------------------------------------------------------------- +// +// +// /** this is multiple line jsdoc stule comment +// *New line1 +// *New Line2*/ +// function jsDocMultiLine() { +// } +// jsDocMultiLine(); +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function jsDocMultiLine(): void +// | this is multiple line jsdoc stule comment +// | New line1 +// | New Line2 +// | ---------------------------------------------------------------------- +// +// /** multiple line jsdoc comments no longer merge +// *New line1 +// *New Line2*/ +// /** Shoul mege this line as well +// * and this too*/ /** Another this one too*/ +// function jsDocMultiLineMerge() { +// } +// jsDocMultiLineMerge(); +// ^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function jsDocMultiLineMerge(): void +// | Another this one too +// | ---------------------------------------------------------------------- +// +// +// /// Triple slash comment +// /** jsdoc comment */ +// function jsDocMixedComments1() { +// } +// jsDocMixedComments1(); +// ^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function jsDocMixedComments1(): void +// | jsdoc comment +// | ---------------------------------------------------------------------- +// +// /// Triple slash comment +// /** jsdoc comment */ /** another jsDocComment*/ +// function jsDocMixedComments2() { +// } +// jsDocMixedComments2(); +// ^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function jsDocMixedComments2(): void +// | another jsDocComment +// | ---------------------------------------------------------------------- +// +// /** jsdoc comment */ /*** triplestar jsDocComment*/ +// /// Triple slash comment +// function jsDocMixedComments3() { +// } +// jsDocMixedComments3(); +// ^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function jsDocMixedComments3(): void +// | * triplestar jsDocComment +// | ---------------------------------------------------------------------- +// +// /** jsdoc comment */ /** another jsDocComment*/ +// /// Triple slash comment +// /// Triple slash comment 2 +// function jsDocMixedComments4() { +// } +// jsDocMixedComments4(); +// ^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function jsDocMixedComments4(): void +// | another jsDocComment +// | ---------------------------------------------------------------------- +// +// /// Triple slash comment 1 +// /** jsdoc comment */ /** another jsDocComment*/ +// /// Triple slash comment +// /// Triple slash comment 2 +// function jsDocMixedComments5() { +// } +// jsDocMixedComments5(); +// ^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function jsDocMixedComments5(): void +// | another jsDocComment +// | ---------------------------------------------------------------------- +// +// /** another jsDocComment*/ +// /// Triple slash comment 1 +// /// Triple slash comment +// /// Triple slash comment 2 +// /** jsdoc comment */ +// function jsDocMixedComments6() { +// } +// jsDocMixedComments6(); +// ^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function jsDocMixedComments6(): void +// | jsdoc comment +// | ---------------------------------------------------------------------- +// +// // This shoulnot be help comment +// function noHelpComment1() { +// } +// noHelpComment1(); +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function noHelpComment1(): void +// | ---------------------------------------------------------------------- +// +// /* This shoulnot be help comment */ +// function noHelpComment2() { +// } +// noHelpComment2(); +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function noHelpComment2(): void +// | ---------------------------------------------------------------------- +// +// function noHelpComment3() { +// } +// noHelpComment3(); +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function noHelpComment3(): void +// | ---------------------------------------------------------------------- +// /** Adds two integers and returns the result +// * @param {number} a first number +// * @param b second number +// */ +// function sum(a: number, b: number) { +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | first number +// | @param a first number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: number +// | second number +// | @param b second number +// | ---------------------------------------------------------------------- +// return a + b; +// } +// sum(10, 20); +// ^^^ +// | ---------------------------------------------------------------------- +// | function sum(a: number, b: number): number +// | Adds two integers and returns the result +// | @param a first number +// | @param b second number +// | ---------------------------------------------------------------------- +// /** This is multiplication function +// * @param +// * @param a first number +// * @param b +// * @param c { +// @param d @anotherTag +// * @param e LastParam @anotherTag*/ +// function multiply(a: number, b: number, c?: number, d?, e?) { +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | first number +// | @param a first number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: number +// | @param b +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) c: number +// | @param c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) d: any +// | @param d +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) e: any +// | LastParam +// | @param e LastParam +// | ---------------------------------------------------------------------- +// } +// multiply(10, 20, 30, 40, 50); +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function multiply(a: number, b: number, c?: number, d?: any, e?: any): void +// | This is multiplication function +// | @param +// | @param a first number +// | @param b +// | @param c +// | @param d +// | @anotherTag +// | @param e LastParam +// | @anotherTag +// | ---------------------------------------------------------------------- +// /** fn f1 with number +// * @param { string} b about b +// */ +// function f1(a: number); +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | ---------------------------------------------------------------------- +// function f1(b: string); +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: string +// | ---------------------------------------------------------------------- +// /**@param opt optional parameter*/ +// function f1(aOrb, opt?) { +// return aOrb; +// } +// f1(10); +// ^^ +// | ---------------------------------------------------------------------- +// | function f1(a: number): any (+1 overload) +// | fn f1 with number +// | @param b about b +// | ---------------------------------------------------------------------- +// f1("hello"); +// ^^ +// | ---------------------------------------------------------------------- +// | function f1(b: string): any (+1 overload) +// | fn f1 with number +// | @param b about b +// | ---------------------------------------------------------------------- +// +// /** This is subtract function +// @param { a +// *@param { number | } b this is about b +// @param { { () => string; } } c this is optional param c +// @param { { () => string; } d this is optional param d +// @param { { () => string; } } e this is optional param e +// @param { { { () => string; } } f this is optional param f +// */ +// function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string) { +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: number +// | this is about b +// | @param b this is about b +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) c: () => string +// | this is optional param c +// | @param c this is optional param c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) d: () => string +// | this is optional param d +// | @param d this is optional param d +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) e: () => string +// | this is optional param e +// | @param e this is optional param e +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) f: () => string +// | ---------------------------------------------------------------------- +// } +// subtract(10, 20, null, null, null, null); +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | This is subtract function +// | @param +// | @param b this is about b +// | @param c this is optional param c +// | @param d this is optional param d +// | @param e this is optional param e +// | @param { () => string; } } f this is optional param f +// | ---------------------------------------------------------------------- +// /** this is square function +// @paramTag { number } a this is input number of paramTag +// @param { number } a this is input number +// @returnType { number } it is return type +// */ +// function square(a: number) { +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | this is input number +// | @param a this is input number +// | ---------------------------------------------------------------------- +// return a * a; +// } +// square(10); +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | function square(a: number): number +// | this is square function +// | @paramTag { number } a this is input number of paramTag +// | @param a this is input number +// | @returnType { number } it is return type +// | ---------------------------------------------------------------------- +// /** this is divide function +// @param { number} a this is a +// @paramTag { number } g this is optional param g +// @param { number} b this is b +// */ +// function divide(a: number, b: number) { +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | this is a +// | @param a this is a +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: number +// | this is b +// | @param b this is b +// | ---------------------------------------------------------------------- +// } +// divide(10, 20); +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | function divide(a: number, b: number): void +// | this is divide function +// | @param a this is a +// | @paramTag { number } g this is optional param g +// | @param b this is b +// | ---------------------------------------------------------------------- +// /** +// Function returns string concat of foo and bar +// @param {string} foo is string +// @param {string} bar is second string +// */ +// function fooBar(foo: string, bar: string) { +// ^^^ +// | ---------------------------------------------------------------------- +// | (parameter) foo: string +// | is string +// | @param foo is string +// | ---------------------------------------------------------------------- +// ^^^ +// | ---------------------------------------------------------------------- +// | (parameter) bar: string +// | is second string +// | @param bar is second string +// | ---------------------------------------------------------------------- +// return foo + bar; +// } +// fooBar("foo","bar"); +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | function fooBar(foo: string, bar: string): string +// | Function returns string concat of foo and bar +// | @param foo is string +// | @param bar is second string +// | ---------------------------------------------------------------------- +// /** This is a comment */ +// var x; +// /** +// * This is a comment +// */ +// var y; +// /** this is jsdoc style function with param tag as well as inline parameter help +// *@param a it is first parameter +// *@param c it is third parameter +// */ +// function jsDocParamTest(/** this is inline comment for a */a: number, /** this is inline comment for b*/ b: number, c: number, d: number) { +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | this is inline comment for a +// | it is first parameter +// | @param a it is first parameter +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: number +// | this is inline comment for b +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) c: number +// | it is third parameter +// | @param c it is third parameter +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) d: number +// | ---------------------------------------------------------------------- +// return a + b + c + d; +// } +// jsDocParamTest(30, 40, 50, 60); +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function jsDocParamTest(a: number, b: number, c: number, d: number): number +// | this is jsdoc style function with param tag as well as inline parameter help +// | @param a it is first parameter +// | @param c it is third parameter +// | ---------------------------------------------------------------------- +// /** This is function comment +// * And properly aligned comment +// */ +// function jsDocCommentAlignmentTest1() { +// } +// jsDocCommentAlignmentTest1(); +// ^^^^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function jsDocCommentAlignmentTest1(): void +// | This is function comment +// | And properly aligned comment +// | ---------------------------------------------------------------------- +// /** This is function comment +// * And aligned with 4 space char margin +// */ +// function jsDocCommentAlignmentTest2() { +// } +// jsDocCommentAlignmentTest2(); +// ^^^^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function jsDocCommentAlignmentTest2(): void +// | This is function comment +// | And aligned with 4 space char margin +// | ---------------------------------------------------------------------- +// /** This is function comment +// * And aligned with 4 space char margin +// * @param {string} a this is info about a +// * spanning on two lines and aligned perfectly +// * @param b this is info about b +// * spanning on two lines and aligned perfectly +// * spanning one more line alined perfectly +// * spanning another line with more margin +// * @param c this is info about b +// * not aligned text about parameter will eat only one space +// */ +// function jsDocCommentAlignmentTest3(a: string, b, c) { +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: string +// | this is info about a +// | spanning on two lines and aligned perfectly +// | @param a this is info about a +// | spanning on two lines and aligned perfectly +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: any +// | this is info about b +// | spanning on two lines and aligned perfectly +// | spanning one more line alined perfectly +// | spanning another line with more margin +// | @param b this is info about b +// | spanning on two lines and aligned perfectly +// | spanning one more line alined perfectly +// | spanning another line with more margin +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) c: any +// | this is info about b +// | not aligned text about parameter will eat only one space +// | @param c this is info about b +// | not aligned text about parameter will eat only one space +// | ---------------------------------------------------------------------- +// } +// jsDocCommentAlignmentTest3("hello",1, 2); +// ^^^^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function jsDocCommentAlignmentTest3(a: string, b: any, c: any): void +// | This is function comment +// | And aligned with 4 space char margin +// | @param a this is info about a +// | spanning on two lines and aligned perfectly +// | @param b this is info about b +// | spanning on two lines and aligned perfectly +// | spanning one more line alined perfectly +// | spanning another line with more margin +// | @param c this is info about b +// | not aligned text about parameter will eat only one space +// | ---------------------------------------------------------------------- +// +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /**/. +// | ---------------------------------------------------------------------- +// class NoQuickInfoClass { +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | class NoQuickInfoClass +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +541,7 @@ "position": 58, "name": "1q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -55,7 +591,7 @@ "position": 190, "name": "2q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -105,7 +641,7 @@ "position": 291, "name": "3q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -160,7 +696,7 @@ "position": 413, "name": "4q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -215,7 +751,7 @@ "position": 618, "name": "5q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -270,7 +806,7 @@ "position": 725, "name": "6q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -325,7 +861,7 @@ "position": 856, "name": "7q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -380,7 +916,7 @@ "position": 994, "name": "8q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -435,7 +971,7 @@ "position": 1154, "name": "9q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -490,7 +1026,7 @@ "position": 1336, "name": "10q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -545,7 +1081,7 @@ "position": 1524, "name": "11q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -600,7 +1136,7 @@ "position": 1608, "name": "12q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -650,7 +1186,7 @@ "position": 1695, "name": "13q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -700,7 +1236,7 @@ "position": 1744, "name": "14q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -750,7 +1286,7 @@ "position": 1880, "name": "16aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -824,7 +1360,7 @@ "position": 1891, "name": "17aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -898,7 +1434,7 @@ "position": 1925, "name": "16q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -1029,7 +1565,7 @@ "position": 2111, "name": "19aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -1103,7 +1639,7 @@ "position": 2122, "name": "20aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -1164,7 +1700,7 @@ "position": 2133, "name": "21aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -1225,7 +1761,7 @@ "position": 2145, "name": "22aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -1286,7 +1822,7 @@ "position": 2149, "name": "23aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -1360,7 +1896,7 @@ "position": 2161, "name": "19q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -1617,7 +2153,7 @@ "position": 2253, "name": "25aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -1667,7 +2203,7 @@ "position": 2277, "name": "26aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -1717,7 +2253,7 @@ "position": 2370, "name": "25q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -1835,7 +2371,7 @@ "position": 2378, "name": "26q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -1953,7 +2489,7 @@ "position": 2716, "name": "28aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -2003,7 +2539,7 @@ "position": 2727, "name": "29aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -2077,7 +2613,7 @@ "position": 2738, "name": "30aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -2171,7 +2707,7 @@ "position": 2756, "name": "31aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -2265,7 +2801,7 @@ "position": 2774, "name": "32aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -2359,7 +2895,7 @@ "position": 2792, "name": "33aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -2429,7 +2965,7 @@ "position": 2818, "name": "28q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -2812,7 +3348,7 @@ "position": 3045, "name": "34aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -2886,7 +3422,7 @@ "position": 3081, "name": "34q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -2994,7 +3530,7 @@ "position": 3243, "name": "35aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -3068,7 +3604,7 @@ "position": 3254, "name": "36aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -3142,7 +3678,7 @@ "position": 3272, "name": "35q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -3282,7 +3818,7 @@ "position": 3432, "name": "37aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -3356,7 +3892,7 @@ "position": 3445, "name": "38aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -3430,7 +3966,7 @@ "position": 3486, "name": "37q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -3561,7 +4097,7 @@ "position": 3782, "name": "40aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -3643,7 +4179,7 @@ "position": 3828, "name": "41aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -3698,7 +4234,7 @@ "position": 3839, "name": "42aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -3772,7 +4308,7 @@ "position": 3850, "name": "43aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -3822,7 +4358,7 @@ "position": 3894, "name": "40q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -4001,7 +4537,7 @@ "position": 4040, "name": "45q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -4056,7 +4592,7 @@ "position": 4193, "name": "46q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -4111,7 +4647,7 @@ "position": 4778, "name": "47aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -4185,7 +4721,7 @@ "position": 4789, "name": "48aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -4259,7 +4795,7 @@ "position": 4792, "name": "49aq" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -4333,7 +4869,7 @@ "position": 4809, "name": "47q" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -4512,7 +5048,7 @@ "position": 4854, "name": "50q" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoCommentsFunctionDeclaration.baseline b/tests/baselines/reference/quickInfoCommentsFunctionDeclaration.baseline index bad1279f3e445..76dc6b63ae6eb 100644 --- a/tests/baselines/reference/quickInfoCommentsFunctionDeclaration.baseline +++ b/tests/baselines/reference/quickInfoCommentsFunctionDeclaration.baseline @@ -1,3 +1,46 @@ +=== /tests/cases/fourslash/quickInfoCommentsFunctionDeclaration.ts === +// /** This comment should appear for foo*/ +// function foo() { +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(): void +// | This comment should appear for foo +// | ---------------------------------------------------------------------- +// } +// foo(); +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(): void +// | This comment should appear for foo +// | ---------------------------------------------------------------------- +// /** This is comment for function signature*/ +// function fooWithParameters(/** this is comment about a*/a: string, +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function fooWithParameters(a: string, b: number): void +// | This is comment for function signature +// | ---------------------------------------------------------------------- +// /** this is comment for b*/ +// b: number) { +// var d = a; +// ^ +// | ---------------------------------------------------------------------- +// | (local var) d: string +// | ---------------------------------------------------------------------- +// } +// fooWithParameters("a",10); +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function fooWithParameters(a: string, b: number): void +// | This is comment for function signature +// | ---------------------------------------------------------------------- +// /** +// * Does something +// * @param a a string +// */ +// declare function fn(a: string); +// fn("hello"); + [ { "marker": { @@ -5,7 +48,7 @@ "position": 51, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -60,7 +103,7 @@ "position": 61, "name": "2" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -115,7 +158,7 @@ "position": 123, "name": "5" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -210,7 +253,7 @@ "position": 236, "name": "6" }, - "quickInfo": { + "item": { "kind": "local var", "kindModifiers": "", "textSpan": { @@ -260,7 +303,7 @@ "position": 257, "name": "8" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoCommentsFunctionExpression.baseline b/tests/baselines/reference/quickInfoCommentsFunctionExpression.baseline index 81722d6918e65..e09a095270554 100644 --- a/tests/baselines/reference/quickInfoCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/quickInfoCommentsFunctionExpression.baseline @@ -1,3 +1,100 @@ +=== /tests/cases/fourslash/quickInfoCommentsFunctionExpression.ts === +// /** lambdaFoo var comment*/ +// var lambdaFoo = /** this is lambda comment*/ (/**param a*/a: number, /**param b*/b: number) => a + b; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var lambdaFoo: (a: number, b: number) => number +// | this is lambda comment +// | lambdaFoo var comment +// | ---------------------------------------------------------------------- +// var lambddaNoVarComment = /** this is lambda multiplication*/ (/**param a*/a: number, /**param b*/b: number) => a * b; +// ^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var lambddaNoVarComment: (a: number, b: number) => number +// | this is lambda multiplication +// | ---------------------------------------------------------------------- +// lambdaFoo(10, 20); +// function anotherFunc(a: number) { +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function anotherFunc(a: number): string +// | ---------------------------------------------------------------------- +// /** documentation +// @param b {string} inner parameter */ +// var lambdaVar = /** inner docs */(b: string) => { +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local var) lambdaVar: (b: string) => string +// | inner docs +// | documentation +// | @param b inner parameter +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: string +// | inner parameter +// | @param b inner parameter +// | ---------------------------------------------------------------------- +// var localVar = "Hello "; +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local var) localVar: string +// | ---------------------------------------------------------------------- +// return localVar + b; +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local var) localVar: string +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: string +// | inner parameter +// | @param b inner parameter +// | ---------------------------------------------------------------------- +// } +// return lambdaVar("World") + a; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local var) lambdaVar: (b: string) => string +// | inner docs +// | documentation +// | @param b inner parameter +// | ---------------------------------------------------------------------- +// } +// /** +// * On variable +// * @param s the first parameter! +// * @returns the parameter's length +// */ +// var assigned = /** +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var assigned: (s: string) => number +// | Summary on expression +// | On variable +// | @param s param on expression +// | @returns return on expression +// | @param s the first parameter! +// | @returns the parameter's length +// | ---------------------------------------------------------------------- +// * Summary on expression +// * @param s param on expression +// * @returns return on expression +// */function(/** On parameter */s: string) { +// return s.length; +// } +// assigned("hey"); +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var assigned: (s: string) => number +// | Summary on expression +// | On variable +// | @param s param on expression +// | @returns return on expression +// | @param s the first parameter! +// | @returns the parameter's length +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +102,7 @@ "position": 36, "name": "1" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -120,7 +217,7 @@ "position": 142, "name": "3" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -227,7 +324,7 @@ "position": 277, "name": "7" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -293,7 +390,7 @@ "position": 377, "name": "8" }, - "quickInfo": { + "item": { "kind": "local var", "kindModifiers": "", "textSpan": { @@ -411,7 +508,7 @@ "position": 407, "name": "9" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -485,7 +582,7 @@ "position": 435, "name": "10" }, - "quickInfo": { + "item": { "kind": "local var", "kindModifiers": "", "textSpan": { @@ -535,7 +632,7 @@ "position": 471, "name": "11" }, - "quickInfo": { + "item": { "kind": "local var", "kindModifiers": "", "textSpan": { @@ -585,7 +682,7 @@ "position": 482, "name": "12" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -659,7 +756,7 @@ "position": 506, "name": "13" }, - "quickInfo": { + "item": { "kind": "local var", "kindModifiers": "", "textSpan": { @@ -777,7 +874,7 @@ "position": 627, "name": "14" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -922,7 +1019,7 @@ "position": 858, "name": "16" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsArrowFunctionExpression.baseline b/tests/baselines/reference/quickInfoDisplayPartsArrowFunctionExpression.baseline index 404f09260a201..8f9bd7e63865a 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsArrowFunctionExpression.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsArrowFunctionExpression.baseline @@ -1,3 +1,41 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsArrowFunctionExpression.ts === +// var x = a => 10; +// ^ +// | ---------------------------------------------------------------------- +// | var x: (a: any) => number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: any +// | ---------------------------------------------------------------------- +// var y = (a, b) => 10; +// ^ +// | ---------------------------------------------------------------------- +// | var y: (a: any, b: any) => number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: any +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: any +// | ---------------------------------------------------------------------- +// var z = (a: number) => 10; +// ^ +// | ---------------------------------------------------------------------- +// | var z: (a: number) => number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | ---------------------------------------------------------------------- +// var z2 = () => 10; +// ^^ +// | ---------------------------------------------------------------------- +// | var z2: () => number +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +43,7 @@ "position": 4, "name": "1" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -83,7 +121,7 @@ "position": 8, "name": "5" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -133,7 +171,7 @@ "position": 21, "name": "2" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -235,7 +273,7 @@ "position": 26, "name": "6" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -285,7 +323,7 @@ "position": 29, "name": "7" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -335,7 +373,7 @@ "position": 43, "name": "3" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -413,7 +451,7 @@ "position": 48, "name": "8" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -463,7 +501,7 @@ "position": 70, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsClass.baseline b/tests/baselines/reference/quickInfoDisplayPartsClass.baseline index a0243e23ee67d..f0755ac5155f3 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClass.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClass.baseline @@ -1,3 +1,29 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsClass.ts === +// class c { +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// } +// var cInstance = new c(); +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | constructor c(): c +// | ---------------------------------------------------------------------- +// var cVal = c; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var cVal: typeof c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +31,7 @@ "position": 6, "name": "1" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -35,7 +61,7 @@ "position": 16, "name": "2" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -77,7 +103,7 @@ "position": 32, "name": "3" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -127,7 +153,7 @@ "position": 41, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -177,7 +203,7 @@ "position": 48, "name": "5" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassAccessors.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassAccessors.baseline index 30b4654f96262..c3592ada13de4 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassAccessors.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassAccessors.baseline @@ -1,3 +1,168 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsClassAccessors.ts === +// class c { +// public get publicProperty() { return ""; } +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (getter) c.publicProperty: string +// | ---------------------------------------------------------------------- +// public set publicProperty(x: string) { } +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (setter) c.publicProperty: string +// | ---------------------------------------------------------------------- +// private get privateProperty() { return ""; } +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (getter) c.privateProperty: string +// | ---------------------------------------------------------------------- +// private set privateProperty(x: string) { } +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (setter) c.privateProperty: string +// | ---------------------------------------------------------------------- +// protected get protectedProperty() { return ""; } +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (getter) c.protectedProperty: string +// | ---------------------------------------------------------------------- +// protected set protectedProperty(x: string) { } +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (setter) c.protectedProperty: string +// | ---------------------------------------------------------------------- +// static get staticProperty() { return ""; } +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (getter) c.staticProperty: string +// | ---------------------------------------------------------------------- +// static set staticProperty(x: string) { } +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (setter) c.staticProperty: string +// | ---------------------------------------------------------------------- +// private static get privateStaticProperty() { return ""; } +// ^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (getter) c.privateStaticProperty: string +// | ---------------------------------------------------------------------- +// private static set privateStaticProperty(x: string) { } +// ^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (setter) c.privateStaticProperty: string +// | ---------------------------------------------------------------------- +// protected static get protectedStaticProperty() { return ""; } +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (getter) c.protectedStaticProperty: string +// | ---------------------------------------------------------------------- +// protected static set protectedStaticProperty(x: string) { } +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (setter) c.protectedStaticProperty: string +// | ---------------------------------------------------------------------- +// method() { +// var x : string; +// x = this.publicProperty; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.publicProperty: string +// | ---------------------------------------------------------------------- +// x = this.privateProperty; +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.privateProperty: string +// | ---------------------------------------------------------------------- +// x = this.protectedProperty; +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.protectedProperty: string +// | ---------------------------------------------------------------------- +// x = c.staticProperty; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.staticProperty: string +// | ---------------------------------------------------------------------- +// x = c.privateStaticProperty; +// ^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.privateStaticProperty: string +// | ---------------------------------------------------------------------- +// x = c.protectedStaticProperty; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.protectedStaticProperty: string +// | ---------------------------------------------------------------------- +// this.publicProperty = ""; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.publicProperty: string +// | ---------------------------------------------------------------------- +// this.privateProperty = ""; +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.privateProperty: string +// | ---------------------------------------------------------------------- +// this.protectedProperty = ""; +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.protectedProperty: string +// | ---------------------------------------------------------------------- +// c.staticProperty = ""; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.staticProperty: string +// | ---------------------------------------------------------------------- +// c.privateStaticProperty = ""; +// ^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.privateStaticProperty: string +// | ---------------------------------------------------------------------- +// c.protectedStaticProperty = ""; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.protectedStaticProperty: string +// | ---------------------------------------------------------------------- +// } +// } +// var cInstance = new c(); +// var y: string; +// y = cInstance.publicProperty; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.publicProperty: string +// | ---------------------------------------------------------------------- +// y = c.staticProperty; +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.staticProperty: string +// | ---------------------------------------------------------------------- +// cInstance.publicProperty = y; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.publicProperty: string +// | ---------------------------------------------------------------------- +// c.staticProperty = y; +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.staticProperty: string +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +170,7 @@ "position": 25, "name": "1" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "public", "textSpan": { @@ -63,7 +228,7 @@ "position": 72, "name": "1s" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "public", "textSpan": { @@ -121,7 +286,7 @@ "position": 118, "name": "2" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "private", "textSpan": { @@ -179,7 +344,7 @@ "position": 167, "name": "2s" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "private", "textSpan": { @@ -237,7 +402,7 @@ "position": 216, "name": "21" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "protected", "textSpan": { @@ -295,7 +460,7 @@ "position": 269, "name": "21s" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "protected", "textSpan": { @@ -353,7 +518,7 @@ "position": 317, "name": "3" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "static", "textSpan": { @@ -411,7 +576,7 @@ "position": 364, "name": "3s" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "static", "textSpan": { @@ -469,7 +634,7 @@ "position": 418, "name": "4" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "private,static", "textSpan": { @@ -527,7 +692,7 @@ "position": 480, "name": "4s" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "private,static", "textSpan": { @@ -585,7 +750,7 @@ "position": 542, "name": "41" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "protected,static", "textSpan": { @@ -643,7 +808,7 @@ "position": 608, "name": "41s" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "protected,static", "textSpan": { @@ -701,7 +866,7 @@ "position": 703, "name": "5" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -759,7 +924,7 @@ "position": 736, "name": "6" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private", "textSpan": { @@ -817,7 +982,7 @@ "position": 770, "name": "61" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "protected", "textSpan": { @@ -875,7 +1040,7 @@ "position": 803, "name": "7" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -933,7 +1098,7 @@ "position": 833, "name": "8" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private,static", "textSpan": { @@ -991,7 +1156,7 @@ "position": 870, "name": "81" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "protected,static", "textSpan": { @@ -1049,7 +1214,7 @@ "position": 908, "name": "5s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -1107,7 +1272,7 @@ "position": 942, "name": "6s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private", "textSpan": { @@ -1165,7 +1330,7 @@ "position": 977, "name": "61s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "protected", "textSpan": { @@ -1223,7 +1388,7 @@ "position": 1011, "name": "7s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -1281,7 +1446,7 @@ "position": 1042, "name": "8s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private,static", "textSpan": { @@ -1339,7 +1504,7 @@ "position": 1080, "name": "81s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "protected,static", "textSpan": { @@ -1397,7 +1562,7 @@ "position": 1162, "name": "9" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1439,7 +1604,7 @@ "position": 1172, "name": "10" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -1497,7 +1662,7 @@ "position": 1192, "name": "11" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -1527,7 +1692,7 @@ "position": 1194, "name": "12" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -1585,7 +1750,7 @@ "position": 1210, "name": "9s" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1627,7 +1792,7 @@ "position": 1220, "name": "10s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -1685,7 +1850,7 @@ "position": 1240, "name": "11s" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -1715,7 +1880,7 @@ "position": 1242, "name": "12s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassAutoAccessors.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassAutoAccessors.baseline index c49934974d56d..28b3f045c8892 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassAutoAccessors.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassAutoAccessors.baseline @@ -1,3 +1,138 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsClassAutoAccessors.ts === +// class c { +// public accessor publicProperty: string; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (accessor) c.publicProperty: string +// | ---------------------------------------------------------------------- +// private accessor privateProperty: string; +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (accessor) c.privateProperty: string +// | ---------------------------------------------------------------------- +// protected accessor protectedProperty: string; +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (accessor) c.protectedProperty: string +// | ---------------------------------------------------------------------- +// static accessor staticProperty: string; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (accessor) c.staticProperty: string +// | ---------------------------------------------------------------------- +// private static accessor privateStaticProperty: string; +// ^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (accessor) c.privateStaticProperty: string +// | ---------------------------------------------------------------------- +// protected static accessor protectedStaticProperty: string; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (accessor) c.protectedStaticProperty: string +// | ---------------------------------------------------------------------- +// method() { +// var x: string; +// x = this.publicProperty; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.publicProperty: string +// | ---------------------------------------------------------------------- +// x = this.privateProperty; +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.privateProperty: string +// | ---------------------------------------------------------------------- +// x = this.protectedProperty; +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.protectedProperty: string +// | ---------------------------------------------------------------------- +// x = c.staticProperty; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.staticProperty: string +// | ---------------------------------------------------------------------- +// x = c.privateStaticProperty; +// ^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.privateStaticProperty: string +// | ---------------------------------------------------------------------- +// x = c.protectedStaticProperty; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.protectedStaticProperty: string +// | ---------------------------------------------------------------------- +// this.publicProperty = ""; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.publicProperty: string +// | ---------------------------------------------------------------------- +// this.privateProperty = ""; +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.privateProperty: string +// | ---------------------------------------------------------------------- +// this.protectedProperty = ""; +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.protectedProperty: string +// | ---------------------------------------------------------------------- +// c.staticProperty = ""; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.staticProperty: string +// | ---------------------------------------------------------------------- +// c.privateStaticProperty = ""; +// ^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.privateStaticProperty: string +// | ---------------------------------------------------------------------- +// c.protectedStaticProperty = ""; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.protectedStaticProperty: string +// | ---------------------------------------------------------------------- +// } +// } +// var cInstance = new c(); +// var y: string; +// y = cInstance.publicProperty; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.publicProperty: string +// | ---------------------------------------------------------------------- +// y = c.staticProperty; +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.staticProperty: string +// | ---------------------------------------------------------------------- +// cInstance.publicProperty = y; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.publicProperty: string +// | ---------------------------------------------------------------------- +// c.staticProperty = y; +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.staticProperty: string +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +140,7 @@ "position": 30, "name": "1a" }, - "quickInfo": { + "item": { "kind": "accessor", "kindModifiers": "public", "textSpan": { @@ -63,7 +198,7 @@ "position": 75, "name": "2a" }, - "quickInfo": { + "item": { "kind": "accessor", "kindModifiers": "private", "textSpan": { @@ -121,7 +256,7 @@ "position": 123, "name": "3a" }, - "quickInfo": { + "item": { "kind": "accessor", "kindModifiers": "protected", "textSpan": { @@ -179,7 +314,7 @@ "position": 170, "name": "4a" }, - "quickInfo": { + "item": { "kind": "accessor", "kindModifiers": "static", "textSpan": { @@ -237,7 +372,7 @@ "position": 222, "name": "5a" }, - "quickInfo": { + "item": { "kind": "accessor", "kindModifiers": "private,static", "textSpan": { @@ -295,7 +430,7 @@ "position": 283, "name": "6a" }, - "quickInfo": { + "item": { "kind": "accessor", "kindModifiers": "protected,static", "textSpan": { @@ -353,7 +488,7 @@ "position": 371, "name": "1g" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -411,7 +546,7 @@ "position": 404, "name": "2g" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private", "textSpan": { @@ -469,7 +604,7 @@ "position": 438, "name": "3g" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "protected", "textSpan": { @@ -527,7 +662,7 @@ "position": 471, "name": "4g" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -585,7 +720,7 @@ "position": 501, "name": "5g" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private,static", "textSpan": { @@ -643,7 +778,7 @@ "position": 538, "name": "6g" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "protected,static", "textSpan": { @@ -701,7 +836,7 @@ "position": 576, "name": "1s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -759,7 +894,7 @@ "position": 610, "name": "2s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private", "textSpan": { @@ -817,7 +952,7 @@ "position": 645, "name": "3s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "protected", "textSpan": { @@ -875,7 +1010,7 @@ "position": 679, "name": "4s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -933,7 +1068,7 @@ "position": 710, "name": "5s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private,static", "textSpan": { @@ -991,7 +1126,7 @@ "position": 748, "name": "6s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "protected,static", "textSpan": { @@ -1049,7 +1184,7 @@ "position": 830, "name": "7g" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1091,7 +1226,7 @@ "position": 840, "name": "8g" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -1149,7 +1284,7 @@ "position": 860, "name": "9g" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -1179,7 +1314,7 @@ "position": 862, "name": "10g" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -1237,7 +1372,7 @@ "position": 878, "name": "7s" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1279,7 +1414,7 @@ "position": 888, "name": "8s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -1337,7 +1472,7 @@ "position": 908, "name": "9s" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -1367,7 +1502,7 @@ "position": 910, "name": "10s" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassConstructor.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassConstructor.baseline index 834a7ce63c30c..2aab66121b7ef 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassConstructor.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassConstructor.baseline @@ -1,3 +1,135 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsClassConstructor.ts === +// class c { +// constructor() { +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor c(): c +// | ---------------------------------------------------------------------- +// } +// } +// var cInstance = new c(); +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | constructor c(): c +// | ---------------------------------------------------------------------- +// var cVal = c; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var cVal: typeof c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// class cWithOverloads { +// constructor(x: string); +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor cWithOverloads(x: string): cWithOverloads (+1 overload) +// | ---------------------------------------------------------------------- +// constructor(x: number); +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor cWithOverloads(x: number): cWithOverloads (+1 overload) +// | ---------------------------------------------------------------------- +// constructor(x: any) { +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor cWithOverloads(x: string): cWithOverloads (+1 overload) +// | ---------------------------------------------------------------------- +// } +// } +// var cWithOverloadsInstance = new cWithOverloads("hello"); +// ^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cWithOverloadsInstance: cWithOverloads +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor cWithOverloads(x: string): cWithOverloads (+1 overload) +// | ---------------------------------------------------------------------- +// var cWithOverloadsInstance2 = new cWithOverloads(10); +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cWithOverloadsInstance2: cWithOverloads +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor cWithOverloads(x: number): cWithOverloads (+1 overload) +// | ---------------------------------------------------------------------- +// var cWithOverloadsVal = cWithOverloads; +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cWithOverloadsVal: typeof cWithOverloads +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | class cWithOverloads +// | ---------------------------------------------------------------------- +// class cWithMultipleOverloads { +// constructor(x: string); +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor cWithMultipleOverloads(x: string): cWithMultipleOverloads (+2 overloads) +// | ---------------------------------------------------------------------- +// constructor(x: number); +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor cWithMultipleOverloads(x: number): cWithMultipleOverloads (+2 overloads) +// | ---------------------------------------------------------------------- +// constructor(x: boolean); +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor cWithMultipleOverloads(x: boolean): cWithMultipleOverloads (+2 overloads) +// | ---------------------------------------------------------------------- +// constructor(x: any) { +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor cWithMultipleOverloads(x: string): cWithMultipleOverloads (+2 overloads) +// | ---------------------------------------------------------------------- +// } +// } +// var cWithMultipleOverloadsInstance = new cWithMultipleOverloads("hello"); +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cWithMultipleOverloadsInstance: cWithMultipleOverloads +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor cWithMultipleOverloads(x: string): cWithMultipleOverloads (+2 overloads) +// | ---------------------------------------------------------------------- +// var cWithMultipleOverloadsInstance2 = new cWithMultipleOverloads(10); +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cWithMultipleOverloadsInstance2: cWithMultipleOverloads +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor cWithMultipleOverloads(x: number): cWithMultipleOverloads (+2 overloads) +// | ---------------------------------------------------------------------- +// var cWithMultipleOverloadsInstance3 = new cWithMultipleOverloads(true); +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cWithMultipleOverloadsInstance3: cWithMultipleOverloads +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor cWithMultipleOverloads(x: boolean): cWithMultipleOverloads (+2 overloads) +// | ---------------------------------------------------------------------- +// var cWithMultipleOverloadsVal = cWithMultipleOverloads; +// ^^^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cWithMultipleOverloadsVal: typeof cWithMultipleOverloads +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | class cWithMultipleOverloads +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +137,7 @@ "position": 14, "name": "1" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -55,7 +187,7 @@ "position": 42, "name": "2" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -97,7 +229,7 @@ "position": 58, "name": "3" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -147,7 +279,7 @@ "position": 67, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -197,7 +329,7 @@ "position": 74, "name": "5" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -227,7 +359,7 @@ "position": 104, "name": "6" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -321,7 +453,7 @@ "position": 132, "name": "7" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -415,7 +547,7 @@ "position": 160, "name": "8" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -509,7 +641,7 @@ "position": 194, "name": "9" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -551,7 +683,7 @@ "position": 223, "name": "10" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -645,7 +777,7 @@ "position": 252, "name": "11" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -687,7 +819,7 @@ "position": 282, "name": "12" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -781,7 +913,7 @@ "position": 306, "name": "13" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -831,7 +963,7 @@ "position": 326, "name": "14" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -861,7 +993,7 @@ "position": 377, "name": "15" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -955,7 +1087,7 @@ "position": 405, "name": "16" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -1049,7 +1181,7 @@ "position": 433, "name": "17" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -1143,7 +1275,7 @@ "position": 462, "name": "18" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -1237,7 +1369,7 @@ "position": 496, "name": "19" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1279,7 +1411,7 @@ "position": 533, "name": "20" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -1373,7 +1505,7 @@ "position": 570, "name": "21" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1415,7 +1547,7 @@ "position": 608, "name": "22" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -1509,7 +1641,7 @@ "position": 640, "name": "23" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1551,7 +1683,7 @@ "position": 678, "name": "24" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -1645,7 +1777,7 @@ "position": 712, "name": "25" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1695,7 +1827,7 @@ "position": 740, "name": "26" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassDefaultAnonymous.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassDefaultAnonymous.baseline index 6f0e960d8740a..a098ab06f9e2d 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassDefaultAnonymous.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassDefaultAnonymous.baseline @@ -1,3 +1,23 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsClassDefaultAnonymous.ts === +// export default class { +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /*1*/. +// | ---------------------------------------------------------------------- +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | class default +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | class default +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /*4*/. +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -12,7 +32,7 @@ "position": 7, "name": "2" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "export", "textSpan": { @@ -42,7 +62,7 @@ "position": 15, "name": "3" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "export", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassDefaultNamed.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassDefaultNamed.baseline index cdaaee1e1c239..646bda5fd0002 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassDefaultNamed.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassDefaultNamed.baseline @@ -1,3 +1,27 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsClassDefaultNamed.ts === +// export default class C { +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /*1*/. +// | ---------------------------------------------------------------------- +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | class C +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | class C +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | class C +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /*5*/. +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -12,7 +36,7 @@ "position": 7, "name": "2" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "export", "textSpan": { @@ -42,7 +66,7 @@ "position": 15, "name": "3" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "export", "textSpan": { @@ -72,7 +96,7 @@ "position": 21, "name": "4" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "export", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassIncomplete.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassIncomplete.baseline index 93919d9b5bffa..7802faff0c18b 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassIncomplete.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassIncomplete.baseline @@ -1,3 +1,15 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsClassIncomplete.ts === +// class { +// ^^^^^ +// | ---------------------------------------------------------------------- +// | class __missing +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /*2*/. +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +17,7 @@ "position": 0, "name": "1" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassMethod.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassMethod.baseline index a46272b21e50a..3e739c8b4def5 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassMethod.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassMethod.baseline @@ -1,3 +1,88 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsClassMethod.ts === +// class c { +// public publicMethod() { } +// ^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.publicMethod(): void +// | ---------------------------------------------------------------------- +// private privateMethod() { } +// ^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.privateMethod(): void +// | ---------------------------------------------------------------------- +// protected protectedMethod() { } +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.protectedMethod(): void +// | ---------------------------------------------------------------------- +// static staticMethod() { } +// ^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.staticMethod(): void +// | ---------------------------------------------------------------------- +// private static privateStaticMethod() { } +// ^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.privateStaticMethod(): void +// | ---------------------------------------------------------------------- +// protected static protectedStaticMethod() { } +// ^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.protectedStaticMethod(): void +// | ---------------------------------------------------------------------- +// method() { +// this.publicMethod(); +// ^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.publicMethod(): void +// | ---------------------------------------------------------------------- +// this.privateMethod(); +// ^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.privateMethod(): void +// | ---------------------------------------------------------------------- +// this.protectedMethod(); +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.protectedMethod(): void +// | ---------------------------------------------------------------------- +// c.staticMethod(); +// ^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.staticMethod(): void +// | ---------------------------------------------------------------------- +// c.privateStaticMethod(); +// ^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.privateStaticMethod(): void +// | ---------------------------------------------------------------------- +// c.protectedStaticMethod(); +// ^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.protectedStaticMethod(): void +// | ---------------------------------------------------------------------- +// } +// } +// var cInstance = new c(); +// cInstance.publicMethod(); +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.publicMethod(): void +// | ---------------------------------------------------------------------- +// c.staticMethod(); +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.staticMethod(): void +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +90,7 @@ "position": 21, "name": "1" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -71,7 +156,7 @@ "position": 52, "name": "2" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "private", "textSpan": { @@ -137,7 +222,7 @@ "position": 86, "name": "21" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "protected", "textSpan": { @@ -203,7 +288,7 @@ "position": 119, "name": "3" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -269,7 +354,7 @@ "position": 157, "name": "4" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "private,static", "textSpan": { @@ -335,7 +420,7 @@ "position": 204, "name": "41" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "protected,static", "textSpan": { @@ -401,7 +486,7 @@ "position": 260, "name": "5" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -467,7 +552,7 @@ "position": 289, "name": "6" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "private", "textSpan": { @@ -533,7 +618,7 @@ "position": 319, "name": "61" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "protected", "textSpan": { @@ -599,7 +684,7 @@ "position": 348, "name": "7" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -665,7 +750,7 @@ "position": 374, "name": "8" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "private,static", "textSpan": { @@ -731,7 +816,7 @@ "position": 407, "name": "81" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "protected,static", "textSpan": { @@ -797,7 +882,7 @@ "position": 465, "name": "9" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -839,7 +924,7 @@ "position": 475, "name": "10" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -905,7 +990,7 @@ "position": 491, "name": "11" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -935,7 +1020,7 @@ "position": 493, "name": "12" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassProperty.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassProperty.baseline index 052fd90f990dc..8a5adb6ad08ee 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassProperty.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassProperty.baseline @@ -1,3 +1,88 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsClassProperty.ts === +// class c { +// public publicProperty: string; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.publicProperty: string +// | ---------------------------------------------------------------------- +// private privateProperty: string; +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.privateProperty: string +// | ---------------------------------------------------------------------- +// protected protectedProperty: string; +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.protectedProperty: string +// | ---------------------------------------------------------------------- +// static staticProperty: string; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.staticProperty: string +// | ---------------------------------------------------------------------- +// private static privateStaticProperty: string; +// ^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.privateStaticProperty: string +// | ---------------------------------------------------------------------- +// protected static protectedStaticProperty: string; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.protectedStaticProperty: string +// | ---------------------------------------------------------------------- +// method() { +// this.publicProperty; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.publicProperty: string +// | ---------------------------------------------------------------------- +// this.privateProperty; +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.privateProperty: string +// | ---------------------------------------------------------------------- +// this.protectedProperty; +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.protectedProperty: string +// | ---------------------------------------------------------------------- +// c.staticProperty; +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.staticProperty: string +// | ---------------------------------------------------------------------- +// c.privateStaticProperty; +// ^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.privateStaticProperty: string +// | ---------------------------------------------------------------------- +// c.protectedStaticProperty; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.protectedStaticProperty: string +// | ---------------------------------------------------------------------- +// } +// } +// var cInstance = new c(); +// cInstance.publicProperty; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.publicProperty: string +// | ---------------------------------------------------------------------- +// c.staticProperty; +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) c.staticProperty: string +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +90,7 @@ "position": 21, "name": "1" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -63,7 +148,7 @@ "position": 57, "name": "2" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private", "textSpan": { @@ -121,7 +206,7 @@ "position": 96, "name": "21" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "protected", "textSpan": { @@ -179,7 +264,7 @@ "position": 134, "name": "3" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -237,7 +322,7 @@ "position": 177, "name": "4" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private,static", "textSpan": { @@ -295,7 +380,7 @@ "position": 229, "name": "41" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "protected,static", "textSpan": { @@ -353,7 +438,7 @@ "position": 290, "name": "5" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -411,7 +496,7 @@ "position": 319, "name": "6" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private", "textSpan": { @@ -469,7 +554,7 @@ "position": 349, "name": "61" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "protected", "textSpan": { @@ -527,7 +612,7 @@ "position": 378, "name": "7" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { @@ -585,7 +670,7 @@ "position": 404, "name": "8" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "private,static", "textSpan": { @@ -643,7 +728,7 @@ "position": 437, "name": "81" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "protected,static", "textSpan": { @@ -701,7 +786,7 @@ "position": 495, "name": "9" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -743,7 +828,7 @@ "position": 505, "name": "10" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -801,7 +886,7 @@ "position": 521, "name": "11" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -831,7 +916,7 @@ "position": 523, "name": "12" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "static", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsConst.baseline b/tests/baselines/reference/quickInfoDisplayPartsConst.baseline index b5028ffee3021..513cc0d2c9eca 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsConst.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsConst.baseline @@ -1,3 +1,99 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsConst.ts === +// const a = 10; +// ^ +// | ---------------------------------------------------------------------- +// | const a: 10 +// | ---------------------------------------------------------------------- +// function foo() { +// const b = a; +// ^ +// | ---------------------------------------------------------------------- +// | const b: 10 +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | const a: 10 +// | ---------------------------------------------------------------------- +// if (b) { +// const b1 = 10; +// ^^ +// | ---------------------------------------------------------------------- +// | const b1: 10 +// | ---------------------------------------------------------------------- +// } +// } +// module m { +// const c = 10; +// ^ +// | ---------------------------------------------------------------------- +// | const c: 10 +// | ---------------------------------------------------------------------- +// export const d = 10; +// ^ +// | ---------------------------------------------------------------------- +// | const m.d: 10 +// | ---------------------------------------------------------------------- +// if (c) { +// const e = 10; +// ^ +// | ---------------------------------------------------------------------- +// | const e: 10 +// | ---------------------------------------------------------------------- +// } +// } +// const f: () => number = () => 10; +// ^ +// | ---------------------------------------------------------------------- +// | const f: () => number +// | ---------------------------------------------------------------------- +// const g = f; +// ^ +// | ---------------------------------------------------------------------- +// | const g: () => number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | const f: () => number +// | ---------------------------------------------------------------------- +// f(); +// ^ +// | ---------------------------------------------------------------------- +// | const f: () => number +// | ---------------------------------------------------------------------- +// const h: { (a: string): number; (a: number): string; } = a => a; +// ^ +// | ---------------------------------------------------------------------- +// | const h: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// const i = h; +// ^ +// | ---------------------------------------------------------------------- +// | const i: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | const h: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// h(10); +// ^ +// | ---------------------------------------------------------------------- +// | const h: (a: number) => string (+1 overload) +// | ---------------------------------------------------------------------- +// h("hello"); +// ^ +// | ---------------------------------------------------------------------- +// | const h: (a: string) => number (+1 overload) +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +101,7 @@ "position": 6, "name": "1" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -47,7 +143,7 @@ "position": 41, "name": "2" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -89,7 +185,7 @@ "position": 45, "name": "3" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -131,7 +227,7 @@ "position": 75, "name": "4" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -173,7 +269,7 @@ "position": 113, "name": "5" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -215,7 +311,7 @@ "position": 138, "name": "6" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "export", "textSpan": { @@ -265,7 +361,7 @@ "position": 173, "name": "7" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -307,7 +403,7 @@ "position": 195, "name": "8" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -369,7 +465,7 @@ "position": 229, "name": "9" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -431,7 +527,7 @@ "position": 233, "name": "10" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -493,7 +589,7 @@ "position": 236, "name": "11" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -555,7 +651,7 @@ "position": 247, "name": "12" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -701,7 +797,7 @@ "position": 312, "name": "13" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -847,7 +943,7 @@ "position": 316, "name": "14" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -993,7 +1089,7 @@ "position": 319, "name": "15" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { @@ -1099,7 +1195,7 @@ "position": 326, "name": "16" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsEnum1.baseline b/tests/baselines/reference/quickInfoDisplayPartsEnum1.baseline index e51b64b96cd86..6e7eacfee59f0 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsEnum1.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsEnum1.baseline @@ -1,3 +1,143 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsEnum1.ts === +// enum E { +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// e1, +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) E.e1 = 0 +// | ---------------------------------------------------------------------- +// e2 = 10, +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) E.e2 = 10 +// | ---------------------------------------------------------------------- +// e3 +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) E.e3 = 11 +// | ---------------------------------------------------------------------- +// } +// var eInstance: E; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance: E +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// eInstance = E.e1; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance: E +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) E.e1 = 0 +// | ---------------------------------------------------------------------- +// eInstance = E.e2; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance: E +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) E.e2 = 10 +// | ---------------------------------------------------------------------- +// eInstance = E.e3; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance: E +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) E.e3 = 11 +// | ---------------------------------------------------------------------- +// const enum constE { +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// e1, +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE.e1 = 0 +// | ---------------------------------------------------------------------- +// e2 = 10, +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE.e2 = 10 +// | ---------------------------------------------------------------------- +// e3 +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE.e3 = 11 +// | ---------------------------------------------------------------------- +// } +// var eInstance1: constE; +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance1: constE +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// eInstance1 = constE.e1; +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance1: constE +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE.e1 = 0 +// | ---------------------------------------------------------------------- +// eInstance1 = constE.e2; +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance1: constE +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE.e2 = 10 +// | ---------------------------------------------------------------------- +// eInstance1 = constE.e3; +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance1: constE +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE.e3 = 11 +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +145,7 @@ "position": 5, "name": "1" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -35,7 +175,7 @@ "position": 13, "name": "2" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -97,7 +237,7 @@ "position": 21, "name": "3" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -159,7 +299,7 @@ "position": 34, "name": "4" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -221,7 +361,7 @@ "position": 43, "name": "5" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -263,7 +403,7 @@ "position": 54, "name": "6" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -293,7 +433,7 @@ "position": 57, "name": "7" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -335,7 +475,7 @@ "position": 69, "name": "8" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -365,7 +505,7 @@ "position": 71, "name": "9" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -427,7 +567,7 @@ "position": 75, "name": "10" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -469,7 +609,7 @@ "position": 87, "name": "11" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -499,7 +639,7 @@ "position": 89, "name": "12" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -561,7 +701,7 @@ "position": 93, "name": "13" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -603,7 +743,7 @@ "position": 105, "name": "14" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -633,7 +773,7 @@ "position": 107, "name": "15" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -695,7 +835,7 @@ "position": 122, "name": "16" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -733,7 +873,7 @@ "position": 135, "name": "17" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -795,7 +935,7 @@ "position": 143, "name": "18" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -857,7 +997,7 @@ "position": 156, "name": "19" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -919,7 +1059,7 @@ "position": 165, "name": "20" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -961,7 +1101,7 @@ "position": 177, "name": "21" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -999,7 +1139,7 @@ "position": 185, "name": "22" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1041,7 +1181,7 @@ "position": 198, "name": "23" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -1079,7 +1219,7 @@ "position": 205, "name": "24" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -1141,7 +1281,7 @@ "position": 209, "name": "25" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1183,7 +1323,7 @@ "position": 222, "name": "26" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -1221,7 +1361,7 @@ "position": 229, "name": "27" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -1283,7 +1423,7 @@ "position": 233, "name": "28" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1325,7 +1465,7 @@ "position": 246, "name": "29" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -1363,7 +1503,7 @@ "position": 253, "name": "30" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsEnum2.baseline b/tests/baselines/reference/quickInfoDisplayPartsEnum2.baseline index fb962557fe736..a3082f890d8b4 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsEnum2.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsEnum2.baseline @@ -1,3 +1,143 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsEnum2.ts === +// enum E { +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// "e1", +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) E["e1"] = 0 +// | ---------------------------------------------------------------------- +// 'e2' = 10, +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) E['e2'] = 10 +// | ---------------------------------------------------------------------- +// "e3" +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) E["e3"] = 11 +// | ---------------------------------------------------------------------- +// } +// var eInstance: E; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance: E +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// eInstance = E.e1; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance: E +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) E["e1"] = 0 +// | ---------------------------------------------------------------------- +// eInstance = E.e2; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance: E +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) E['e2'] = 10 +// | ---------------------------------------------------------------------- +// eInstance = E.e3; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance: E +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) E["e3"] = 11 +// | ---------------------------------------------------------------------- +// const enum constE { +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// "e1", +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE["e1"] = 0 +// | ---------------------------------------------------------------------- +// 'e2' = 10, +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE['e2'] = 10 +// | ---------------------------------------------------------------------- +// "e3" +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE["e3"] = 11 +// | ---------------------------------------------------------------------- +// } +// var eInstance1: constE; +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance1: constE +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// eInstance1 = constE.e1; +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance1: constE +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE["e1"] = 0 +// | ---------------------------------------------------------------------- +// eInstance1 = constE.e2; +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance1: constE +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE['e2'] = 10 +// | ---------------------------------------------------------------------- +// eInstance1 = constE.e3; +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance1: constE +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE["e3"] = 11 +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +145,7 @@ "position": 5, "name": "1" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -35,7 +175,7 @@ "position": 13, "name": "2" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -101,7 +241,7 @@ "position": 23, "name": "3" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -167,7 +307,7 @@ "position": 38, "name": "4" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -233,7 +373,7 @@ "position": 49, "name": "5" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -275,7 +415,7 @@ "position": 60, "name": "6" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -305,7 +445,7 @@ "position": 63, "name": "7" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -347,7 +487,7 @@ "position": 75, "name": "8" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -377,7 +517,7 @@ "position": 77, "name": "9" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -443,7 +583,7 @@ "position": 81, "name": "10" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -485,7 +625,7 @@ "position": 93, "name": "11" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -515,7 +655,7 @@ "position": 95, "name": "12" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -581,7 +721,7 @@ "position": 99, "name": "13" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -623,7 +763,7 @@ "position": 111, "name": "14" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -653,7 +793,7 @@ "position": 113, "name": "15" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -719,7 +859,7 @@ "position": 128, "name": "16" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -757,7 +897,7 @@ "position": 141, "name": "17" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -823,7 +963,7 @@ "position": 151, "name": "18" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -889,7 +1029,7 @@ "position": 166, "name": "19" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -955,7 +1095,7 @@ "position": 177, "name": "20" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -997,7 +1137,7 @@ "position": 189, "name": "21" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -1035,7 +1175,7 @@ "position": 197, "name": "22" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1077,7 +1217,7 @@ "position": 210, "name": "23" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -1115,7 +1255,7 @@ "position": 217, "name": "24" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -1181,7 +1321,7 @@ "position": 221, "name": "25" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1223,7 +1363,7 @@ "position": 234, "name": "26" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -1261,7 +1401,7 @@ "position": 241, "name": "27" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -1327,7 +1467,7 @@ "position": 245, "name": "28" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1369,7 +1509,7 @@ "position": 258, "name": "29" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -1407,7 +1547,7 @@ "position": 265, "name": "30" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsEnum3.baseline b/tests/baselines/reference/quickInfoDisplayPartsEnum3.baseline index b949e837d88d5..4d70350891d39 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsEnum3.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsEnum3.baseline @@ -1,3 +1,143 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsEnum3.ts === +// enum E { +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// "e1", +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) E["e1"] = 0 +// | ---------------------------------------------------------------------- +// 'e2' = 10, +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) E['e2'] = 10 +// | ---------------------------------------------------------------------- +// "e3" +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) E["e3"] = 11 +// | ---------------------------------------------------------------------- +// } +// var eInstance: E; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance: E +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// eInstance = E["e1"]; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance: E +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) E["e1"] = 0 +// | ---------------------------------------------------------------------- +// eInstance = E["e2"]; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance: E +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) E['e2'] = 10 +// | ---------------------------------------------------------------------- +// eInstance = E['e3']; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance: E +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | enum E +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) E["e3"] = 11 +// | ---------------------------------------------------------------------- +// const enum constE { +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// "e1", +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE["e1"] = 0 +// | ---------------------------------------------------------------------- +// 'e2' = 10, +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE['e2'] = 10 +// | ---------------------------------------------------------------------- +// "e3" +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE["e3"] = 11 +// | ---------------------------------------------------------------------- +// } +// var eInstance1: constE; +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance1: constE +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// eInstance1 = constE["e1"]; +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance1: constE +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE["e1"] = 0 +// | ---------------------------------------------------------------------- +// eInstance1 = constE["e2"]; +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance1: constE +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE['e2'] = 10 +// | ---------------------------------------------------------------------- +// eInstance1 = constE['e3']; +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var eInstance1: constE +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | const enum constE +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) constE["e3"] = 11 +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +145,7 @@ "position": 5, "name": "1" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -35,7 +175,7 @@ "position": 13, "name": "2" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -101,7 +241,7 @@ "position": 23, "name": "3" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -167,7 +307,7 @@ "position": 38, "name": "4" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -233,7 +373,7 @@ "position": 49, "name": "5" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -275,7 +415,7 @@ "position": 60, "name": "6" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -305,7 +445,7 @@ "position": 63, "name": "7" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -347,7 +487,7 @@ "position": 75, "name": "8" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -377,7 +517,7 @@ "position": 77, "name": "9" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -443,7 +583,7 @@ "position": 84, "name": "10" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -485,7 +625,7 @@ "position": 96, "name": "11" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -515,7 +655,7 @@ "position": 98, "name": "12" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -581,7 +721,7 @@ "position": 105, "name": "13" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -623,7 +763,7 @@ "position": 117, "name": "14" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -653,7 +793,7 @@ "position": 119, "name": "15" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -719,7 +859,7 @@ "position": 137, "name": "16" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -757,7 +897,7 @@ "position": 150, "name": "17" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -823,7 +963,7 @@ "position": 160, "name": "18" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -889,7 +1029,7 @@ "position": 175, "name": "19" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -955,7 +1095,7 @@ "position": 186, "name": "20" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -997,7 +1137,7 @@ "position": 198, "name": "21" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -1035,7 +1175,7 @@ "position": 206, "name": "22" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1077,7 +1217,7 @@ "position": 219, "name": "23" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -1115,7 +1255,7 @@ "position": 226, "name": "24" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -1181,7 +1321,7 @@ "position": 233, "name": "25" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1223,7 +1363,7 @@ "position": 246, "name": "26" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -1261,7 +1401,7 @@ "position": 253, "name": "27" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -1327,7 +1467,7 @@ "position": 260, "name": "28" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1369,7 +1509,7 @@ "position": 273, "name": "29" }, - "quickInfo": { + "item": { "kind": "enum", "kindModifiers": "", "textSpan": { @@ -1407,7 +1547,7 @@ "position": 280, "name": "30" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsEnum4.baseline b/tests/baselines/reference/quickInfoDisplayPartsEnum4.baseline index 448050703f809..1b9fe48619d50 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsEnum4.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsEnum4.baseline @@ -1,3 +1,19 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsEnum4.ts === +// const enum Foo { +// "\t" = 9, +// "\u007f" = 127, +// } +// Foo["\t"] +// ^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) Foo["\t"] = 9 +// | ---------------------------------------------------------------------- +// Foo["\u007f"] +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (enum member) Foo["\u007f"] = 127 +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +21,7 @@ "position": 51, "name": "1" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { @@ -71,7 +87,7 @@ "position": 61, "name": "2" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsExternalModuleAlias.baseline b/tests/baselines/reference/quickInfoDisplayPartsExternalModuleAlias.baseline index c820c55c2af7c..bf0173b6f2172 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsExternalModuleAlias.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsExternalModuleAlias.baseline @@ -1,3 +1,33 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsExternalModuleAlias_file1.ts === +// import a1 = require("./quickInfoDisplayPartsExternalModuleAlias_file0"); +// ^^ +// | ---------------------------------------------------------------------- +// | import a1 = require("./quickInfoDisplayPartsExternalModuleAlias_file0") +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | module a1 +// | ---------------------------------------------------------------------- +// new a1.m1.c(); +// ^^ +// | ---------------------------------------------------------------------- +// | import a1 = require("./quickInfoDisplayPartsExternalModuleAlias_file0") +// | ---------------------------------------------------------------------- +// export import a2 = require("./quickInfoDisplayPartsExternalModuleAlias_file0"); +// ^^ +// | ---------------------------------------------------------------------- +// | import a2 = require("./quickInfoDisplayPartsExternalModuleAlias_file0") +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | module a1 +// | ---------------------------------------------------------------------- +// new a2.m1.c(); +// ^^ +// | ---------------------------------------------------------------------- +// | import a2 = require("./quickInfoDisplayPartsExternalModuleAlias_file0") +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +35,7 @@ "position": 7, "name": "1" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "", "textSpan": { @@ -63,7 +93,7 @@ "position": 20, "name": "mod1" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "", "textSpan": { @@ -93,7 +123,7 @@ "position": 77, "name": "2" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "", "textSpan": { @@ -151,7 +181,7 @@ "position": 102, "name": "3" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "export", "textSpan": { @@ -209,7 +239,7 @@ "position": 115, "name": "mod2" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "", "textSpan": { @@ -239,7 +269,7 @@ "position": 172, "name": "4" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "export", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsExternalModules.baseline b/tests/baselines/reference/quickInfoDisplayPartsExternalModules.baseline index afacb4cb64784..0ce40cd0f590e 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsExternalModules.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsExternalModules.baseline @@ -1,3 +1,85 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsExternalModules.ts === +// export namespace m { +// ^ +// | ---------------------------------------------------------------------- +// | namespace m +// | ---------------------------------------------------------------------- +// var namespaceElemWithoutExport = 10; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var namespaceElemWithoutExport: number +// | ---------------------------------------------------------------------- +// export var namespaceElemWithExport = 10; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var m.namespaceElemWithExport: number +// | ---------------------------------------------------------------------- +// } +// export var a = m; +// ^ +// | ---------------------------------------------------------------------- +// | var a: typeof m +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | namespace m +// | ---------------------------------------------------------------------- +// export var b: typeof m; +// ^ +// | ---------------------------------------------------------------------- +// | var b: typeof m +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | namespace m +// | ---------------------------------------------------------------------- +// export namespace m1.m2 { +// ^^ +// | ---------------------------------------------------------------------- +// | namespace m1 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | namespace m1.m2 +// | ---------------------------------------------------------------------- +// var namespaceElemWithoutExport = 10; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var namespaceElemWithoutExport: number +// | ---------------------------------------------------------------------- +// export var namespaceElemWithExport = 10; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var m1.m2.namespaceElemWithExport: number +// | ---------------------------------------------------------------------- +// } +// export var x = m1.m2; +// ^ +// | ---------------------------------------------------------------------- +// | var x: typeof m1.m2 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | namespace m1 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | namespace m1.m2 +// | ---------------------------------------------------------------------- +// export var y: typeof m1.m2; +// ^ +// | ---------------------------------------------------------------------- +// | var y: typeof m1.m2 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | namespace m1 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | namespace m1.m2 +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +87,7 @@ "position": 17, "name": "1" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "export", "textSpan": { @@ -35,7 +117,7 @@ "position": 29, "name": "2" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -77,7 +159,7 @@ "position": 77, "name": "3" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "export", "textSpan": { @@ -127,7 +209,7 @@ "position": 120, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "export", "textSpan": { @@ -177,7 +259,7 @@ "position": 124, "name": "5" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "export", "textSpan": { @@ -207,7 +289,7 @@ "position": 138, "name": "6" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "export", "textSpan": { @@ -257,7 +339,7 @@ "position": 148, "name": "7" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "export", "textSpan": { @@ -287,7 +369,7 @@ "position": 168, "name": "8" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "export", "textSpan": { @@ -317,7 +399,7 @@ "position": 171, "name": "9" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "export", "textSpan": { @@ -355,7 +437,7 @@ "position": 184, "name": "10" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -397,7 +479,7 @@ "position": 232, "name": "11" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "export", "textSpan": { @@ -455,7 +537,7 @@ "position": 275, "name": "12" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "export", "textSpan": { @@ -513,7 +595,7 @@ "position": 279, "name": "13" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "export", "textSpan": { @@ -543,7 +625,7 @@ "position": 282, "name": "14" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "export", "textSpan": { @@ -581,7 +663,7 @@ "position": 297, "name": "15" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "export", "textSpan": { @@ -639,7 +721,7 @@ "position": 307, "name": "16" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "export", "textSpan": { @@ -669,7 +751,7 @@ "position": 310, "name": "17" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "export", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsFunction.baseline b/tests/baselines/reference/quickInfoDisplayPartsFunction.baseline index 3120a03a61141..e97900efd6742 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsFunction.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsFunction.baseline @@ -1,3 +1,80 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsFunction.ts === +// function foo(param: string, optionalParam?: string, paramWithInitializer = "hello", ...restParam: string[]) { +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(param: string, optionalParam?: string, paramWithInitializer?: string, ...restParam: string[]): void +// | ---------------------------------------------------------------------- +// } +// function foowithoverload(a: string): string; +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function foowithoverload(a: string): string (+1 overload) +// | ---------------------------------------------------------------------- +// function foowithoverload(a: number): number; +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function foowithoverload(a: number): number (+1 overload) +// | ---------------------------------------------------------------------- +// function foowithoverload(a: any): any { +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function foowithoverload(a: string): string (+1 overload) +// | ---------------------------------------------------------------------- +// return a; +// } +// function foowith3overload(a: string): string; +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function foowith3overload(a: string): string (+2 overloads) +// | ---------------------------------------------------------------------- +// function foowith3overload(a: number): number; +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function foowith3overload(a: number): number (+2 overloads) +// | ---------------------------------------------------------------------- +// function foowith3overload(a: boolean): boolean; +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function foowith3overload(a: boolean): boolean (+2 overloads) +// | ---------------------------------------------------------------------- +// function foowith3overload(a: any): any { +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function foowith3overload(a: string): string (+2 overloads) +// | ---------------------------------------------------------------------- +// return a; +// } +// foo("hello"); +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(param: string, optionalParam?: string, paramWithInitializer?: string, ...restParam: string[]): void +// | ---------------------------------------------------------------------- +// foowithoverload("hello"); +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function foowithoverload(a: string): string (+1 overload) +// | ---------------------------------------------------------------------- +// foowithoverload(10); +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function foowithoverload(a: number): number (+1 overload) +// | ---------------------------------------------------------------------- +// foowith3overload("hello"); +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function foowith3overload(a: string): string (+2 overloads) +// | ---------------------------------------------------------------------- +// foowith3overload(10); +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function foowith3overload(a: number): number (+2 overloads) +// | ---------------------------------------------------------------------- +// foowith3overload(true); +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function foowith3overload(a: boolean): boolean (+2 overloads) +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +82,7 @@ "position": 9, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -163,7 +240,7 @@ "position": 121, "name": "2" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -257,7 +334,7 @@ "position": 166, "name": "3" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -351,7 +428,7 @@ "position": 211, "name": "4" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -445,7 +522,7 @@ "position": 267, "name": "5" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -539,7 +616,7 @@ "position": 313, "name": "6" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -633,7 +710,7 @@ "position": 359, "name": "7" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -727,7 +804,7 @@ "position": 407, "name": "8" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -821,7 +898,7 @@ "position": 455, "name": "9" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -979,7 +1056,7 @@ "position": 469, "name": "10" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -1073,7 +1150,7 @@ "position": 495, "name": "11" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -1167,7 +1244,7 @@ "position": 516, "name": "12" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -1261,7 +1338,7 @@ "position": 543, "name": "13" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -1355,7 +1432,7 @@ "position": 565, "name": "14" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsFunctionExpression.baseline b/tests/baselines/reference/quickInfoDisplayPartsFunctionExpression.baseline index af9500a8e0a24..31c2eb23ece60 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsFunctionExpression.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsFunctionExpression.baseline @@ -1,3 +1,37 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsFunctionExpression.ts === +// var x = function foo() { +// ^ +// | ---------------------------------------------------------------------- +// | var x: () => void +// | ---------------------------------------------------------------------- +// ^^^ +// | ---------------------------------------------------------------------- +// | (local function) foo(): void +// | ---------------------------------------------------------------------- +// foo(); +// ^^^ +// | ---------------------------------------------------------------------- +// | (local function) foo(): void +// | ---------------------------------------------------------------------- +// }; +// var y = function () { +// ^ +// | ---------------------------------------------------------------------- +// | var y: () => void +// | ---------------------------------------------------------------------- +// }; +// (function foo1() { +// ^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foo1(): void +// | ---------------------------------------------------------------------- +// foo1(); +// ^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foo1(): void +// | ---------------------------------------------------------------------- +// })(); + [ { "marker": { @@ -5,7 +39,7 @@ "position": 4, "name": "1" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -67,7 +101,7 @@ "position": 17, "name": "2" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -125,7 +159,7 @@ "position": 29, "name": "3" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -183,7 +217,7 @@ "position": 43, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -245,7 +279,7 @@ "position": 74, "name": "5" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -303,7 +337,7 @@ "position": 87, "name": "6" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsFunctionIncomplete.baseline b/tests/baselines/reference/quickInfoDisplayPartsFunctionIncomplete.baseline index 829dd84f076e3..ade64c39cc5a2 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsFunctionIncomplete.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsFunctionIncomplete.baseline @@ -1,3 +1,25 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsFunctionIncomplete.ts === +// function (param: string) { +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function (Missing)(param: string): void (+1 overload) +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /*2*/. +// | ---------------------------------------------------------------------- +// }\ +// function { +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function (Missing)(param: string): void (+1 overload) +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /*4*/. +// | ---------------------------------------------------------------------- +// }\ + [ { "marker": { @@ -5,7 +27,7 @@ "position": 0, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -106,7 +128,7 @@ "position": 30, "name": "3" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsInterface.baseline b/tests/baselines/reference/quickInfoDisplayPartsInterface.baseline index 15a5bccd86a44..689938309e5dc 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsInterface.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsInterface.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsInterface.ts === +// interface i { +// ^ +// | ---------------------------------------------------------------------- +// | interface i +// | ---------------------------------------------------------------------- +// } +// var iInstance: i; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var iInstance: i +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | interface i +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +22,7 @@ "position": 10, "name": "1" }, - "quickInfo": { + "item": { "kind": "interface", "kindModifiers": "", "textSpan": { @@ -35,7 +52,7 @@ "position": 20, "name": "2" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -77,7 +94,7 @@ "position": 31, "name": "3" }, - "quickInfo": { + "item": { "kind": "interface", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsInterfaceMembers.baseline b/tests/baselines/reference/quickInfoDisplayPartsInterfaceMembers.baseline index 64926c64a8209..df3eafe57058f 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsInterfaceMembers.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsInterfaceMembers.baseline @@ -1,3 +1,53 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsInterfaceMembers.ts === +// interface I { +// property: string; +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) I.property: string +// | ---------------------------------------------------------------------- +// method(): string; +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) I.method(): string +// | ---------------------------------------------------------------------- +// (): string; +// new (): I; +// } +// var iInstance: I; +// iInstance.property = iInstance.method(); +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var iInstance: I +// | ---------------------------------------------------------------------- +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) I.property: string +// | ---------------------------------------------------------------------- +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var iInstance: I +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) I.method(): string +// | ---------------------------------------------------------------------- +// iInstance(); +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var iInstance: I +// | () => string +// | ---------------------------------------------------------------------- +// var anotherInstance = new iInstance(); +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var anotherInstance: I +// | ---------------------------------------------------------------------- +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var iInstance: I +// | new () => I +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +55,7 @@ "position": 18, "name": "1" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -63,7 +113,7 @@ "position": 40, "name": "2" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -129,7 +179,7 @@ "position": 109, "name": "3" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -171,7 +221,7 @@ "position": 119, "name": "4" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -229,7 +279,7 @@ "position": 130, "name": "5" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -271,7 +321,7 @@ "position": 140, "name": "6" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -337,7 +387,7 @@ "position": 150, "name": "7" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -407,7 +457,7 @@ "position": 167, "name": "8" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -449,7 +499,7 @@ "position": 189, "name": "9" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsInternalModuleAlias.baseline b/tests/baselines/reference/quickInfoDisplayPartsInternalModuleAlias.baseline index 7bbb337005dc8..715e8055de2c9 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsInternalModuleAlias.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsInternalModuleAlias.baseline @@ -1,3 +1,59 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsInternalModuleAlias.ts === +// module m.m1 { +// export class c { +// } +// } +// module m2 { +// import a1 = m; +// ^^ +// | ---------------------------------------------------------------------- +// | (alias) namespace a1 +// | import a1 = m +// | ---------------------------------------------------------------------- +// new a1.m1.c(); +// ^^ +// | ---------------------------------------------------------------------- +// | (alias) namespace a1 +// | import a1 = m +// | ---------------------------------------------------------------------- +// import a2 = m.m1; +// ^^ +// | ---------------------------------------------------------------------- +// | (alias) namespace a2 +// | import a2 = m.m1 +// | ---------------------------------------------------------------------- +// new a2.c(); +// ^^ +// | ---------------------------------------------------------------------- +// | (alias) namespace a2 +// | import a2 = m.m1 +// | ---------------------------------------------------------------------- +// export import a3 = m; +// ^^ +// | ---------------------------------------------------------------------- +// | (alias) namespace m2.a3 +// | import m2.a3 = m +// | ---------------------------------------------------------------------- +// new a3.m1.c(); +// ^^ +// | ---------------------------------------------------------------------- +// | (alias) namespace m2.a3 +// | import m2.a3 = m +// | ---------------------------------------------------------------------- +// export import a4 = m.m1; +// ^^ +// | ---------------------------------------------------------------------- +// | (alias) namespace m2.a4 +// | import m2.a4 = m.m1 +// | ---------------------------------------------------------------------- +// new a4.c(); +// ^^ +// | ---------------------------------------------------------------------- +// | (alias) namespace m2.a4 +// | import m2.a4 = m.m1 +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +61,7 @@ "position": 66, "name": "1" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "", "textSpan": { @@ -83,7 +139,7 @@ "position": 82, "name": "2" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "", "textSpan": { @@ -161,7 +217,7 @@ "position": 104, "name": "3" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "export", "textSpan": { @@ -247,7 +303,7 @@ "position": 123, "name": "4" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "export", "textSpan": { @@ -333,7 +389,7 @@ "position": 149, "name": "5" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "export", "textSpan": { @@ -427,7 +483,7 @@ "position": 165, "name": "6" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "export", "textSpan": { @@ -521,7 +577,7 @@ "position": 194, "name": "7" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "export", "textSpan": { @@ -623,7 +679,7 @@ "position": 213, "name": "8" }, - "quickInfo": { + "item": { "kind": "alias", "kindModifiers": "export", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsLet.baseline b/tests/baselines/reference/quickInfoDisplayPartsLet.baseline index 230977d1e48de..db61e72f097d0 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsLet.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsLet.baseline @@ -1,3 +1,99 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsLet.ts === +// let a = 10; +// ^ +// | ---------------------------------------------------------------------- +// | let a: number +// | ---------------------------------------------------------------------- +// function foo() { +// let b = a; +// ^ +// | ---------------------------------------------------------------------- +// | let b: number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | let a: number +// | ---------------------------------------------------------------------- +// if (b) { +// let b1 = 10; +// ^^ +// | ---------------------------------------------------------------------- +// | let b1: number +// | ---------------------------------------------------------------------- +// } +// } +// module m { +// let c = 10; +// ^ +// | ---------------------------------------------------------------------- +// | let c: number +// | ---------------------------------------------------------------------- +// export let d = 10; +// ^ +// | ---------------------------------------------------------------------- +// | let m.d: number +// | ---------------------------------------------------------------------- +// if (c) { +// let e = 10; +// ^ +// | ---------------------------------------------------------------------- +// | let e: number +// | ---------------------------------------------------------------------- +// } +// } +// let f: () => number; +// ^ +// | ---------------------------------------------------------------------- +// | let f: () => number +// | ---------------------------------------------------------------------- +// let g = f; +// ^ +// | ---------------------------------------------------------------------- +// | let g: () => number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | let f: () => number +// | ---------------------------------------------------------------------- +// f(); +// ^ +// | ---------------------------------------------------------------------- +// | let f: () => number +// | ---------------------------------------------------------------------- +// let h: { (a: string): number; (a: number): string; }; +// ^ +// | ---------------------------------------------------------------------- +// | let h: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// let i = h; +// ^ +// | ---------------------------------------------------------------------- +// | let i: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | let h: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// h(10); +// ^ +// | ---------------------------------------------------------------------- +// | let h: (a: number) => string (+1 overload) +// | ---------------------------------------------------------------------- +// h("hello"); +// ^ +// | ---------------------------------------------------------------------- +// | let h: (a: string) => number (+1 overload) +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +101,7 @@ "position": 4, "name": "1" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -47,7 +143,7 @@ "position": 37, "name": "2" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -89,7 +185,7 @@ "position": 41, "name": "3" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -131,7 +227,7 @@ "position": 69, "name": "4" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -173,7 +269,7 @@ "position": 105, "name": "5" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -215,7 +311,7 @@ "position": 128, "name": "6" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "export", "textSpan": { @@ -265,7 +361,7 @@ "position": 161, "name": "7" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -307,7 +403,7 @@ "position": 181, "name": "8" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -369,7 +465,7 @@ "position": 202, "name": "9" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -431,7 +527,7 @@ "position": 206, "name": "10" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -493,7 +589,7 @@ "position": 209, "name": "11" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -555,7 +651,7 @@ "position": 218, "name": "12" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -701,7 +797,7 @@ "position": 272, "name": "13" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -847,7 +943,7 @@ "position": 276, "name": "14" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -993,7 +1089,7 @@ "position": 279, "name": "15" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -1099,7 +1195,7 @@ "position": 286, "name": "16" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsLiteralLikeNames01.baseline b/tests/baselines/reference/quickInfoDisplayPartsLiteralLikeNames01.baseline index fd9e4af704f0d..f2e8f1886c689 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsLiteralLikeNames01.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsLiteralLikeNames01.baseline @@ -1,3 +1,58 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsLiteralLikeNames01.ts === +// class C { +// public 1() { } +// ^ +// | ---------------------------------------------------------------------- +// | (method) C[1](): void +// | ---------------------------------------------------------------------- +// private Infinity() { } +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) C.Infinity(): void +// | ---------------------------------------------------------------------- +// protected NaN() { } +// ^^^ +// | ---------------------------------------------------------------------- +// | (method) C.NaN(): void +// | ---------------------------------------------------------------------- +// static "stringLiteralName"() { } +// ^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) C["stringLiteralName"](): void +// | ---------------------------------------------------------------------- +// method() { +// this[1](); +// ^ +// | ---------------------------------------------------------------------- +// | (method) C[1](): void +// | ---------------------------------------------------------------------- +// this["1"](); +// ^^^ +// | ---------------------------------------------------------------------- +// | (method) C[1](): void +// | ---------------------------------------------------------------------- +// this.Infinity(); +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) C.Infinity(): void +// | ---------------------------------------------------------------------- +// this["Infinity"](); +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) C.Infinity(): void +// | ---------------------------------------------------------------------- +// this.NaN(); +// ^^^ +// | ---------------------------------------------------------------------- +// | (method) C.NaN(): void +// | ---------------------------------------------------------------------- +// C.stringLiteralName(); +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) C["stringLiteralName"](): void +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +60,7 @@ "position": 21, "name": "1" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -75,7 +130,7 @@ "position": 41, "name": "2" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "private", "textSpan": { @@ -141,7 +196,7 @@ "position": 70, "name": "3" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "protected", "textSpan": { @@ -207,7 +262,7 @@ "position": 91, "name": "4" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -277,7 +332,7 @@ "position": 145, "name": "5" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -347,7 +402,7 @@ "position": 164, "name": "6" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public", "textSpan": { @@ -417,7 +472,7 @@ "position": 185, "name": "7" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "private", "textSpan": { @@ -483,7 +538,7 @@ "position": 210, "name": "8" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "private", "textSpan": { @@ -549,7 +604,7 @@ "position": 238, "name": "9" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "protected", "textSpan": { @@ -615,7 +670,7 @@ "position": 255, "name": "10" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsLocalFunction.baseline b/tests/baselines/reference/quickInfoDisplayPartsLocalFunction.baseline index 63595ac1a5ab2..69eeef0f8cd18 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsLocalFunction.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsLocalFunction.baseline @@ -1,3 +1,91 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsLocalFunction.ts === +// function outerFoo() { +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function outerFoo(): void +// | ---------------------------------------------------------------------- +// function foo(param: string, optionalParam?: string, paramWithInitializer = "hello", ...restParam: string[]) { +// ^^^ +// | ---------------------------------------------------------------------- +// | (local function) foo(param: string, optionalParam?: string, paramWithInitializer?: string, ...restParam: string[]): void +// | ---------------------------------------------------------------------- +// } +// function foowithoverload(a: string): string; +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foowithoverload(a: string): string (+1 overload) +// | ---------------------------------------------------------------------- +// function foowithoverload(a: number): number; +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foowithoverload(a: number): number (+1 overload) +// | ---------------------------------------------------------------------- +// function foowithoverload(a: any): any { +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foowithoverload(a: string): string (+1 overload) +// | ---------------------------------------------------------------------- +// return a; +// } +// function foowith3overload(a: string): string; +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foowith3overload(a: string): string (+2 overloads) +// | ---------------------------------------------------------------------- +// function foowith3overload(a: number): number; +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foowith3overload(a: number): number (+2 overloads) +// | ---------------------------------------------------------------------- +// function foowith3overload(a: boolean): boolean; +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foowith3overload(a: boolean): boolean (+2 overloads) +// | ---------------------------------------------------------------------- +// function foowith3overload(a: any): any { +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foowith3overload(a: string): string (+2 overloads) +// | ---------------------------------------------------------------------- +// return a; +// } +// foo("hello"); +// ^^^ +// | ---------------------------------------------------------------------- +// | (local function) foo(param: string, optionalParam?: string, paramWithInitializer?: string, ...restParam: string[]): void +// | ---------------------------------------------------------------------- +// foowithoverload("hello"); +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foowithoverload(a: string): string (+1 overload) +// | ---------------------------------------------------------------------- +// foowithoverload(10); +// ^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foowithoverload(a: number): number (+1 overload) +// | ---------------------------------------------------------------------- +// foowith3overload("hello"); +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foowith3overload(a: string): string (+2 overloads) +// | ---------------------------------------------------------------------- +// foowith3overload(10); +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foowith3overload(a: number): number (+2 overloads) +// | ---------------------------------------------------------------------- +// foowith3overload(true); +// ^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (local function) foowith3overload(a: boolean): boolean (+2 overloads) +// | ---------------------------------------------------------------------- +// } +// outerFoo(); +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | function outerFoo(): void +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +93,7 @@ "position": 9, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -55,7 +143,7 @@ "position": 35, "name": "2" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -221,7 +309,7 @@ "position": 155, "name": "3" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -323,7 +411,7 @@ "position": 204, "name": "4" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -425,7 +513,7 @@ "position": 253, "name": "5" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -527,7 +615,7 @@ "position": 321, "name": "6" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -629,7 +717,7 @@ "position": 371, "name": "7" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -731,7 +819,7 @@ "position": 421, "name": "8" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -833,7 +921,7 @@ "position": 473, "name": "9" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -935,7 +1023,7 @@ "position": 533, "name": "10" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -1101,7 +1189,7 @@ "position": 551, "name": "11" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -1203,7 +1291,7 @@ "position": 581, "name": "12" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -1305,7 +1393,7 @@ "position": 606, "name": "13" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -1407,7 +1495,7 @@ "position": 637, "name": "14" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -1509,7 +1597,7 @@ "position": 663, "name": "15" }, - "quickInfo": { + "item": { "kind": "local function", "kindModifiers": "", "textSpan": { @@ -1611,7 +1699,7 @@ "position": 689, "name": "16" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsModules.baseline b/tests/baselines/reference/quickInfoDisplayPartsModules.baseline index 8e6c547ffb510..c7483f308c9a0 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsModules.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsModules.baseline @@ -1,3 +1,85 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsModules.ts === +// namespace m { +// ^ +// | ---------------------------------------------------------------------- +// | namespace m +// | ---------------------------------------------------------------------- +// var namespaceElemWithoutExport = 10; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var namespaceElemWithoutExport: number +// | ---------------------------------------------------------------------- +// export var namespaceElemWithExport = 10; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var m.namespaceElemWithExport: number +// | ---------------------------------------------------------------------- +// } +// var a = m; +// ^ +// | ---------------------------------------------------------------------- +// | var a: typeof m +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | namespace m +// | ---------------------------------------------------------------------- +// var b: typeof m; +// ^ +// | ---------------------------------------------------------------------- +// | var b: typeof m +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | namespace m +// | ---------------------------------------------------------------------- +// namespace m1.m2 { +// ^^ +// | ---------------------------------------------------------------------- +// | namespace m1 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | namespace m1.m2 +// | ---------------------------------------------------------------------- +// var namespaceElemWithoutExport = 10; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var namespaceElemWithoutExport: number +// | ---------------------------------------------------------------------- +// export var namespaceElemWithExport = 10; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var m1.m2.namespaceElemWithExport: number +// | ---------------------------------------------------------------------- +// } +// var x = m1.m2; +// ^ +// | ---------------------------------------------------------------------- +// | var x: typeof m1.m2 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | namespace m1 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | namespace m1.m2 +// | ---------------------------------------------------------------------- +// var y: typeof m1.m2; +// ^ +// | ---------------------------------------------------------------------- +// | var y: typeof m1.m2 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | namespace m1 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | namespace m1.m2 +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +87,7 @@ "position": 10, "name": "1" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "", "textSpan": { @@ -35,7 +117,7 @@ "position": 22, "name": "2" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -77,7 +159,7 @@ "position": 70, "name": "3" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "export", "textSpan": { @@ -127,7 +209,7 @@ "position": 106, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -177,7 +259,7 @@ "position": 110, "name": "5" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "", "textSpan": { @@ -207,7 +289,7 @@ "position": 117, "name": "6" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -257,7 +339,7 @@ "position": 127, "name": "7" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "", "textSpan": { @@ -287,7 +369,7 @@ "position": 140, "name": "8" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "", "textSpan": { @@ -317,7 +399,7 @@ "position": 143, "name": "9" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "export", "textSpan": { @@ -355,7 +437,7 @@ "position": 156, "name": "10" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -397,7 +479,7 @@ "position": 204, "name": "11" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "export", "textSpan": { @@ -455,7 +537,7 @@ "position": 240, "name": "12" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -513,7 +595,7 @@ "position": 244, "name": "13" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "", "textSpan": { @@ -543,7 +625,7 @@ "position": 247, "name": "14" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "export", "textSpan": { @@ -581,7 +663,7 @@ "position": 255, "name": "15" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -639,7 +721,7 @@ "position": 265, "name": "16" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "", "textSpan": { @@ -669,7 +751,7 @@ "position": 268, "name": "17" }, - "quickInfo": { + "item": { "kind": "module", "kindModifiers": "export", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsParameters.baseline b/tests/baselines/reference/quickInfoDisplayPartsParameters.baseline index 81f0458148a8e..dcd1de9e5a68b 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsParameters.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsParameters.baseline @@ -1,3 +1,49 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsParameters.ts === +// /** @return *crunch* */ +// function foo(param: string, optionalParam?: string, paramWithInitializer = "hello", ...restParam: string[]) { +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(param: string, optionalParam?: string, paramWithInitializer?: string, ...restParam: string[]): void +// | @return *crunch* +// | ---------------------------------------------------------------------- +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (parameter) param: string +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (parameter) optionalParam: string +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (parameter) paramWithInitializer: string +// | ---------------------------------------------------------------------- +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (parameter) restParam: string[] +// | ---------------------------------------------------------------------- +// param = "Hello"; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (parameter) param: string +// | ---------------------------------------------------------------------- +// optionalParam = "World"; +// ^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (parameter) optionalParam: string +// | ---------------------------------------------------------------------- +// paramWithInitializer = "Hello"; +// ^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (parameter) paramWithInitializer: string +// | ---------------------------------------------------------------------- +// restParam[0] = "World"; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (parameter) restParam: string[] +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +51,7 @@ "position": 33, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -174,7 +220,7 @@ "position": 37, "name": "2" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -224,7 +270,7 @@ "position": 52, "name": "3" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -274,7 +320,7 @@ "position": 76, "name": "4" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -324,7 +370,7 @@ "position": 111, "name": "5" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -382,7 +428,7 @@ "position": 138, "name": "6" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -432,7 +478,7 @@ "position": 159, "name": "7" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -482,7 +528,7 @@ "position": 188, "name": "8" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -532,7 +578,7 @@ "position": 224, "name": "9" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsTypeAlias.baseline b/tests/baselines/reference/quickInfoDisplayPartsTypeAlias.baseline index c99ecdeaa83e7..9e6dab5b25974 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsTypeAlias.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsTypeAlias.baseline @@ -1,3 +1,33 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsTypeAlias.ts === +// class c { +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// } +// type t1 = c; +// ^^ +// | ---------------------------------------------------------------------- +// | type t1 = c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// var cInstance: t1 = new c(); +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | type t1 = c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | constructor c(): c +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +35,7 @@ "position": 6, "name": "1" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -35,7 +65,7 @@ "position": 17, "name": "2" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { @@ -81,7 +111,7 @@ "position": 22, "name": "3" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -111,7 +141,7 @@ "position": 29, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -153,7 +183,7 @@ "position": 40, "name": "5" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { @@ -199,7 +229,7 @@ "position": 49, "name": "6" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInClass.baseline b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInClass.baseline index 915c865086b50..280377195ff14 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInClass.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInClass.baseline @@ -1,3 +1,189 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInClass.ts === +// class c { +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in c +// | ---------------------------------------------------------------------- +// constructor(a: T) { +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor c(a: T): c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: T +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in c +// | ---------------------------------------------------------------------- +// } +// method(a: U, b: T) { +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.method(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in c.method(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in c.method(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: T +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in c +// | ---------------------------------------------------------------------- +// return a; +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U +// | ---------------------------------------------------------------------- +// } +// } +// var cInstance = new c("Hello"); +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | constructor c(a: string): c +// | ---------------------------------------------------------------------- +// var cVal = c; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var cVal: typeof c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// cInstance.method("hello", "cello"); +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c.method<"hello">(a: "hello", b: string): "hello" +// | ---------------------------------------------------------------------- +// class c2> { +// ^^ +// | ---------------------------------------------------------------------- +// | class c2> +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in c2> +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// constructor(a: T) { +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | constructor c2>(a: T): c2 +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: T extends c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in c2> +// | ---------------------------------------------------------------------- +// } +// method>(a: U, b: T) { +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c2>.method>(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in c2>.method>(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | class c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U extends c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in c2>.method>(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: T extends c +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in c2> +// | ---------------------------------------------------------------------- +// return a; +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U extends c +// | ---------------------------------------------------------------------- +// } +// } +// var cInstance1 = new c2(cInstance); +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance1: c2> +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | constructor c2>(a: c): c2> +// | ---------------------------------------------------------------------- +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- +// var cVal2 = c2; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | var cVal2: typeof c2 +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | class c2> +// | ---------------------------------------------------------------------- +// cInstance1.method(cInstance, cInstance); +// ^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance1: c2> +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) c2>.method>(a: c, b: c): c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | var cInstance: c +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +191,7 @@ "position": 6, "name": "1" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -47,7 +233,7 @@ "position": 8, "name": "2" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -113,7 +299,7 @@ "position": 17, "name": "3" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -203,7 +389,7 @@ "position": 29, "name": "4" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -253,7 +439,7 @@ "position": 32, "name": "5" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -319,7 +505,7 @@ "position": 47, "name": "6" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -449,7 +635,7 @@ "position": 54, "name": "7" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -595,7 +781,7 @@ "position": 57, "name": "8" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -645,7 +831,7 @@ "position": 60, "name": "9" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -791,7 +977,7 @@ "position": 63, "name": "10" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -841,7 +1027,7 @@ "position": 66, "name": "11" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -907,7 +1093,7 @@ "position": 86, "name": "12" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -957,7 +1143,7 @@ "position": 101, "name": "13" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1011,7 +1197,7 @@ "position": 117, "name": "14" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -1101,7 +1287,7 @@ "position": 133, "name": "15" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1151,7 +1337,7 @@ "position": 140, "name": "16" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -1193,7 +1379,7 @@ "position": 143, "name": "17" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1247,7 +1433,7 @@ "position": 153, "name": "18" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -1377,7 +1563,7 @@ "position": 185, "name": "19" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -1447,7 +1633,7 @@ "position": 188, "name": "20" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -1541,7 +1727,7 @@ "position": 198, "name": "21" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -1583,7 +1769,7 @@ "position": 215, "name": "22" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -1701,7 +1887,7 @@ "position": 227, "name": "23" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -1779,7 +1965,7 @@ "position": 230, "name": "24" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -1873,7 +2059,7 @@ "position": 245, "name": "25" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -2059,7 +2245,7 @@ "position": 252, "name": "26" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -2261,7 +2447,7 @@ "position": 262, "name": "27" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -2303,7 +2489,7 @@ "position": 273, "name": "28" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -2381,7 +2567,7 @@ "position": 276, "name": "29" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -2583,7 +2769,7 @@ "position": 279, "name": "30" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -2661,7 +2847,7 @@ "position": 282, "name": "31" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -2755,7 +2941,7 @@ "position": 302, "name": "32" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -2833,7 +3019,7 @@ "position": 317, "name": "33" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -2899,7 +3085,7 @@ "position": 334, "name": "34" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -3025,7 +3211,7 @@ "position": 337, "name": "35" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -3079,7 +3265,7 @@ "position": 353, "name": "36" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -3129,7 +3315,7 @@ "position": 361, "name": "37" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -3199,7 +3385,7 @@ "position": 365, "name": "38" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -3265,7 +3451,7 @@ "position": 376, "name": "39" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -3455,7 +3641,7 @@ "position": 383, "name": "40" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -3509,7 +3695,7 @@ "position": 394, "name": "41" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunction.baseline b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunction.baseline index b7f9cb4a03ec6..e44572ec1c202 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunction.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunction.baseline @@ -1,3 +1,61 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInFunction.ts === +// function foo(a: U) { +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(a: U): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in foo(a: U): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in foo(a: U): U +// | ---------------------------------------------------------------------- +// return a; +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U +// | ---------------------------------------------------------------------- +// } +// foo("Hello"); +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo<"Hello">(a: "Hello"): "Hello" +// | ---------------------------------------------------------------------- +// function foo2(a: U) { +// ^^^^ +// | ---------------------------------------------------------------------- +// | function foo2(a: U): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in foo2(a: U): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U extends string +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in foo2(a: U): U +// | ---------------------------------------------------------------------- +// return a; +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U extends string +// | ---------------------------------------------------------------------- +// } +// foo2("hello"); +// ^^^^ +// | ---------------------------------------------------------------------- +// | function foo2<"hello">(a: "hello"): "hello" +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +63,7 @@ "position": 9, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -83,7 +141,7 @@ "position": 13, "name": "2" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -185,7 +243,7 @@ "position": 16, "name": "3" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -235,7 +293,7 @@ "position": 19, "name": "4" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -337,7 +395,7 @@ "position": 35, "name": "5" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -387,7 +445,7 @@ "position": 40, "name": "6" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -465,7 +523,7 @@ "position": 63, "name": "7" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -559,7 +617,7 @@ "position": 68, "name": "8" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -677,7 +735,7 @@ "position": 86, "name": "9" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -743,7 +801,7 @@ "position": 89, "name": "10" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -861,7 +919,7 @@ "position": 105, "name": "11" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -927,7 +985,7 @@ "position": 110, "name": "12" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.baseline b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.baseline index 5cdcbcf476a11..60d77d3a82c40 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.baseline @@ -1,3 +1,19 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.ts === +// type MixinCtor = new () => A & { constructor: MixinCtor }; +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) A in type MixinCtor +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) A in type MixinCtor +// | ---------------------------------------------------------------------- +// type MixinCtor = new () => A & { constructor: { constructor: MixinCtor } }; +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) A in type MixinCtor +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +21,7 @@ "position": 30, "name": "0" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -79,7 +95,7 @@ "position": 59, "name": "1" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -153,7 +169,7 @@ "position": 139, "name": "2" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInInterface.baseline b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInInterface.baseline index 8f9afb4f54c07..0cf35c6a26ef7 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInInterface.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInInterface.baseline @@ -1,3 +1,287 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInInterface.ts === +// interface I { +// ^ +// | ---------------------------------------------------------------------- +// | interface I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in I +// | ---------------------------------------------------------------------- +// new (a: U, b: T): U; +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in new (a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in new (a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: T +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in new (a: U, b: T): U +// | ---------------------------------------------------------------------- +// (a: U, b: T): U; +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in (a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in (a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: T +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in (a: U, b: T): U +// | ---------------------------------------------------------------------- +// method(a: U, b: T): U; +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) I.method(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in I.method(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in I.method(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: T +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in I.method(a: U, b: T): U +// | ---------------------------------------------------------------------- +// } +// var iVal: I; +// ^^^^ +// | ---------------------------------------------------------------------- +// | var iVal: I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | interface I +// | ---------------------------------------------------------------------- +// new iVal("hello", "hello"); +// ^^^^ +// | ---------------------------------------------------------------------- +// | var iVal: I +// | new <"hello">(a: "hello", b: string) => "hello" +// | ---------------------------------------------------------------------- +// iVal("hello", "hello"); +// ^^^^ +// | ---------------------------------------------------------------------- +// | var iVal: I +// | <"hello">(a: "hello", b: string) => "hello" +// | ---------------------------------------------------------------------- +// iVal.method("hello", "hello"); +// ^^^^ +// | ---------------------------------------------------------------------- +// | var iVal: I +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) I.method<"hello">(a: "hello", b: string): "hello" +// | ---------------------------------------------------------------------- +// interface I1> { +// ^^ +// | ---------------------------------------------------------------------- +// | interface I1> +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in I1> +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | interface I +// | ---------------------------------------------------------------------- +// new >(a: U, b: T): U; +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in new >(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | interface I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U extends I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in new >(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: T extends I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in I1> +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in new >(a: U, b: T): U +// | ---------------------------------------------------------------------- +// >(a: U, b: T): U; +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in >(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | interface I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U extends I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in >(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: T extends I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in I1> +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in >(a: U, b: T): U +// | ---------------------------------------------------------------------- +// method>(a: U, b: T): U; +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) I1>.method>(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in I1>.method>(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | interface I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: U extends I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in I1>.method>(a: U, b: T): U +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: T extends I +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in I1> +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) U in I1>.method>(a: U, b: T): U +// | ---------------------------------------------------------------------- +// } +// var iVal1: I1>; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | var iVal1: I1> +// | ---------------------------------------------------------------------- +// ^^ +// | ---------------------------------------------------------------------- +// | interface I1> +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | interface I +// | ---------------------------------------------------------------------- +// new iVal1(iVal, iVal); +// ^^^^^ +// | ---------------------------------------------------------------------- +// | var iVal1: I1 +// | new >(a: I, b: I) => I +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | var iVal: I +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | var iVal: I +// | ---------------------------------------------------------------------- +// iVal1(iVal, iVal); +// ^^^^^ +// | ---------------------------------------------------------------------- +// | var iVal1: I1 +// | >(a: I, b: I) => I +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | var iVal: I +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | var iVal: I +// | ---------------------------------------------------------------------- +// iVal1.method(iVal, iVal); +// ^^^^^ +// | ---------------------------------------------------------------------- +// | var iVal1: I1> +// | ---------------------------------------------------------------------- +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) I1>.method>(a: I, b: I): I +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | var iVal: I +// | ---------------------------------------------------------------------- +// ^^^^ +// | ---------------------------------------------------------------------- +// | var iVal: I +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +289,7 @@ "position": 10, "name": "1" }, - "quickInfo": { + "item": { "kind": "interface", "kindModifiers": "", "textSpan": { @@ -47,7 +331,7 @@ "position": 12, "name": "2" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -113,7 +397,7 @@ "position": 26, "name": "3" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -243,7 +527,7 @@ "position": 29, "name": "4" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -293,7 +577,7 @@ "position": 32, "name": "5" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -423,7 +707,7 @@ "position": 35, "name": "6" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -473,7 +757,7 @@ "position": 38, "name": "7" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -539,7 +823,7 @@ "position": 42, "name": "8" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -669,7 +953,7 @@ "position": 50, "name": "9" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -791,7 +1075,7 @@ "position": 53, "name": "10" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -841,7 +1125,7 @@ "position": 56, "name": "11" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -963,7 +1247,7 @@ "position": 59, "name": "12" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -1013,7 +1297,7 @@ "position": 62, "name": "13" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -1079,7 +1363,7 @@ "position": 66, "name": "14" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -1201,7 +1485,7 @@ "position": 73, "name": "15" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -1331,7 +1615,7 @@ "position": 80, "name": "16" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -1477,7 +1761,7 @@ "position": 83, "name": "17" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -1527,7 +1811,7 @@ "position": 86, "name": "18" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -1673,7 +1957,7 @@ "position": 89, "name": "19" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -1723,7 +2007,7 @@ "position": 92, "name": "20" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -1789,7 +2073,7 @@ "position": 96, "name": "21" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -1935,7 +2219,7 @@ "position": 105, "name": "22" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1989,7 +2273,7 @@ "position": 111, "name": "23" }, - "quickInfo": { + "item": { "kind": "interface", "kindModifiers": "", "textSpan": { @@ -2031,7 +2315,7 @@ "position": 126, "name": "24" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -2161,7 +2445,7 @@ "position": 150, "name": "25" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -2283,7 +2567,7 @@ "position": 174, "name": "26" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -2337,7 +2621,7 @@ "position": 179, "name": "27" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -2467,7 +2751,7 @@ "position": 215, "name": "28" }, - "quickInfo": { + "item": { "kind": "interface", "kindModifiers": "", "textSpan": { @@ -2537,7 +2821,7 @@ "position": 218, "name": "29" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -2631,7 +2915,7 @@ "position": 228, "name": "30" }, - "quickInfo": { + "item": { "kind": "interface", "kindModifiers": "", "textSpan": { @@ -2673,7 +2957,7 @@ "position": 250, "name": "31" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -2831,7 +3115,7 @@ "position": 260, "name": "32" }, - "quickInfo": { + "item": { "kind": "interface", "kindModifiers": "", "textSpan": { @@ -2873,7 +3157,7 @@ "position": 271, "name": "33" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -2951,7 +3235,7 @@ "position": 274, "name": "34" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -3109,7 +3393,7 @@ "position": 277, "name": "35" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -3187,7 +3471,7 @@ "position": 280, "name": "36" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -3281,7 +3565,7 @@ "position": 284, "name": "37" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -3439,7 +3723,7 @@ "position": 292, "name": "38" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -3589,7 +3873,7 @@ "position": 302, "name": "39" }, - "quickInfo": { + "item": { "kind": "interface", "kindModifiers": "", "textSpan": { @@ -3631,7 +3915,7 @@ "position": 313, "name": "40" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -3709,7 +3993,7 @@ "position": 316, "name": "41" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -3859,7 +4143,7 @@ "position": 319, "name": "42" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -3937,7 +4221,7 @@ "position": 322, "name": "43" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -4031,7 +4315,7 @@ "position": 326, "name": "44" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -4181,7 +4465,7 @@ "position": 333, "name": "45" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -4367,7 +4651,7 @@ "position": 340, "name": "46" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -4569,7 +4853,7 @@ "position": 350, "name": "47" }, - "quickInfo": { + "item": { "kind": "interface", "kindModifiers": "", "textSpan": { @@ -4611,7 +4895,7 @@ "position": 361, "name": "48" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -4689,7 +4973,7 @@ "position": 364, "name": "49" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -4891,7 +5175,7 @@ "position": 367, "name": "50" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -4969,7 +5253,7 @@ "position": 370, "name": "51" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -5063,7 +5347,7 @@ "position": 374, "name": "52" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -5265,7 +5549,7 @@ "position": 383, "name": "53" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -5331,7 +5615,7 @@ "position": 390, "name": "54" }, - "quickInfo": { + "item": { "kind": "interface", "kindModifiers": "", "textSpan": { @@ -5401,7 +5685,7 @@ "position": 393, "name": "55" }, - "quickInfo": { + "item": { "kind": "interface", "kindModifiers": "", "textSpan": { @@ -5443,7 +5727,7 @@ "position": 409, "name": "56" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -5621,7 +5905,7 @@ "position": 415, "name": "57" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -5675,7 +5959,7 @@ "position": 421, "name": "58" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -5729,7 +6013,7 @@ "position": 428, "name": "59" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -5899,7 +6183,7 @@ "position": 434, "name": "60" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -5953,7 +6237,7 @@ "position": 440, "name": "61" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -6007,7 +6291,7 @@ "position": 447, "name": "62" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -6073,7 +6357,7 @@ "position": 453, "name": "63" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -6263,7 +6547,7 @@ "position": 460, "name": "64" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -6317,7 +6601,7 @@ "position": 466, "name": "65" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInTypeAlias.baseline b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInTypeAlias.baseline index 753c74b26019b..738066034a55b 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInTypeAlias.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInTypeAlias.baseline @@ -1,3 +1,31 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInTypeAlias.ts === +// type List = T[] +// ^^^^ +// | ---------------------------------------------------------------------- +// | type List = T[] +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in type List +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in type List +// | ---------------------------------------------------------------------- +// type List2 = T[]; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | type List2 = T[] +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in type List2 +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | (type parameter) T in type List2 +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +33,7 @@ "position": 5, "name": "0" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { @@ -71,7 +99,7 @@ "position": 10, "name": "1" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -145,7 +173,7 @@ "position": 15, "name": "2" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -219,7 +247,7 @@ "position": 24, "name": "3" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { @@ -301,7 +329,7 @@ "position": 30, "name": "4" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { @@ -391,7 +419,7 @@ "position": 50, "name": "5" }, - "quickInfo": { + "item": { "kind": "type parameter", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsVar.baseline b/tests/baselines/reference/quickInfoDisplayPartsVar.baseline index 381a8f00a0bc1..2bf532491b3a3 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsVar.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsVar.baseline @@ -1,3 +1,85 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsVar.ts === +// var a = 10; +// ^ +// | ---------------------------------------------------------------------- +// | var a: number +// | ---------------------------------------------------------------------- +// function foo() { +// var b = a; +// ^ +// | ---------------------------------------------------------------------- +// | (local var) b: number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | var a: number +// | ---------------------------------------------------------------------- +// } +// module m { +// var c = 10; +// ^ +// | ---------------------------------------------------------------------- +// | var c: number +// | ---------------------------------------------------------------------- +// export var d = 10; +// ^ +// | ---------------------------------------------------------------------- +// | var m.d: number +// | ---------------------------------------------------------------------- +// } +// var f: () => number; +// ^ +// | ---------------------------------------------------------------------- +// | var f: () => number +// | ---------------------------------------------------------------------- +// var g = f; +// ^ +// | ---------------------------------------------------------------------- +// | var g: () => number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | var f: () => number +// | ---------------------------------------------------------------------- +// f(); +// ^ +// | ---------------------------------------------------------------------- +// | var f: () => number +// | ---------------------------------------------------------------------- +// var h: { (a: string): number; (a: number): string; }; +// ^ +// | ---------------------------------------------------------------------- +// | var h: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// var i = h; +// ^ +// | ---------------------------------------------------------------------- +// | var i: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | var h: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// h(10); +// ^ +// | ---------------------------------------------------------------------- +// | var h: (a: number) => string (+1 overload) +// | ---------------------------------------------------------------------- +// h("hello"); +// ^ +// | ---------------------------------------------------------------------- +// | var h: (a: string) => number (+1 overload) +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +87,7 @@ "position": 4, "name": "1" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -47,7 +129,7 @@ "position": 37, "name": "2" }, - "quickInfo": { + "item": { "kind": "local var", "kindModifiers": "", "textSpan": { @@ -97,7 +179,7 @@ "position": 41, "name": "3" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -139,7 +221,7 @@ "position": 65, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -181,7 +263,7 @@ "position": 88, "name": "5" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "export", "textSpan": { @@ -231,7 +313,7 @@ "position": 102, "name": "6" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -293,7 +375,7 @@ "position": 123, "name": "7" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -355,7 +437,7 @@ "position": 127, "name": "8" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -417,7 +499,7 @@ "position": 130, "name": "9" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -479,7 +561,7 @@ "position": 139, "name": "10" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -625,7 +707,7 @@ "position": 193, "name": "11" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -771,7 +853,7 @@ "position": 197, "name": "12" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -917,7 +999,7 @@ "position": 200, "name": "13" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1023,7 +1105,7 @@ "position": 207, "name": "14" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsVar.shims-pp.baseline b/tests/baselines/reference/quickInfoDisplayPartsVar.shims-pp.baseline index 3e82efaf6b129..b2b3b2d73cfd2 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsVar.shims-pp.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsVar.shims-pp.baseline @@ -1,3 +1,85 @@ +=== /tests/cases/fourslash/shims-pp/quickInfoDisplayPartsVarShims.ts === +// var a = 10; +// ^ +// | ---------------------------------------------------------------------- +// | var a: number +// | ---------------------------------------------------------------------- +// function foo() { +// var b = a; +// ^ +// | ---------------------------------------------------------------------- +// | (local var) b: number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | var a: number +// | ---------------------------------------------------------------------- +// } +// module m { +// var c = 10; +// ^ +// | ---------------------------------------------------------------------- +// | var c: number +// | ---------------------------------------------------------------------- +// export var d = 10; +// ^ +// | ---------------------------------------------------------------------- +// | var m.d: number +// | ---------------------------------------------------------------------- +// } +// var f: () => number; +// ^ +// | ---------------------------------------------------------------------- +// | var f: () => number +// | ---------------------------------------------------------------------- +// var g = f; +// ^ +// | ---------------------------------------------------------------------- +// | var g: () => number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | var f: () => number +// | ---------------------------------------------------------------------- +// f(); +// ^ +// | ---------------------------------------------------------------------- +// | var f: () => number +// | ---------------------------------------------------------------------- +// var h: { (a: string): number; (a: number): string; }; +// ^ +// | ---------------------------------------------------------------------- +// | var h: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// var i = h; +// ^ +// | ---------------------------------------------------------------------- +// | var i: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | var h: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// h(10); +// ^ +// | ---------------------------------------------------------------------- +// | var h: (a: number) => string (+1 overload) +// | ---------------------------------------------------------------------- +// h("hello"); +// ^ +// | ---------------------------------------------------------------------- +// | var h: (a: string) => number (+1 overload) +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +87,7 @@ "position": 4, "name": "1" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -47,7 +129,7 @@ "position": 37, "name": "2" }, - "quickInfo": { + "item": { "kind": "local var", "kindModifiers": "", "textSpan": { @@ -97,7 +179,7 @@ "position": 41, "name": "3" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -139,7 +221,7 @@ "position": 65, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -181,7 +263,7 @@ "position": 88, "name": "5" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "export", "textSpan": { @@ -231,7 +313,7 @@ "position": 102, "name": "6" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -293,7 +375,7 @@ "position": 123, "name": "7" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -355,7 +437,7 @@ "position": 127, "name": "8" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -417,7 +499,7 @@ "position": 130, "name": "9" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -479,7 +561,7 @@ "position": 139, "name": "10" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -625,7 +707,7 @@ "position": 193, "name": "11" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -771,7 +853,7 @@ "position": 197, "name": "12" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -917,7 +999,7 @@ "position": 200, "name": "13" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1023,7 +1105,7 @@ "position": 207, "name": "14" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsVar.shims.baseline b/tests/baselines/reference/quickInfoDisplayPartsVar.shims.baseline index 33f0876594e4b..de5dcc200f778 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsVar.shims.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsVar.shims.baseline @@ -1,3 +1,85 @@ +=== /tests/cases/fourslash/shims/quickInfoDisplayPartsVarShims.ts === +// var a = 10; +// ^ +// | ---------------------------------------------------------------------- +// | var a: number +// | ---------------------------------------------------------------------- +// function foo() { +// var b = a; +// ^ +// | ---------------------------------------------------------------------- +// | (local var) b: number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | var a: number +// | ---------------------------------------------------------------------- +// } +// module m { +// var c = 10; +// ^ +// | ---------------------------------------------------------------------- +// | var c: number +// | ---------------------------------------------------------------------- +// export var d = 10; +// ^ +// | ---------------------------------------------------------------------- +// | var m.d: number +// | ---------------------------------------------------------------------- +// } +// var f: () => number; +// ^ +// | ---------------------------------------------------------------------- +// | var f: () => number +// | ---------------------------------------------------------------------- +// var g = f; +// ^ +// | ---------------------------------------------------------------------- +// | var g: () => number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | var f: () => number +// | ---------------------------------------------------------------------- +// f(); +// ^ +// | ---------------------------------------------------------------------- +// | var f: () => number +// | ---------------------------------------------------------------------- +// var h: { (a: string): number; (a: number): string; }; +// ^ +// | ---------------------------------------------------------------------- +// | var h: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// var i = h; +// ^ +// | ---------------------------------------------------------------------- +// | var i: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | var h: { +// | (a: string): number; +// | (a: number): string; +// | } +// | ---------------------------------------------------------------------- +// h(10); +// ^ +// | ---------------------------------------------------------------------- +// | var h: (a: number) => string (+1 overload) +// | ---------------------------------------------------------------------- +// h("hello"); +// ^ +// | ---------------------------------------------------------------------- +// | var h: (a: string) => number (+1 overload) +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +87,7 @@ "position": 4, "name": "1" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -47,7 +129,7 @@ "position": 37, "name": "2" }, - "quickInfo": { + "item": { "kind": "local var", "kindModifiers": "", "textSpan": { @@ -97,7 +179,7 @@ "position": 41, "name": "3" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -139,7 +221,7 @@ "position": 65, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -181,7 +263,7 @@ "position": 88, "name": "5" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "export", "textSpan": { @@ -231,7 +313,7 @@ "position": 102, "name": "6" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -293,7 +375,7 @@ "position": 123, "name": "7" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -355,7 +437,7 @@ "position": 127, "name": "8" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -417,7 +499,7 @@ "position": 130, "name": "9" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -479,7 +561,7 @@ "position": 139, "name": "10" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -625,7 +707,7 @@ "position": 193, "name": "11" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -771,7 +853,7 @@ "position": 197, "name": "12" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -917,7 +999,7 @@ "position": 200, "name": "13" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -1023,7 +1105,7 @@ "position": 207, "name": "14" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoDisplayPartsVarWithStringTypes01.baseline b/tests/baselines/reference/quickInfoDisplayPartsVarWithStringTypes01.baseline index 189e7b647e9a6..693e40e458369 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsVarWithStringTypes01.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsVarWithStringTypes01.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/quickInfoDisplayPartsVarWithStringTypes01.ts === +// let hello: "hello" | 'hello' = "hello"; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | let hello: "hello" +// | ---------------------------------------------------------------------- +// let world: 'world' = "world"; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | let world: "world" +// | ---------------------------------------------------------------------- +// let helloOrWorld: "hello" | 'world'; +// ^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | let helloOrWorld: "hello" | "world" +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +22,7 @@ "position": 4, "name": "1" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -47,7 +64,7 @@ "position": 44, "name": "2" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { @@ -89,7 +106,7 @@ "position": 74, "name": "3" }, - "quickInfo": { + "item": { "kind": "let", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode1.baseline b/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode1.baseline index fb6a5bc9a997d..b3ec939c77d59 100644 --- a/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode1.baseline +++ b/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode1.baseline @@ -1,3 +1,22 @@ +=== /tests/cases/fourslash/a.js === +// const foo = { +// f1: (params) => { } +// } +// +// function f2(x) { +// ^^ +// | ---------------------------------------------------------------------- +// | function f2(x: any): void +// | ---------------------------------------------------------------------- +// foo.f1({ x, arguments: [] }); +// } +// +// f2(''); +// ^^ +// | ---------------------------------------------------------------------- +// | function f2(x: any): void +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +24,7 @@ "position": 50, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -71,7 +90,7 @@ "position": 94, "name": "2" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode2.baseline b/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode2.baseline index a6c457b8ae787..afe499b5614d6 100644 --- a/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode2.baseline +++ b/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode2.baseline @@ -1,3 +1,18 @@ +=== /tests/cases/fourslash/a.js === +// function f(x) { +// ^ +// | ---------------------------------------------------------------------- +// | function f(x: any, ...args: any[]): void +// | ---------------------------------------------------------------------- +// arguments; +// } +// +// f(''); +// ^ +// | ---------------------------------------------------------------------- +// | function f(x: any, ...args: any[]): void +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +20,7 @@ "position": 9, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -107,7 +122,7 @@ "position": 33, "name": "2" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoForConstAssertions.baseline b/tests/baselines/reference/quickInfoForConstAssertions.baseline index 9fccd0dbe448b..09098d7b7a994 100644 --- a/tests/baselines/reference/quickInfoForConstAssertions.baseline +++ b/tests/baselines/reference/quickInfoForConstAssertions.baseline @@ -1,3 +1,27 @@ +=== /tests/cases/fourslash/quickInfoForConstAssertions.ts === +// const a = { a: 1 } as const; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | type const = { +// | readonly a: 1; +// | } +// | ---------------------------------------------------------------------- +// const b = 1 as const; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | type const = 1 +// | ---------------------------------------------------------------------- +// const c = "c" as const; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | type const = "c" +// | ---------------------------------------------------------------------- +// const d = [1, 2] as const; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | type const = readonly [1, 2] +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +29,7 @@ "position": 22, "name": "1" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { @@ -95,7 +119,7 @@ "position": 44, "name": "2" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { @@ -141,7 +165,7 @@ "position": 68, "name": "3" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { @@ -187,7 +211,7 @@ "position": 95, "name": "4" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoForJSDocCodefence.baseline b/tests/baselines/reference/quickInfoForJSDocCodefence.baseline index 4b33d8699f928..653feb17c1735 100644 --- a/tests/baselines/reference/quickInfoForJSDocCodefence.baseline +++ b/tests/baselines/reference/quickInfoForJSDocCodefence.baseline @@ -1,3 +1,37 @@ +=== /tests/cases/fourslash/quickInfoForJSDocCodefence.ts === +// /** +// * @example +// * ``` +// * 1 + 2 +// * ``` +// */ +// function foo() { +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(): string +// | @example ``` +// | 1 + 2 +// | ``` +// | ---------------------------------------------------------------------- +// return '2'; +// } +// /** +// * @example +// * `` +// * 1 + 2 +// * ` +// */ +// function boo() { +// ^^^ +// | ---------------------------------------------------------------------- +// | function boo(): string +// | @example `` +// | 1 + 2 +// | ` +// | ---------------------------------------------------------------------- +// return '2'; +// } + [ { "marker": { @@ -5,7 +39,7 @@ "position": 54, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -66,7 +100,7 @@ "position": 129, "name": "2" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoForJSDocUnknownTag.baseline b/tests/baselines/reference/quickInfoForJSDocUnknownTag.baseline index a74510299d1a1..4280f6bc8e916 100644 --- a/tests/baselines/reference/quickInfoForJSDocUnknownTag.baseline +++ b/tests/baselines/reference/quickInfoForJSDocUnknownTag.baseline @@ -1,3 +1,88 @@ +=== /tests/cases/fourslash/quickInfoForJSDocUnknownTag.ts === +// /** +// * @example +// * if (true) { +// * foo() +// * } +// */ +// function foo() { +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(): string +// | @example if (true) { +// | foo() +// | } +// | ---------------------------------------------------------------------- +// return '2'; +// } +// /** +// @example +// { +// foo() +// } +// */ +// function foo2() { +// ^^^^ +// | ---------------------------------------------------------------------- +// | function foo2(): string +// | @example { +// | foo() +// | } +// | ---------------------------------------------------------------------- +// return '2'; +// } +// /** +// * @example +// * x y +// * 12345 +// * b +// */ +// function moo() { +// ^^^ +// | ---------------------------------------------------------------------- +// | function moo(): string +// | @example x y +// | 12345 +// | b +// | ---------------------------------------------------------------------- +// return '2'; +// } +// /** +// * @func +// * @example +// * x y +// * 12345 +// * b +// */ +// function boo() { +// ^^^ +// | ---------------------------------------------------------------------- +// | function boo(): string +// | @func +// | @example x y +// | 12345 +// | b +// | ---------------------------------------------------------------------- +// return '2'; +// } +// /** +// * @func +// * @example x y +// * 12345 +// * b +// */ +// function goo() { +// ^^^ +// | ---------------------------------------------------------------------- +// | function goo(): string +// | @func +// | @example x y +// | 12345 +// | b +// | ---------------------------------------------------------------------- +// return '2'; +// } + [ { "marker": { @@ -5,7 +90,7 @@ "position": 64, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -66,7 +151,7 @@ "position": 134, "name": "2" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -127,7 +212,7 @@ "position": 219, "name": "3" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -188,7 +273,7 @@ "position": 313, "name": "4" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -252,7 +337,7 @@ "position": 426, "name": "5" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoForJSDocWithHttpLinks.baseline b/tests/baselines/reference/quickInfoForJSDocWithHttpLinks.baseline index eb45f0ed34645..28f7d6984beb9 100644 --- a/tests/baselines/reference/quickInfoForJSDocWithHttpLinks.baseline +++ b/tests/baselines/reference/quickInfoForJSDocWithHttpLinks.baseline @@ -1,3 +1,53 @@ +=== /tests/cases/fourslash/quickInfoForJSDocWithHttpLinks.js === +// /** @typedef {number} https://wat */ +// ^^^^^ +// | ---------------------------------------------------------------------- +// | type https = number +// | ://wat +// | ---------------------------------------------------------------------- +// +// /** +// * @typedef {Object} Oops +// * @property {number} https://wass +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (property) https: number +// | ://wass +// | ---------------------------------------------------------------------- +// */ +// +// +// /** @callback http://vad */ +// ^^^^ +// | ---------------------------------------------------------------------- +// | type http = () => any +// | ://vad +// | ---------------------------------------------------------------------- +// +// /** @see https://hvad */ +// var see1 = true +// ^^^^ +// | ---------------------------------------------------------------------- +// | var see1: boolean +// | @see https://hvad +// | ---------------------------------------------------------------------- +// +// /** @see {@link https://hva} */ +// var see2 = true +// ^^^^ +// | ---------------------------------------------------------------------- +// | var see2: boolean +// | @see {@link https://hva} +// | ---------------------------------------------------------------------- +// +// /** {@link https://hvaD} */ +// var see3 = true +// ^^^^ +// | ---------------------------------------------------------------------- +// | var see3: boolean +// | {@link https://hvaD} +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +55,7 @@ "position": 22, "name": "1" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { @@ -56,7 +106,7 @@ "position": 88, "name": "2" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -111,7 +161,7 @@ "position": 120, "name": "3" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { @@ -182,7 +232,7 @@ "position": 164, "name": "4" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -239,7 +289,7 @@ "position": 213, "name": "5" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -311,7 +361,7 @@ "position": 258, "name": "6" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoForJSDocWithUnresolvedHttpLinks.baseline b/tests/baselines/reference/quickInfoForJSDocWithUnresolvedHttpLinks.baseline index 7700b2b908f78..b74400052bfe6 100644 --- a/tests/baselines/reference/quickInfoForJSDocWithUnresolvedHttpLinks.baseline +++ b/tests/baselines/reference/quickInfoForJSDocWithUnresolvedHttpLinks.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/quickInfoForJSDocWithHttpLinks.js === +// /** @see {@link https://hva} */ +// var see2 = true +// ^^^^ +// | ---------------------------------------------------------------------- +// | var see2: boolean +// | @see {@link https://hva} +// | ---------------------------------------------------------------------- +// +// /** {@link https://hvaD} */ +// var see3 = true +// ^^^^ +// | ---------------------------------------------------------------------- +// | var see3: boolean +// | {@link https://hvaD} +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +22,7 @@ "position": 36, "name": "5" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { @@ -70,7 +87,7 @@ "position": 81, "name": "6" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoForObjectBindingElementName03.baseline b/tests/baselines/reference/quickInfoForObjectBindingElementName03.baseline index 4e311ef906f73..57bb3fba30a1d 100644 --- a/tests/baselines/reference/quickInfoForObjectBindingElementName03.baseline +++ b/tests/baselines/reference/quickInfoForObjectBindingElementName03.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/quickInfoForObjectBindingElementName03.ts === +// interface Options { +// /** +// * A description of foo +// */ +// foo: string; +// } +// +// function f({ foo }: Options) { +// foo; +// ^^^ +// | ---------------------------------------------------------------------- +// | (parameter) foo: string +// | A description of foo +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +22,7 @@ "position": 122, "name": "1" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoForObjectBindingElementName04.baseline b/tests/baselines/reference/quickInfoForObjectBindingElementName04.baseline index 0370d38cdb46b..50b0ac4a41c94 100644 --- a/tests/baselines/reference/quickInfoForObjectBindingElementName04.baseline +++ b/tests/baselines/reference/quickInfoForObjectBindingElementName04.baseline @@ -1,3 +1,33 @@ +=== /tests/cases/fourslash/quickInfoForObjectBindingElementName04.ts === +// interface Options { +// /** +// * A description of 'a' +// */ +// a: { +// /** +// * A description of 'b' +// */ +// b: string; +// } +// } +// +// function f({ a, a: { b } }: Options) { +// a; +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: { +// | b: string; +// | } +// | A description of 'a' +// | ---------------------------------------------------------------------- +// b; +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) b: string +// | A description of 'b' +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +35,7 @@ "position": 193, "name": "1" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -96,7 +126,7 @@ "position": 200, "name": "2" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoForObjectBindingElementName05.baseline b/tests/baselines/reference/quickInfoForObjectBindingElementName05.baseline index 9790245d186ee..1bf9532809e12 100644 --- a/tests/baselines/reference/quickInfoForObjectBindingElementName05.baseline +++ b/tests/baselines/reference/quickInfoForObjectBindingElementName05.baseline @@ -1,3 +1,23 @@ +=== /tests/cases/fourslash/quickInfoForObjectBindingElementName05.ts === +// interface A { +// /** +// * A description of a +// */ +// a: number; +// } +// interface B { +// a: string; +// } +// +// function f({ a }: A | B) { +// a; +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: string | number +// | A description of a +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +25,7 @@ "position": 137, "name": "" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoImportMeta.baseline b/tests/baselines/reference/quickInfoImportMeta.baseline index e576927262fb2..768c0f8549abf 100644 --- a/tests/baselines/reference/quickInfoImportMeta.baseline +++ b/tests/baselines/reference/quickInfoImportMeta.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/foo.ts === +// /// +// /// +// import.meta; +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | +// | ---------------------------------------------------------------------- +// ^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | +// | The type of `import.meta`. +// | +// | If you need to declare that a given property exists on `import.meta`, +// | this type may be augmented via interface merging. +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +22,7 @@ "position": 77, "name": "1" }, - "quickInfo": { + "item": { "kind": "", "kindModifiers": "", "textSpan": { @@ -22,7 +39,7 @@ "position": 84, "name": "2" }, - "quickInfo": { + "item": { "kind": "interface", "kindModifiers": "declare", "textSpan": { diff --git a/tests/baselines/reference/quickInfoInheritDoc.baseline b/tests/baselines/reference/quickInfoInheritDoc.baseline index 29cc8e3544d6e..c148237ac95b5 100644 --- a/tests/baselines/reference/quickInfoInheritDoc.baseline +++ b/tests/baselines/reference/quickInfoInheritDoc.baseline @@ -1,3 +1,90 @@ +=== /tests/cases/fourslash/quickInfoInheritDoc.ts === +// abstract class BaseClass { +// /** +// * Useful description always applicable +// * +// * @returns {string} Useful description of return value always applicable. +// */ +// public static doSomethingUseful(stuff?: any): string { +// throw new Error('Must be implemented by subclass'); +// } +// +// /** +// * BaseClass.func1 +// * @param {any} stuff1 BaseClass.func1.stuff1 +// * @returns {void} BaseClass.func1.returns +// */ +// public static func1(stuff1: any): void { +// } +// +// /** +// * Applicable description always. +// */ +// public static readonly someProperty: string = 'general value'; +// } +// +// +// +// +// class SubClass extends BaseClass { +// +// /** +// * @inheritDoc +// * +// * @param {{ tiger: string; lion: string; }} [mySpecificStuff] Description of my specific parameter. +// */ +// public static doSomethingUseful(mySpecificStuff?: { tiger: string; lion: string; }): string { +// ^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) SubClass.doSomethingUseful(mySpecificStuff?: { +// | tiger: string; +// | lion: string; +// | }): string +// | Useful description always applicable +// | @returns Useful description of return value always applicable. +// | @inheritDoc +// | @param mySpecificStuff Description of my specific parameter. +// | ---------------------------------------------------------------------- +// let useful = ''; +// +// // do something useful to useful +// +// return useful; +// } +// +// /** +// * @inheritDoc +// * @param {any} stuff1 SubClass.func1.stuff1 +// * @returns {void} SubClass.func1.returns +// */ +// public static func1(stuff1: any): void { +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) SubClass.func1(stuff1: any): void +// | BaseClass.func1 +// | @param stuff1 BaseClass.func1.stuff1 +// | @returns BaseClass.func1.returns +// | @inheritDoc +// | @param stuff1 SubClass.func1.stuff1 +// | @returns SubClass.func1.returns +// | ---------------------------------------------------------------------- +// } +// +// /** +// * text over tag +// * @inheritDoc +// * text after tag +// */ +// public static readonly someProperty: string = 'specific to this class value' +// ^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) SubClass.someProperty: string +// | Applicable description always. +// | text over tagtext after tag +// | @inheritDoc text after tag +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +92,7 @@ "position": 817, "name": "1" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public,static", "textSpan": { @@ -191,7 +278,7 @@ "position": 1143, "name": "2" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "public,static", "textSpan": { @@ -335,7 +422,7 @@ "position": 1282, "name": "3" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public,static", "textSpan": { diff --git a/tests/baselines/reference/quickInfoInheritDoc2.baseline b/tests/baselines/reference/quickInfoInheritDoc2.baseline index 40dc3368efd21..5c985207c61e9 100644 --- a/tests/baselines/reference/quickInfoInheritDoc2.baseline +++ b/tests/baselines/reference/quickInfoInheritDoc2.baseline @@ -1,3 +1,26 @@ +=== /tests/cases/fourslash/quickInfoInheritDoc2.ts === +// class Base { +// /** +// * Base.prop +// */ +// prop: T | undefined; +// } +// +// class SubClass extends Base { +// /** +// * @inheritdoc +// * SubClass.prop +// */ +// prop: T | undefined; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) SubClass.prop: T +// | Base.prop +// | SubClass.prop +// | @inheritdoc SubClass.prop +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +28,7 @@ "position": 173, "name": "1" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoInheritDoc3.baseline b/tests/baselines/reference/quickInfoInheritDoc3.baseline index 5729c6c1ccfde..ea789302487fe 100644 --- a/tests/baselines/reference/quickInfoInheritDoc3.baseline +++ b/tests/baselines/reference/quickInfoInheritDoc3.baseline @@ -1,3 +1,27 @@ +=== /tests/cases/fourslash/quickInfoInheritDoc3.ts === +// function getBaseClass() { +// return class Base { +// /** +// * Base.prop +// */ +// prop: string | undefined; +// } +// } +// class SubClass extends getBaseClass() { +// /** +// * @inheritdoc +// * SubClass.prop +// */ +// prop: string | undefined; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) SubClass.prop: string +// | Base.prop +// | SubClass.prop +// | @inheritdoc SubClass.prop +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +29,7 @@ "position": 237, "name": "1" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoInheritDoc4.baseline b/tests/baselines/reference/quickInfoInheritDoc4.baseline index 76e64f647d066..46f0da2953d94 100644 --- a/tests/baselines/reference/quickInfoInheritDoc4.baseline +++ b/tests/baselines/reference/quickInfoInheritDoc4.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/quickInfoInheritDoc4.ts === +// var A: any; +// +// class B extends A { +// /** +// * @inheritdoc +// */ +// static value() { +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) B.value(): any +// | @inheritdoc +// | ---------------------------------------------------------------------- +// return undefined; +// } +// } + [ { "marker": { @@ -5,7 +22,7 @@ "position": 79, "name": "" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { diff --git a/tests/baselines/reference/quickInfoInheritDoc5.baseline b/tests/baselines/reference/quickInfoInheritDoc5.baseline index 09bc74d1e86a3..d676359cdbce0 100644 --- a/tests/baselines/reference/quickInfoInheritDoc5.baseline +++ b/tests/baselines/reference/quickInfoInheritDoc5.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/quickInfoInheritDoc5.js === +// function A() {} +// +// class B extends A { +// /** +// * @inheritdoc +// */ +// static value() { +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) B.value(): any +// | @inheritdoc +// | ---------------------------------------------------------------------- +// return undefined; +// } +// } + [ { "marker": { @@ -5,7 +22,7 @@ "position": 83, "name": "" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { diff --git a/tests/baselines/reference/quickInfoInheritDoc6.baseline b/tests/baselines/reference/quickInfoInheritDoc6.baseline index c23fd104f01ff..2208131b40a34 100644 --- a/tests/baselines/reference/quickInfoInheritDoc6.baseline +++ b/tests/baselines/reference/quickInfoInheritDoc6.baseline @@ -1,3 +1,18 @@ +=== /tests/cases/fourslash/quickInfoInheritDoc6.js === +// class B extends UNRESOLVED_VALUE_DEFINITELY_DOES_NOT_EXIST { +// /** +// * @inheritdoc +// */ +// static value() { +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (method) B.value(): any +// | @inheritdoc +// | ---------------------------------------------------------------------- +// return undefined; +// } +// } + [ { "marker": { @@ -5,7 +20,7 @@ "position": 107, "name": "" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { diff --git a/tests/baselines/reference/quickInfoInheritedLinkTag.baseline b/tests/baselines/reference/quickInfoInheritedLinkTag.baseline index 52047ab887078..754a66b6821c9 100644 --- a/tests/baselines/reference/quickInfoInheritedLinkTag.baseline +++ b/tests/baselines/reference/quickInfoInheritedLinkTag.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/quickInfoInheritedLinkTag.ts === +// export class C { +// /** +// * @deprecated Use {@link PerspectiveCamera#setFocalLength .setFocalLength()} and {@link PerspectiveCamera#filmGauge .filmGauge} instead. +// */ +// m() { } +// } +// export class D extends C { +// m() { } // crashes here +// } +// new C().m // and here (with a different thing trying to access undefined) +// ^ +// | ---------------------------------------------------------------------- +// | (method) C.m(): void +// | @deprecated Use {@link PerspectiveCamera#setFocalLength .setFocalLength()} and {@link PerspectiveCamera#filmGauge .filmGauge} instead. +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +22,7 @@ "position": 258, "name": "" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "deprecated", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJSDocAtBeforeSpace.baseline b/tests/baselines/reference/quickInfoJSDocAtBeforeSpace.baseline index aece0bd313f63..26e7258e71768 100644 --- a/tests/baselines/reference/quickInfoJSDocAtBeforeSpace.baseline +++ b/tests/baselines/reference/quickInfoJSDocAtBeforeSpace.baseline @@ -1,3 +1,34 @@ +=== /tests/cases/fourslash/quickInfoJSDocAtBeforeSpace.ts === +// /** +// * @return Don't @ me +// */ +// function f() { } +// ^ +// | ---------------------------------------------------------------------- +// | function f(): void +// | @return Don't @ me +// | ---------------------------------------------------------------------- +// /** +// * @return One final @ +// */ +// function g() { } +// ^ +// | ---------------------------------------------------------------------- +// | function g(): void +// | @return One final @ +// | ---------------------------------------------------------------------- +// /** +// * @return An @ +// * But another line +// */ +// function h() { } +// ^ +// | ---------------------------------------------------------------------- +// | function h(): void +// | @return An @ +// | But another line +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +36,7 @@ "position": 39, "name": "f" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -66,7 +97,7 @@ "position": 87, "name": "g" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -127,7 +158,7 @@ "position": 148, "name": "h" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJSDocTags.baseline b/tests/baselines/reference/quickInfoJSDocTags.baseline index 8d59248b438e0..3422078a99841 100644 --- a/tests/baselines/reference/quickInfoJSDocTags.baseline +++ b/tests/baselines/reference/quickInfoJSDocTags.baseline @@ -1,3 +1,137 @@ +=== /tests/cases/fourslash/quickInfoJSDocTags.ts === +// /** +// * This is class Foo. +// * @mytag comment1 comment2 +// */ +// class Foo { +// /** +// * This is the constructor. +// * @myjsdoctag this is a comment +// */ +// constructor(value: number) {} +// /** +// * method1 documentation +// * @mytag comment1 comment2 +// */ +// static method1() {} +// /** +// * @mytag +// */ +// method2() {} +// /** +// * @mytag comment1 comment2 +// */ +// property1: string; +// /** +// * @mytag1 some comments +// * some more comments about mytag1 +// * @mytag2 +// * here all the comments are on a new line +// * @mytag3 +// * @mytag +// */ +// property2: number; +// /** +// * @returns {number} a value +// */ +// method3(): number { return 3; } +// /** +// * @param {string} foo A value. +// * @returns {number} Another value +// * @mytag +// */ +// method4(foo: string): number { return 3; } +// /** @mytag */ +// method5() {} +// /** method documentation +// * @mytag a JSDoc tag +// */ +// newMethod() {} +// } +// var foo = new Foo(4); +// ^^^ +// | ---------------------------------------------------------------------- +// | constructor Foo(value: number): Foo +// | This is the constructor. +// | @myjsdoctag this is a comment +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /*10*/. +// | ---------------------------------------------------------------------- +// Foo.method1(); +// ^^^ +// | ---------------------------------------------------------------------- +// | class Foo +// | This is class Foo. +// | @mytag comment1 comment2 +// | ---------------------------------------------------------------------- +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) Foo.method1(): void +// | method1 documentation +// | @mytag comment1 comment2 +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /*11*/. +// | ---------------------------------------------------------------------- +// foo.method2(); +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) Foo.method2(): void +// | @mytag +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /*12*/. +// | ---------------------------------------------------------------------- +// foo.method3(); +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) Foo.method3(): number +// | @returns a value +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /*13*/. +// | ---------------------------------------------------------------------- +// foo.method4(); +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) Foo.method4(foo: string): number +// | @param foo A value. +// | @returns Another value +// | @mytag +// | ---------------------------------------------------------------------- +// foo.property1; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) Foo.property1: string +// | @mytag comment1 comment2 +// | ---------------------------------------------------------------------- +// foo.property2; +// ^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) Foo.property2: number +// | @mytag1 some comments +// | some more comments about mytag1 +// | @mytag2 here all the comments are on a new line +// | @mytag3 +// | @mytag +// | ---------------------------------------------------------------------- +// foo.method5(); +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) Foo.method5(): void +// | @mytag +// | ---------------------------------------------------------------------- +// foo.newMet +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | any +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +139,7 @@ "position": 977, "name": "1" }, - "quickInfo": { + "item": { "kind": "constructor", "kindModifiers": "", "textSpan": { @@ -94,7 +228,7 @@ "position": 985, "name": "2" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "", "textSpan": { @@ -140,7 +274,7 @@ "position": 989, "name": "3" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "static", "textSpan": { @@ -229,7 +363,7 @@ "position": 1004, "name": "4" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -307,7 +441,7 @@ "position": 1019, "name": "5" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -391,7 +525,7 @@ "position": 1034, "name": "6" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -504,7 +638,7 @@ "position": 1049, "name": "7" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -573,7 +707,7 @@ "position": 1064, "name": "8" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -657,7 +791,7 @@ "position": 1079, "name": "9" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -728,7 +862,7 @@ "position": 1100, "name": "14" }, - "quickInfo": { + "item": { "kind": "", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDoc.baseline b/tests/baselines/reference/quickInfoJsDoc.baseline index 5c75e40a656c0..f3d763849cabf 100644 --- a/tests/baselines/reference/quickInfoJsDoc.baseline +++ b/tests/baselines/reference/quickInfoJsDoc.baseline @@ -1,3 +1,132 @@ +=== /tests/cases/fourslash/quickInfoJsDoc.ts === +// /** +// * A constant +// * @deprecated +// */ +// var foo = "foo"; +// +// /** +// * A function +// * @deprecated +// */ +// function fn() { } +// +// /** +// * A class +// * @deprecated +// */ +// class C { +// /** +// * A field +// * @deprecated +// */ +// field = "field"; +// +// /** +// * A getter +// * @deprecated +// */ +// get getter() { +// return; +// } +// +// /** +// * A method +// * @deprecated +// */ +// m() { } +// +// get a() { +// this.field; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (property) C.field: string +// | A field +// | @deprecated +// | ---------------------------------------------------------------------- +// this.getter; +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) C.getter: void +// | A getter +// | @deprecated +// | ---------------------------------------------------------------------- +// this.m; +// ^ +// | ---------------------------------------------------------------------- +// | (method) C.m(): void +// | A method +// | @deprecated +// | ---------------------------------------------------------------------- +// foo; +// ^^^ +// | ---------------------------------------------------------------------- +// | var foo: string +// | A constant +// | @deprecated +// | ---------------------------------------------------------------------- +// C/; +// ^ +// | ---------------------------------------------------------------------- +// | class C +// | A class +// | @deprecated +// | ---------------------------------------------------------------------- +// fn(); +// ^ +// | ---------------------------------------------------------------------- +// | No quickinfo at /*5*/. +// | ---------------------------------------------------------------------- +// +// return 1; +// } +// +// set a(value: number) { +// this.field; +// ^^^^^ +// | ---------------------------------------------------------------------- +// | (property) C.field: string +// | A field +// | @deprecated +// | ---------------------------------------------------------------------- +// this.getter; +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) C.getter: void +// | A getter +// | @deprecated +// | ---------------------------------------------------------------------- +// this.m; +// ^ +// | ---------------------------------------------------------------------- +// | (method) C.m(): void +// | A method +// | @deprecated +// | ---------------------------------------------------------------------- +// foo; +// ^^^ +// | ---------------------------------------------------------------------- +// | var foo: string +// | A constant +// | @deprecated +// | ---------------------------------------------------------------------- +// C; +// ^ +// | ---------------------------------------------------------------------- +// | class C +// | A class +// | @deprecated +// | ---------------------------------------------------------------------- +// fn(); +// ^^ +// | ---------------------------------------------------------------------- +// | function fn(): void +// | A function +// | @deprecated +// | ---------------------------------------------------------------------- +// } +// } + [ { "marker": { @@ -5,7 +134,7 @@ "position": 416, "name": "0" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "deprecated", "textSpan": { @@ -73,7 +202,7 @@ "position": 437, "name": "1" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "deprecated", "textSpan": { @@ -141,7 +270,7 @@ "position": 453, "name": "2" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "deprecated", "textSpan": { @@ -217,7 +346,7 @@ "position": 466, "name": "3" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "deprecated", "textSpan": { @@ -269,7 +398,7 @@ "position": 477, "name": "4" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "deprecated", "textSpan": { @@ -316,7 +445,7 @@ "position": 565, "name": "6" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "deprecated", "textSpan": { @@ -384,7 +513,7 @@ "position": 586, "name": "7" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "deprecated", "textSpan": { @@ -452,7 +581,7 @@ "position": 602, "name": "8" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "deprecated", "textSpan": { @@ -528,7 +657,7 @@ "position": 615, "name": "9" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "deprecated", "textSpan": { @@ -580,7 +709,7 @@ "position": 626, "name": "10" }, - "quickInfo": { + "item": { "kind": "class", "kindModifiers": "deprecated", "textSpan": { @@ -620,7 +749,7 @@ "position": 638, "name": "11" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "deprecated", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocGetterSetter.baseline b/tests/baselines/reference/quickInfoJsDocGetterSetter.baseline index 830e0beeaf7d1..129d839f3dfc5 100644 --- a/tests/baselines/reference/quickInfoJsDocGetterSetter.baseline +++ b/tests/baselines/reference/quickInfoJsDocGetterSetter.baseline @@ -1,3 +1,112 @@ +=== /tests/cases/fourslash/quickInfoJsDocGetterSetter.ts === +// class A { +// /** +// * getter A +// * @returns return A +// */ +// get x(): string { +// ^ +// | ---------------------------------------------------------------------- +// | (getter) A.x: string +// | getter A +// | @returns return A +// | ---------------------------------------------------------------------- +// return ""; +// } +// /** +// * setter A +// * @param value foo A +// * @todo empty jsdoc +// */ +// set x(value) { } +// ^ +// | ---------------------------------------------------------------------- +// | (setter) A.x: string +// | setter A +// | @param value foo A +// | @todo empty jsdoc +// | ---------------------------------------------------------------------- +// } +// // override both getter and setter +// class B extends A { +// /** +// * getter B +// * @returns return B +// */ +// get x(): string { +// ^ +// | ---------------------------------------------------------------------- +// | (getter) B.x: string +// | getter B +// | @returns return B +// | ---------------------------------------------------------------------- +// return ""; +// } +// /** +// * setter B +// * @param value foo B +// */ +// set x(vale) { } +// ^ +// | ---------------------------------------------------------------------- +// | (setter) B.x: string +// | setter B +// | @param value foo B +// | ---------------------------------------------------------------------- +// } +// // not override +// class C extends A { } +// // only override setter +// class D extends A { +// /** +// * setter D +// * @param value foo D +// */ +// set x(val: string) { } +// ^ +// | ---------------------------------------------------------------------- +// | (setter) D.x: string +// | setter D +// | @param value foo D +// | ---------------------------------------------------------------------- +// } +// new A().x = "1"; +// ^ +// | ---------------------------------------------------------------------- +// | (property) A.x: string +// | getter A +// | setter A +// | @returns return A +// | @param value foo A +// | @todo empty jsdoc +// | ---------------------------------------------------------------------- +// new B().x = "1"; +// ^ +// | ---------------------------------------------------------------------- +// | (property) B.x: string +// | getter B +// | setter B +// | @returns return B +// | @param value foo B +// | ---------------------------------------------------------------------- +// new C().x = "1"; +// ^ +// | ---------------------------------------------------------------------- +// | (property) A.x: string +// | getter A +// | setter A +// | @returns return A +// | @param value foo A +// | @todo empty jsdoc +// | ---------------------------------------------------------------------- +// new D().x = "1"; +// ^ +// | ---------------------------------------------------------------------- +// | (property) D.x: string +// | setter D +// | @param value foo D +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +114,7 @@ "position": 75, "name": "1" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "", "textSpan": { @@ -79,7 +188,7 @@ "position": 205, "name": "2" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "", "textSpan": { @@ -170,7 +279,7 @@ "position": 340, "name": "3" }, - "quickInfo": { + "item": { "kind": "getter", "kindModifiers": "", "textSpan": { @@ -244,7 +353,7 @@ "position": 445, "name": "4" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "", "textSpan": { @@ -326,7 +435,7 @@ "position": 607, "name": "5" }, - "quickInfo": { + "item": { "kind": "setter", "kindModifiers": "", "textSpan": { @@ -408,7 +517,7 @@ "position": 636, "name": "6" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -516,7 +625,7 @@ "position": 653, "name": "7" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -615,7 +724,7 @@ "position": 670, "name": "8" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -723,7 +832,7 @@ "position": 687, "name": "9" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocInheritage.baseline b/tests/baselines/reference/quickInfoJsDocInheritage.baseline index 997e5674656c6..1de01504e5e01 100644 --- a/tests/baselines/reference/quickInfoJsDocInheritage.baseline +++ b/tests/baselines/reference/quickInfoJsDocInheritage.baseline @@ -1,3 +1,237 @@ +=== /tests/cases/fourslash/quickInfoJsDocInheritage.ts === +// interface A { +// /** +// * @description A.foo1 +// */ +// foo1: number; +// /** +// * @description A.foo2 +// */ +// foo2: (para1: string) => number; +// } +// +// interface B { +// /** +// * @description B.foo1 +// */ +// foo1: number; +// /** +// * @description B.foo2 +// */ +// foo2: (para2: string) => number; +// } +// +// // implement multi interfaces with duplicate name +// // method for function signature +// class C implements A, B { +// foo1: number = 1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) C.foo1: number +// | @description A.foo1 +// | ---------------------------------------------------------------------- +// foo2(q: string) { return 1 } +// ^^^^ +// | ---------------------------------------------------------------------- +// | (method) C.foo2(q: string): number +// | @description A.foo2 +// | ---------------------------------------------------------------------- +// } +// +// // implement multi interfaces with duplicate name +// // property for function signature +// class D implements A, B { +// foo1: number = 1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) D.foo1: number +// | @description A.foo1 +// | ---------------------------------------------------------------------- +// foo2 = (q: string) => { return 1 } +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) D.foo2: (q: string) => number +// | @description A.foo2 +// | ---------------------------------------------------------------------- +// } +// +// new C().foo1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) C.foo1: number +// | @description A.foo1 +// | ---------------------------------------------------------------------- +// new C().foo2; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (method) C.foo2(q: string): number +// | @description A.foo2 +// | ---------------------------------------------------------------------- +// new D().foo1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) D.foo1: number +// | @description A.foo1 +// | ---------------------------------------------------------------------- +// new D().foo2; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) D.foo2: (q: string) => number +// | @description A.foo2 +// | ---------------------------------------------------------------------- +// +// class Base1 { +// /** +// * @description Base1.foo1 +// */ +// foo1: number = 1; +// +// /** +// * +// * @param q Base1.foo2 parameter +// * @returns Base1.foo2 return +// */ +// foo2(q: string) { return 1 } +// } +// +// // extends class and implement interfaces with duplicate name +// // property override method +// class Drived1 extends Base1 implements A { +// foo1: number = 1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Drived1.foo1: number +// | @description Base1.foo1 +// | ---------------------------------------------------------------------- +// foo2(para1: string) { return 1 }; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (method) Drived1.foo2(para1: string): number +// | @param q Base1.foo2 parameter +// | @returns Base1.foo2 return +// | ---------------------------------------------------------------------- +// } +// +// // extends class and implement interfaces with duplicate name +// // method override method +// class Drived2 extends Base1 implements B { +// foo1: number = 1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Drived2.foo1: number +// | @description Base1.foo1 +// | ---------------------------------------------------------------------- +// foo2 = (para1: string) => { return 1; }; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Drived2.foo2: (para1: string) => number +// | @param q Base1.foo2 parameter +// | @returns Base1.foo2 return +// | ---------------------------------------------------------------------- +// } +// +// class Base2 { +// /** +// * @description Base2.foo1 +// */ +// foo1: number = 1; +// /** +// * +// * @param q Base2.foo2 parameter +// * @returns Base2.foo2 return +// */ +// foo2(q: string) { return 1 } +// } +// +// // extends class and implement interfaces with duplicate name +// // property override method +// class Drived3 extends Base2 implements A { +// foo1: number = 1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Drived3.foo1: number +// | @description Base2.foo1 +// | ---------------------------------------------------------------------- +// foo2(para1: string) { return 1 }; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (method) Drived3.foo2(para1: string): number +// | @param q Base2.foo2 parameter +// | @returns Base2.foo2 return +// | ---------------------------------------------------------------------- +// } +// +// // extends class and implement interfaces with duplicate name +// // method override method +// class Drived4 extends Base2 implements B { +// foo1: number = 1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Drived4.foo1: number +// | @description Base2.foo1 +// | ---------------------------------------------------------------------- +// foo2 = (para1: string) => { return 1; }; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Drived4.foo2: (para1: string) => number +// | @param q Base2.foo2 parameter +// | @returns Base2.foo2 return +// | ---------------------------------------------------------------------- +// } +// +// new Drived1().foo1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Drived1.foo1: number +// | @description Base1.foo1 +// | ---------------------------------------------------------------------- +// new Drived1().foo2; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (method) Drived1.foo2(para1: string): number +// | @param q Base1.foo2 parameter +// | @returns Base1.foo2 return +// | ---------------------------------------------------------------------- +// new Drived2().foo1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Drived2.foo1: number +// | @description Base1.foo1 +// | ---------------------------------------------------------------------- +// new Drived2().foo2; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Drived2.foo2: (para1: string) => number +// | @param q Base1.foo2 parameter +// | @returns Base1.foo2 return +// | ---------------------------------------------------------------------- +// new Drived3().foo1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Drived3.foo1: number +// | @description Base2.foo1 +// | ---------------------------------------------------------------------- +// new Drived3().foo2; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (method) Drived3.foo2(para1: string): number +// | @param q Base2.foo2 parameter +// | @returns Base2.foo2 return +// | ---------------------------------------------------------------------- +// new Drived4().foo1; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Drived4.foo1: number +// | @description Base2.foo1 +// | ---------------------------------------------------------------------- +// new Drived4().foo2; +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Drived4.foo2: (para1: string) => number +// | @param q Base2.foo2 parameter +// | @returns Base2.foo2 return +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +239,7 @@ "position": 429, "name": "1" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -74,7 +308,7 @@ "position": 451, "name": "2" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -167,7 +401,7 @@ "position": 598, "name": "3" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -236,7 +470,7 @@ "position": 620, "name": "4" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -341,7 +575,7 @@ "position": 666, "name": "5" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -410,7 +644,7 @@ "position": 680, "name": "6" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -503,7 +737,7 @@ "position": 694, "name": "7" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -572,7 +806,7 @@ "position": 708, "name": "8" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -677,7 +911,7 @@ "position": 1069, "name": "9" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -746,7 +980,7 @@ "position": 1091, "name": "10" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -856,7 +1090,7 @@ "position": 1263, "name": "11" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -925,7 +1159,7 @@ "position": 1285, "name": "12" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -1047,7 +1281,7 @@ "position": 1681, "name": "13" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -1116,7 +1350,7 @@ "position": 1703, "name": "14" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -1226,7 +1460,7 @@ "position": 1875, "name": "15" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -1295,7 +1529,7 @@ "position": 1897, "name": "16" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -1417,7 +1651,7 @@ "position": 1955, "name": "17" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -1486,7 +1720,7 @@ "position": 1975, "name": "18" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -1596,7 +1830,7 @@ "position": 1995, "name": "19" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -1665,7 +1899,7 @@ "position": 2015, "name": "20" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -1787,7 +2021,7 @@ "position": 2035, "name": "21" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -1856,7 +2090,7 @@ "position": 2055, "name": "22" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { @@ -1966,7 +2200,7 @@ "position": 2075, "name": "23" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { @@ -2035,7 +2269,7 @@ "position": 2095, "name": "24" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTags1.baseline b/tests/baselines/reference/quickInfoJsDocTags1.baseline index b3067551c3af2..4bdd50de8d0f6 100644 --- a/tests/baselines/reference/quickInfoJsDocTags1.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags1.baseline @@ -1,3 +1,32 @@ +=== /tests/cases/fourslash/quickInfoJsDocTags1.ts === +// /** +// * Doc +// * @author Me +// * @augments {C} Augments it +// * @template T A template +// * @type {number | string} A type +// * @typedef {number | string} NumOrStr +// * @property {number} x The prop +// * @param {number} x The param +// * @returns The result +// * @see x (the parameter) +// */ +// function foo(x) {} +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(x: any): void +// | Doc +// | @author Me +// | @augments C Augments it +// | @template T A template +// | @type {number | string} A type +// | @typedef NumOrStr +// | @property {number} x The prop +// | @param x The param +// | @returns The result +// | @see x (the parameter) +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +34,7 @@ "position": 298, "name": "" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTags10.baseline b/tests/baselines/reference/quickInfoJsDocTags10.baseline index e4e616652aaf2..eab5a3332148f 100644 --- a/tests/baselines/reference/quickInfoJsDocTags10.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags10.baseline @@ -1,3 +1,18 @@ +=== /tests/cases/fourslash/quickInfoJsDocTags10.js === +// /** +// * @param {T1} a +// * @param {T2} a +// * @template T1,T2 Comment Text +// */ +// const foo = (a, b) => {}; +// ^^^ +// | ---------------------------------------------------------------------- +// | const foo: (a: T1, b: any) => void +// | @param a +// | @param a +// | @template T1, T2 Comment Text +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +20,7 @@ "position": 80, "name": "" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTags11.baseline b/tests/baselines/reference/quickInfoJsDocTags11.baseline index 86d49f8089e0f..542210bfbd169 100644 --- a/tests/baselines/reference/quickInfoJsDocTags11.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags11.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/quickInfoJsDocTags11.js === +// /** +// * @param {T1} a +// * @param {T2} b +// * @template {number} T1 Comment T1 +// * @template {number} T2 Comment T2 +// */ +// const foo = (a, b) => {}; +// ^^^ +// | ---------------------------------------------------------------------- +// | const foo: (a: T1, b: T2) => void +// | @param a +// | @param b +// | @template {number} T1 Comment T1 +// | @template {number} T2 Comment T2 +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +22,7 @@ "position": 120, "name": "" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTags3.baseline b/tests/baselines/reference/quickInfoJsDocTags3.baseline index 21140f9d20255..d0ccb4e9a8dc0 100644 --- a/tests/baselines/reference/quickInfoJsDocTags3.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags3.baseline @@ -1,3 +1,32 @@ +=== /tests/cases/fourslash/quickInfoJsDocTags3.ts === +// interface Foo { +// /** +// * comment +// * @author Me +// * @see x (the parameter) +// * @param {number} x - x comment +// * @param {number} y - y comment +// * @throws {Error} comment +// */ +// method(x: number, y: number): void; +// } +// +// class Bar implements Foo { +// method(): void { +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) Bar.method(): void +// | comment +// | @author Me +// | @see x (the parameter) +// | @param x - x comment +// | @param y - y comment +// | @throws {Error} comment +// | ---------------------------------------------------------------------- +// throw new Error("Method not implemented."); +// } +// } + [ { "marker": { @@ -5,7 +34,7 @@ "position": 290, "name": "" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTags4.baseline b/tests/baselines/reference/quickInfoJsDocTags4.baseline index 097ac25f124b6..e48d3bed692c1 100644 --- a/tests/baselines/reference/quickInfoJsDocTags4.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags4.baseline @@ -1,3 +1,35 @@ +=== /tests/cases/fourslash/quickInfoJsDocTags4.ts === +// class Foo { +// /** +// * comment +// * @author Me +// * @see x (the parameter) +// * @param {number} x - x comment +// * @param {number} y - y comment +// * @returns The result +// */ +// method(x: number, y: number): number { +// return x + y; +// } +// } +// +// class Bar extends Foo { +// method(x: number, y: number): number { +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) Bar.method(x: number, y: number): number +// | comment +// | @author Me +// | @see x (the parameter) +// | @param x - x comment +// | @param y - y comment +// | @returns The result +// | ---------------------------------------------------------------------- +// const res = super.method(x, y) + 100; +// return res; +// } +// } + [ { "marker": { @@ -5,7 +37,7 @@ "position": 309, "name": "" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTags5.baseline b/tests/baselines/reference/quickInfoJsDocTags5.baseline index 167f3df49184f..aaf4ef4997a90 100644 --- a/tests/baselines/reference/quickInfoJsDocTags5.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags5.baseline @@ -1,3 +1,35 @@ +=== /tests/cases/fourslash/quickInfoJsDocTags5.js === +// class Foo { +// /** +// * comment +// * @author Me +// * @see x (the parameter) +// * @param {number} x - x comment +// * @param {number} y - y comment +// * @returns The result +// */ +// method(x, y) { +// return x + y; +// } +// } +// +// class Bar extends Foo { +// method(x, y) { +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) Bar.method(x: any, y: any): number +// | comment +// | @author Me +// | @see x (the parameter) +// | @param x - x comment +// | @param y - y comment +// | @returns The result +// | ---------------------------------------------------------------------- +// const res = super.method(x, y) + 100; +// return res; +// } +// } + [ { "marker": { @@ -5,7 +37,7 @@ "position": 285, "name": "" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTags6.baseline b/tests/baselines/reference/quickInfoJsDocTags6.baseline index 7ab1d074034f5..aca6f256b1fa0 100644 --- a/tests/baselines/reference/quickInfoJsDocTags6.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags6.baseline @@ -1,3 +1,37 @@ +=== /tests/cases/fourslash/quickInfoJsDocTags6.js === +// class Foo { +// /** +// * comment +// * @author Me +// * @see x (the parameter) +// * @param {number} x - x comment +// * @param {number} y - y comment +// * @returns The result +// */ +// method(x, y) { +// return x + y; +// } +// } +// +// class Bar extends Foo { +// /** @inheritDoc */ +// method(x, y) { +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | (method) Bar.method(x: any, y: any): number +// | comment +// | @author Me +// | @see x (the parameter) +// | @param x - x comment +// | @param y - y comment +// | @returns The result +// | @inheritDoc +// | ---------------------------------------------------------------------- +// const res = super.method(x, y) + 100; +// return res; +// } +// } + [ { "marker": { @@ -5,7 +39,7 @@ "position": 308, "name": "" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTags7.baseline b/tests/baselines/reference/quickInfoJsDocTags7.baseline index 4b5d48a290117..3dd651ec66c2e 100644 --- a/tests/baselines/reference/quickInfoJsDocTags7.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags7.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/quickInfoJsDocTags7.js === +// /** +// * @typedef {{ [x: string]: any, y: number }} Foo +// */ +// +// /** +// * @type {(t: T) => number} +// * @template T +// */ +// const foo = t => t.y; +// ^^^ +// | ---------------------------------------------------------------------- +// | const foo: (t: T) => number +// | @type {(t: T) => number} +// | @template T +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +22,7 @@ "position": 116, "name": "" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTags8.baseline b/tests/baselines/reference/quickInfoJsDocTags8.baseline index def6b90bcf85d..ac76cd09327b9 100644 --- a/tests/baselines/reference/quickInfoJsDocTags8.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags8.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/quickInfoJsDocTags8.js === +// /** +// * @typedef {{ [x: string]: any, y: number }} Foo +// */ +// +// /** +// * @type {(t: T) => number} +// * @template {Foo} T +// */ +// const foo = t => t.y; +// ^^^ +// | ---------------------------------------------------------------------- +// | const foo: (t: T) => number +// | @type {(t: T) => number} +// | @template {Foo} T +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +22,7 @@ "position": 122, "name": "" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTags9.baseline b/tests/baselines/reference/quickInfoJsDocTags9.baseline index 248a657146b6b..036159a2a2287 100644 --- a/tests/baselines/reference/quickInfoJsDocTags9.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags9.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/quickInfoJsDocTags9.js === +// /** +// * @typedef {{ [x: string]: any, y: number }} Foo +// */ +// +// /** +// * @type {(t: T) => number} +// * @template {Foo} T Comment Text +// */ +// const foo = t => t.y; +// ^^^ +// | ---------------------------------------------------------------------- +// | const foo: (t: T) => number +// | @type {(t: T) => number} +// | @template {Foo} T Comment Text +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +22,7 @@ "position": 135, "name": "" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTagsCallback.baseline b/tests/baselines/reference/quickInfoJsDocTagsCallback.baseline index 75034dd239822..abae9e22cb692 100644 --- a/tests/baselines/reference/quickInfoJsDocTagsCallback.baseline +++ b/tests/baselines/reference/quickInfoJsDocTagsCallback.baseline @@ -1,3 +1,24 @@ +=== /tests/cases/fourslash/quickInfoJsDocTagsCallback.js === +// /** +// * @callback cb +// ^^ +// | ---------------------------------------------------------------------- +// | type cb = (x: string) => any +// | ---------------------------------------------------------------------- +// * @param {string} x - x comment +// */ +// +// /** +// * @param {cb} bar -callback comment +// ^^ +// | ---------------------------------------------------------------------- +// | type cb = (x: string) => any +// | ---------------------------------------------------------------------- +// */ +// function foo(bar) { +// bar(bar); +// } + [ { "marker": { @@ -5,7 +26,7 @@ "position": 19, "name": "1" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { @@ -87,7 +108,7 @@ "position": 73, "name": "2" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload01.baseline b/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload01.baseline index cc8957dc9b181..f932773184442 100644 --- a/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload01.baseline +++ b/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload01.baseline @@ -1,3 +1,26 @@ +=== /tests/cases/fourslash/quickInfoJsDocTagsFunctionOverload01.ts === +// /** +// * Doc foo +// */ +// declare function foo(): void; +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(): void (+1 overload) +// | Doc foo +// | ---------------------------------------------------------------------- +// +// /** +// * Doc foo overloaded +// * @tag Tag text +// */ +// declare function foo(x: number): void +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(x: number): void (+1 overload) +// | Doc foo overloaded +// | @tag Tag text +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +28,7 @@ "position": 36, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "declare", "textSpan": { @@ -88,7 +111,7 @@ "position": 114, "name": "2" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "declare", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload03.baseline b/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload03.baseline index a119b5b0d0b61..5d58d766606fe 100644 --- a/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload03.baseline +++ b/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload03.baseline @@ -1,3 +1,22 @@ +=== /tests/cases/fourslash/quickInfoJsDocTagsFunctionOverload03.ts === +// declare function foo(): void; +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(): void (+1 overload) +// | ---------------------------------------------------------------------- +// +// /** +// * Doc foo overloaded +// * @tag Tag text +// */ +// declare function foo(x: number): void +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(x: number): void (+1 overload) +// | Doc foo overloaded +// | @tag Tag text +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +24,7 @@ "position": 17, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "declare", "textSpan": { @@ -83,7 +102,7 @@ "position": 95, "name": "2" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "declare", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload05.baseline b/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload05.baseline index 718528d3008c0..2c8cdb8057313 100644 --- a/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload05.baseline +++ b/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload05.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/quickInfoJsDocTagsFunctionOverload05.ts === +// declare function foo(): void; +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(): void (+1 overload) +// | ---------------------------------------------------------------------- +// +// /** +// * @tag Tag text +// */ +// declare function foo(x: number): void +// ^^^ +// | ---------------------------------------------------------------------- +// | function foo(x: number): void (+1 overload) +// | @tag Tag text +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +22,7 @@ "position": 17, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "declare", "textSpan": { @@ -83,7 +100,7 @@ "position": 73, "name": "2" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "declare", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTagsTypedef.baseline b/tests/baselines/reference/quickInfoJsDocTagsTypedef.baseline index 81c88a55887e4..d766b0cce6223 100644 --- a/tests/baselines/reference/quickInfoJsDocTagsTypedef.baseline +++ b/tests/baselines/reference/quickInfoJsDocTagsTypedef.baseline @@ -1,3 +1,36 @@ +=== /tests/cases/fourslash/quickInfoJsDocTagsTypedef.js === +// /** +// * Bar comment +// * @typedef {Object} Bar +// ^^^ +// | ---------------------------------------------------------------------- +// | type Bar = { +// | baz: string; +// | qux: string; +// | } +// | Bar comment +// | ---------------------------------------------------------------------- +// * @property {string} baz - baz comment +// * @property {string} qux - qux comment +// */ +// +// /** +// * foo comment +// * @param {Bar} x - x comment +// ^^^ +// | ---------------------------------------------------------------------- +// | type Bar = { +// | baz: string; +// | qux: string; +// | } +// | Bar comment +// | ---------------------------------------------------------------------- +// * @returns {Bar} +// */ +// function foo(x) { +// return x; +// } + [ { "marker": { @@ -5,7 +38,7 @@ "position": 40, "name": "1" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { @@ -120,7 +153,7 @@ "position": 159, "name": "2" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoJsDocTextFormatting1.baseline b/tests/baselines/reference/quickInfoJsDocTextFormatting1.baseline index a4df36250a8c9..22a08e3bff63a 100644 --- a/tests/baselines/reference/quickInfoJsDocTextFormatting1.baseline +++ b/tests/baselines/reference/quickInfoJsDocTextFormatting1.baseline @@ -1,3 +1,76 @@ +=== /tests/cases/fourslash/quickInfoJsDocTextFormatting1.ts === +// /** +// * @param {number} var1 **Highlighted text** +// * @param {string} var2 Another **Highlighted text** +// */ +// function f1(var1, var2) { } +// +// /** +// * @param {number} var1 *Regular text with an asterisk +// * @param {string} var2 Another *Regular text with an asterisk +// */ +// function f2(var1, var2) { } +// +// /** +// * @param {number} var1 +// * *Regular text with an asterisk +// * @param {string} var2 +// * Another *Regular text with an asterisk +// */ +// function f3(var1, var2) { } +// +// /** +// * @param {number} var1 +// * **Highlighted text** +// * @param {string} var2 +// * Another **Highlighted text** +// */ +// function f4(var1, var2) { } +// +// /** +// * @param {number} var1 +// **Highlighted text** +// * @param {string} var2 +// Another **Highlighted text** +// */ +// function f5(var1, var2) { } +// +// f1(); +// ^ +// | ---------------------------------------------------------------------- +// | f1(**var1: any**, var2: any): void +// | @param var1 **Highlighted text** +// | @param var2 Another **Highlighted text** +// | ---------------------------------------------------------------------- +// f2(); +// ^ +// | ---------------------------------------------------------------------- +// | f2(**var1: any**, var2: any): void +// | @param var1 *Regular text with an asterisk +// | @param var2 Another *Regular text with an asterisk +// | ---------------------------------------------------------------------- +// f3(); +// ^ +// | ---------------------------------------------------------------------- +// | f3(**var1: any**, var2: any): void +// | @param var1 *Regular text with an asterisk +// | @param var2 Another *Regular text with an asterisk +// | ---------------------------------------------------------------------- +// f4(); +// ^ +// | ---------------------------------------------------------------------- +// | f4(**var1: any**, var2: any): void +// | @param var1 **Highlighted text** +// | @param var2 Another **Highlighted text** +// | ---------------------------------------------------------------------- +// f5(); +// ^ +// | ---------------------------------------------------------------------- +// | f5(**var1: any**, var2: any): void +// | @param var1 **Highlighted text** +// | @param var2 Another **Highlighted text** +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +78,7 @@ "position": 737, "name": "1" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -161,7 +234,7 @@ "position": 743, "name": "2" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -317,7 +390,7 @@ "position": 749, "name": "3" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -473,7 +546,7 @@ "position": 755, "name": "4" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -629,7 +702,7 @@ "position": 761, "name": "5" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/quickInfoLink10.baseline b/tests/baselines/reference/quickInfoLink10.baseline index 05714ee37059b..419b71b3657fd 100644 --- a/tests/baselines/reference/quickInfoLink10.baseline +++ b/tests/baselines/reference/quickInfoLink10.baseline @@ -1,3 +1,14 @@ +=== /tests/cases/fourslash/quickInfoLink10.ts === +// /** +// * start {@link https://vscode.dev/ | end} +// */ +// const a = () => 1; +// ^ +// | ---------------------------------------------------------------------- +// | const a: () => number +// | start {@link https://vscode.dev/ end} +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +16,7 @@ "position": 57, "name": "" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoLink2.baseline b/tests/baselines/reference/quickInfoLink2.baseline index 3219b7cc600fd..c8730e1df5171 100644 --- a/tests/baselines/reference/quickInfoLink2.baseline +++ b/tests/baselines/reference/quickInfoLink2.baseline @@ -1,3 +1,18 @@ +=== /tests/cases/fourslash/quickInfoLink2.js === +// /** +// * @typedef AdditionalWallabyConfig Additional valid Wallaby config properties +// ^^^^^^^^^^^^^^^^^^^^^^^ +// | ---------------------------------------------------------------------- +// | type AdditionalWallabyConfig = { +// | autoDetect: boolean; +// | } +// | Additional valid Wallaby config properties +// | that aren't defined in {@link IWallabyConfig }. +// | ---------------------------------------------------------------------- +// * that aren't defined in {@link IWallabyConfig}. +// * @property {boolean} autoDetect +// */ + [ { "marker": { @@ -5,7 +20,7 @@ "position": 39, "name": "" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoLink3.baseline b/tests/baselines/reference/quickInfoLink3.baseline index 65f4d33cef510..0af1d0dc41af1 100644 --- a/tests/baselines/reference/quickInfoLink3.baseline +++ b/tests/baselines/reference/quickInfoLink3.baseline @@ -1,3 +1,26 @@ +=== /tests/cases/fourslash/quickInfoLink3.ts === +// class Foo { +// /** +// * {@link Foo} +// * {@link Foo} +// * {@link Foo>} +// * {@link Foo<>} +// * {@link Foo>} +// * {@link Foo<} +// */ +// bar(){} +// ^^^ +// | ---------------------------------------------------------------------- +// | (method) Foo.bar(): void +// | {@link Foo} +// | {@link Foo} +// | {@link Foo>} +// | {@link Foo<>} +// | {@link Foo>} +// | {@link Foo<} +// | ---------------------------------------------------------------------- +// } + [ { "marker": { @@ -5,7 +28,7 @@ "position": 169, "name": "" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoLink4.baseline b/tests/baselines/reference/quickInfoLink4.baseline index 94faf3f24dd26..a3b2823e9577e 100644 --- a/tests/baselines/reference/quickInfoLink4.baseline +++ b/tests/baselines/reference/quickInfoLink4.baseline @@ -1,3 +1,17 @@ +=== /tests/cases/fourslash/quickInfoLink4.ts === +// type A = 1 | 2; +// +// switch (0 as A) { +// /** {@link A} */ +// ^ +// | ---------------------------------------------------------------------- +// | type A = 1 | 2 +// | ---------------------------------------------------------------------- +// case 1: +// case 2: +// break; +// } + [ { "marker": { @@ -5,7 +19,7 @@ "position": 47, "name": "" }, - "quickInfo": { + "item": { "kind": "type", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoLink5.baseline b/tests/baselines/reference/quickInfoLink5.baseline index 12f858bfd00e6..3b8bac7d0392a 100644 --- a/tests/baselines/reference/quickInfoLink5.baseline +++ b/tests/baselines/reference/quickInfoLink5.baseline @@ -1,3 +1,15 @@ +=== /tests/cases/fourslash/quickInfoLink5.ts === +// const A = 123; +// /** +// * See {@link A| constant A} instead +// */ +// const B = 456; +// ^ +// | ---------------------------------------------------------------------- +// | const B: 456 +// | See {@link Aconstant A} instead +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +17,7 @@ "position": 67, "name": "" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoLink6.baseline b/tests/baselines/reference/quickInfoLink6.baseline index d7e3c60f02afb..603890210d6eb 100644 --- a/tests/baselines/reference/quickInfoLink6.baseline +++ b/tests/baselines/reference/quickInfoLink6.baseline @@ -1,3 +1,15 @@ +=== /tests/cases/fourslash/quickInfoLink6.ts === +// const A = 123; +// /** +// * See {@link A |constant A} instead +// */ +// const B = 456; +// ^ +// | ---------------------------------------------------------------------- +// | const B: 456 +// | See {@link Aconstant A} instead +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +17,7 @@ "position": 67, "name": "" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoLink7.baseline b/tests/baselines/reference/quickInfoLink7.baseline index cf223e9b7bfa5..654f671ab12f0 100644 --- a/tests/baselines/reference/quickInfoLink7.baseline +++ b/tests/baselines/reference/quickInfoLink7.baseline @@ -1,3 +1,14 @@ +=== /tests/cases/fourslash/quickInfoLink7.ts === +// /** +// * See {@link | } instead +// */ +// const B = 456; +// ^ +// | ---------------------------------------------------------------------- +// | const B: 456 +// | See {@link | } instead +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +16,7 @@ "position": 46, "name": "" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoLink8.baseline b/tests/baselines/reference/quickInfoLink8.baseline index 5156e14413a84..d34e8a666bfaf 100644 --- a/tests/baselines/reference/quickInfoLink8.baseline +++ b/tests/baselines/reference/quickInfoLink8.baseline @@ -1,3 +1,15 @@ +=== /tests/cases/fourslash/quickInfoLink8.ts === +// const A = 123; +// /** +// * See {@link A | constant A} instead +// */ +// const B = 456; +// ^ +// | ---------------------------------------------------------------------- +// | const B: 456 +// | See {@link Aconstant A} instead +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +17,7 @@ "position": 67, "name": "" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoLink9.baseline b/tests/baselines/reference/quickInfoLink9.baseline index ec7a9ec78d220..4c5dd0a2b3fcc 100644 --- a/tests/baselines/reference/quickInfoLink9.baseline +++ b/tests/baselines/reference/quickInfoLink9.baseline @@ -1,3 +1,15 @@ +=== /tests/cases/fourslash/quickInfoLink9.ts === +// type Foo = { +// /** +// * Text before {@link a} text after +// ^ +// | ---------------------------------------------------------------------- +// | (parameter) a: number +// | ---------------------------------------------------------------------- +// */ +// c: (a: number) => void; +// } + [ { "marker": { @@ -5,7 +17,7 @@ "position": 47, "name": "" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoLinkCodePlain.baseline b/tests/baselines/reference/quickInfoLinkCodePlain.baseline index bea69b5fc4bc6..2324d5f6da1f6 100644 --- a/tests/baselines/reference/quickInfoLinkCodePlain.baseline +++ b/tests/baselines/reference/quickInfoLinkCodePlain.baseline @@ -1,3 +1,17 @@ +=== /tests/cases/fourslash/quickInfoLinkCodePlain.ts === +// export class C { +// /** +// * @deprecated Use {@linkplain PerspectiveCamera#setFocalLength .setFocalLength()} and {@linkcode PerspectiveCamera#filmGauge .filmGauge} instead. +// */ +// m() { } +// } +// new C().m +// ^ +// | ---------------------------------------------------------------------- +// | (method) C.m(): void +// | @deprecated Use {@linkplain PerspectiveCamera#setFocalLength .setFocalLength()} and {@linkcode PerspectiveCamera#filmGauge .filmGauge} instead. +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +19,7 @@ "position": 210, "name": "" }, - "quickInfo": { + "item": { "kind": "method", "kindModifiers": "deprecated", "textSpan": { diff --git a/tests/baselines/reference/quickInfoNestedExportEqualExportDefault.baseline b/tests/baselines/reference/quickInfoNestedExportEqualExportDefault.baseline index 159b8b8151927..e699a2cdfd832 100644 --- a/tests/baselines/reference/quickInfoNestedExportEqualExportDefault.baseline +++ b/tests/baselines/reference/quickInfoNestedExportEqualExportDefault.baseline @@ -1,3 +1,25 @@ +=== /tests/cases/fourslash/quickInfoNestedExportEqualExportDefault.ts === +// export = (state, messages) => { +// export default { +// ^^^^^^ +// | ---------------------------------------------------------------------- +// | class (Anonymous function).default +// | enum (Anonymous function).default +// | module (Anonymous function).default +// | (enum member) (Anonymous function).default +// | (enum member) (Anonymous function).default: {} +// | ---------------------------------------------------------------------- +// ^^^^^^^ +// | ---------------------------------------------------------------------- +// | class (Anonymous function).default +// | enum (Anonymous function).default +// | module (Anonymous function).default +// | (enum member) (Anonymous function).default +// | (enum member) (Anonymous function).default: {} +// | ---------------------------------------------------------------------- +// } +// } + [ { "marker": { @@ -5,7 +27,7 @@ "position": 41, "name": "1" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "export", "textSpan": { @@ -171,7 +193,7 @@ "position": 49, "name": "2" }, - "quickInfo": { + "item": { "kind": "enum member", "kindModifiers": "export", "textSpan": { diff --git a/tests/baselines/reference/quickInfoOnParameterProperties.baseline b/tests/baselines/reference/quickInfoOnParameterProperties.baseline index adc88fb568e46..545aff93e8bae 100644 --- a/tests/baselines/reference/quickInfoOnParameterProperties.baseline +++ b/tests/baselines/reference/quickInfoOnParameterProperties.baseline @@ -1,3 +1,44 @@ +=== /tests/cases/fourslash/quickInfoOnParameterProperties.ts === +// interface IFoo { +// /** this is the name of blabla +// * - use blabla +// * @example blabla +// */ +// name?: string; +// } +// +// // test1 should work +// class Foo implements IFoo { +// //public name: string = ''; +// constructor( +// public name: string, // documentation should leech and work ! +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Foo.name: string +// | this is the name of blabla +// | - use blabla +// | @example blabla +// | ---------------------------------------------------------------------- +// ) { +// } +// } +// +// // test2 work +// class Foo2 implements IFoo { +// public name: string = ''; // documentation leeched and work ! +// ^^^^ +// | ---------------------------------------------------------------------- +// | (property) Foo2.name: string +// | this is the name of blabla +// | - use blabla +// | @example blabla +// | ---------------------------------------------------------------------- +// constructor( +// //public name: string, +// ) { +// } +// } + [ { "marker": { @@ -5,7 +46,7 @@ "position": 226, "name": "1" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { @@ -79,7 +120,7 @@ "position": 347, "name": "2" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "public", "textSpan": { diff --git a/tests/baselines/reference/quickInfoOnThis5.baseline b/tests/baselines/reference/quickInfoOnThis5.baseline index 76047b05ef163..bff1208541e28 100644 --- a/tests/baselines/reference/quickInfoOnThis5.baseline +++ b/tests/baselines/reference/quickInfoOnThis5.baseline @@ -1,3 +1,57 @@ +=== /tests/cases/fourslash/quickInfoOnThis5.ts === +// const foo = { +// num: 0, +// f() { +// type Y = typeof this; +// ^^^^ +// | ---------------------------------------------------------------------- +// | { +// | num: number; +// | f(): void; +// | g(this: number): void; +// | } +// | ---------------------------------------------------------------------- +// type Z = typeof this.num; +// ^^^^ +// | ---------------------------------------------------------------------- +// | this: { +// | num: number; +// | f(): void; +// | g(this: number): void; +// | } +// | ---------------------------------------------------------------------- +// }, +// g(this: number) { +// type X = typeof this; +// ^^^^ +// | ---------------------------------------------------------------------- +// | this: number +// | ---------------------------------------------------------------------- +// } +// } +// class Foo { +// num = 0; +// f() { +// type Y = typeof this; +// ^^^^ +// | ---------------------------------------------------------------------- +// | this: this +// | ---------------------------------------------------------------------- +// type Z = typeof this.num; +// ^^^^ +// | ---------------------------------------------------------------------- +// | this: this +// | ---------------------------------------------------------------------- +// } +// g(this: number) { +// type X = typeof this; +// ^^^^ +// | ---------------------------------------------------------------------- +// | this: number +// | ---------------------------------------------------------------------- +// } +// } + [ { "marker": { @@ -5,7 +59,7 @@ "position": 62, "name": "1" }, - "quickInfo": { + "item": { "kind": "", "kindModifiers": "", "textSpan": { @@ -152,7 +206,7 @@ "position": 92, "name": "2" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -310,7 +364,7 @@ "position": 155, "name": "3" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -344,7 +398,7 @@ "position": 228, "name": "4" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -378,7 +432,7 @@ "position": 258, "name": "5" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { @@ -412,7 +466,7 @@ "position": 320, "name": "6" }, - "quickInfo": { + "item": { "kind": "parameter", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.baseline b/tests/baselines/reference/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.baseline index f306f00cd2184..a0f4657820f18 100644 --- a/tests/baselines/reference/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.baseline +++ b/tests/baselines/reference/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.baseline @@ -1,3 +1,35 @@ +=== /tests/cases/fourslash/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.ts === +// export type DocumentFilter = { +// /** A language id, like `typescript`. */ +// language: string; +// /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */ +// scheme?: string; +// /** A glob pattern, like `*.{ts,js}`. */ +// pattern?: string; +// } | { +// /** A language id, like `typescript`. */ +// language?: string; +// /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */ +// scheme: string; +// /** A glob pattern, like `*.{ts,js}`. */ +// pattern?: string; +// } | { +// /** A language id, like `typescript`. */ +// language?: string; +// /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */ +// scheme?: string; +// /** A glob pattern, like `*.{ts,js}`. */ +// pattern: string; +// }; +// +// declare let x: DocumentFilter; +// x.language +// ^^^^^^^^ +// | ---------------------------------------------------------------------- +// | (property) language?: string +// | A language id, like `typescript`. +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +37,7 @@ "position": 746, "name": "" }, - "quickInfo": { + "item": { "kind": "property", "kindModifiers": "optional", "textSpan": { diff --git a/tests/baselines/reference/quickInfoSalsaMethodsOnAssignedFunctionExpressions.baseline b/tests/baselines/reference/quickInfoSalsaMethodsOnAssignedFunctionExpressions.baseline index 5e1abf0019c6e..6186029bbd8b3 100644 --- a/tests/baselines/reference/quickInfoSalsaMethodsOnAssignedFunctionExpressions.baseline +++ b/tests/baselines/reference/quickInfoSalsaMethodsOnAssignedFunctionExpressions.baseline @@ -1,3 +1,19 @@ +=== /tests/cases/fourslash/something.js === +// var C = function () { } +// /** +// * The prototype method. +// * @param {string} a Parameter definition. +// */ +// function f(a) {} +// C.prototype.m = f; +// +// var x = new C(); +// x.m(); +// ^ +// | ---------------------------------------------------------------------- +// | var x: C +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +21,7 @@ "position": 155, "name": "1" }, - "quickInfo": { + "item": { "kind": "var", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoSatisfiesTag.baseline b/tests/baselines/reference/quickInfoSatisfiesTag.baseline index 8f91bd95ca89d..692bb15ca8398 100644 --- a/tests/baselines/reference/quickInfoSatisfiesTag.baseline +++ b/tests/baselines/reference/quickInfoSatisfiesTag.baseline @@ -1,3 +1,12 @@ +=== /a.js === +// /** @satisfies {number} comment */ +// const a = 1; +// ^ +// | ---------------------------------------------------------------------- +// | const a: 1 +// | @satisfies {number} comment +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +14,7 @@ "position": 41, "name": "1" }, - "quickInfo": { + "item": { "kind": "const", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoThrowsTag.baseline b/tests/baselines/reference/quickInfoThrowsTag.baseline index 5ab73462e405f..9230f30868c71 100644 --- a/tests/baselines/reference/quickInfoThrowsTag.baseline +++ b/tests/baselines/reference/quickInfoThrowsTag.baseline @@ -1,3 +1,39 @@ +=== /tests/cases/fourslash/quickInfoThrowsTag.ts === +// class E extends Error {} +// +// /** +// * @throws {E} +// */ +// function f1() {} +// +// /** +// * @throws {E} description +// */ +// function f2() {} +// +// /** +// * @throws description +// */ +// function f3() {} +// f1() +// ^^ +// | ---------------------------------------------------------------------- +// | function f1(): void +// | @throws {E} +// | ---------------------------------------------------------------------- +// f2() +// ^^ +// | ---------------------------------------------------------------------- +// | function f2(): void +// | @throws {E} description +// | ---------------------------------------------------------------------- +// f3() +// ^^ +// | ---------------------------------------------------------------------- +// | function f3(): void +// | @throws description +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +41,7 @@ "position": 170, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -66,7 +102,7 @@ "position": 175, "name": "2" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -135,7 +171,7 @@ "position": 180, "name": "3" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/quickInfoTypedefTag.baseline b/tests/baselines/reference/quickInfoTypedefTag.baseline index c9dce5f682dc2..8400bfb988a91 100644 --- a/tests/baselines/reference/quickInfoTypedefTag.baseline +++ b/tests/baselines/reference/quickInfoTypedefTag.baseline @@ -1,3 +1,43 @@ +=== /tests/cases/fourslash/a.js === +// /** +// * The typedef tag should not appear in the quickinfo. +// * @typedef {{ foo: 'foo' }} Foo +// */ +// function f() { } +// f() +// ^ +// | ---------------------------------------------------------------------- +// | function f(): void +// | ---------------------------------------------------------------------- +// /** +// * A removed comment +// * @tag Usage shows that non-param tags in comments explain the typedef instead of using it +// * @typedef {{ nope: any }} Nope not here +// * @tag comment 2 +// */ +// function g() { } +// g() +// ^ +// | ---------------------------------------------------------------------- +// | function g(): void +// | ---------------------------------------------------------------------- +// /** +// * The whole thing is kept +// * @param {Local} keep +// * @typedef {{ local: any }} Local kept too +// * @returns {void} also kept +// */ +// function h(keep) { } +// h({ nope: 1 }) +// ^ +// | ---------------------------------------------------------------------- +// | function h(keep: Local): void +// | The whole thing is kept +// | @param keep +// | @typedef Local kept too +// | @returns also kept +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +45,7 @@ "position": 114, "name": "1" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -55,7 +95,7 @@ "position": 316, "name": "2" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { @@ -105,7 +145,7 @@ "position": 472, "name": "3" }, - "quickInfo": { + "item": { "kind": "function", "kindModifiers": "", "textSpan": { diff --git a/tests/baselines/reference/signatureHelpCommentsClass.baseline b/tests/baselines/reference/signatureHelpCommentsClass.baseline index b61e286693567..cd2cf216957f9 100644 --- a/tests/baselines/reference/signatureHelpCommentsClass.baseline +++ b/tests/baselines/reference/signatureHelpCommentsClass.baseline @@ -1,3 +1,91 @@ +=== /tests/cases/fourslash/signatureHelpCommentsClass.ts === +// /** This is class c2 without constructor*/ +// class c2 { +// } +// var i2 = new c2(); +// ^ +// | ---------------------------------------------------------------------- +// | c2(): c2 +// | ---------------------------------------------------------------------- +// var i2_c = c2; +// class c3 { +// /** Constructor comment*/ +// constructor() { +// } +// } +// var i3 = new c3(); +// ^ +// | ---------------------------------------------------------------------- +// | c3(): c3 +// | Constructor comment +// | ---------------------------------------------------------------------- +// var i3_c = c3; +// /** Class comment*/ +// class c4 { +// /** Constructor comment*/ +// constructor() { +// } +// } +// var i4 = new c4(); +// ^ +// | ---------------------------------------------------------------------- +// | c4(): c4 +// | Constructor comment +// | ---------------------------------------------------------------------- +// var i4_c = c4; +// /** Class with statics*/ +// class c5 { +// static s1: number; +// } +// var i5 = new c5(); +// ^ +// | ---------------------------------------------------------------------- +// | c5(): c5 +// | ---------------------------------------------------------------------- +// var i5_c = c5; +// /** class with statics and constructor*/ +// class c6 { +// /** s1 comment*/ +// static s1: number; +// /** constructor comment*/ +// constructor() { +// } +// } +// var i6 = new c6(); +// ^ +// | ---------------------------------------------------------------------- +// | c6(): c6 +// | constructor comment +// | ---------------------------------------------------------------------- +// var i6_c = c6; +// +// class a { +// /** +// constructor for a +// @param a this is my a +// */ +// constructor(a: string) { +// } +// } +// new a("Hello"); +// ^ +// | ---------------------------------------------------------------------- +// | a(**a: string**): a +// | constructor for a +// | @param a this is my a +// | ---------------------------------------------------------------------- +// module m { +// export module m2 { +// /** class comment */ +// export class c1 { +// /** constructor comment*/ +// constructor() { +// } +// } +// } +// } +// var myVar = new m.m2.c1(); + [ { "marker": { @@ -5,7 +93,7 @@ "position": 72, "name": "3" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -67,7 +155,7 @@ "position": 175, "name": "8" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -134,7 +222,7 @@ "position": 298, "name": "13" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -201,7 +289,7 @@ "position": 393, "name": "18" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -263,7 +351,7 @@ "position": 581, "name": "23" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -330,7 +418,7 @@ "position": 716, "name": "27" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/signatureHelpCommentsClassMembers.baseline b/tests/baselines/reference/signatureHelpCommentsClassMembers.baseline index a7e1b0524ad9b..976aa31706815 100644 --- a/tests/baselines/reference/signatureHelpCommentsClassMembers.baseline +++ b/tests/baselines/reference/signatureHelpCommentsClassMembers.baseline @@ -1,3 +1,213 @@ +=== /tests/cases/fourslash/signatureHelpCommentsClassMembers.ts === +// /** This is comment for c1*/ +// class c1 { +// /** p1 is property of c1*/ +// public p1: number; +// /** sum with property*/ +// public p2(/** number to add*/b: number) { +// return this.p1 + b; +// } +// /** getter property 1*/ +// public get p3() { +// return this.p2(this.p1); +// ^ +// | ---------------------------------------------------------------------- +// | p2(**b: number**): number +// | sum with property +// | ---------------------------------------------------------------------- +// } +// /** setter property 1*/ +// public set p3(/** this is value*/value: number) { +// this.p1 = this.p2(value); +// ^ +// | ---------------------------------------------------------------------- +// | p2(**b: number**): number +// | sum with property +// | ---------------------------------------------------------------------- +// } +// /** pp1 is property of c1*/ +// private pp1: number; +// /** sum with property*/ +// private pp2(/** number to add*/b: number) { +// return this.p1 + b; +// } +// /** getter property 2*/ +// private get pp3() { +// return this.pp2(this.pp1); +// ^ +// | ---------------------------------------------------------------------- +// | pp2(**b: number**): number +// | sum with property +// | ---------------------------------------------------------------------- +// } +// /** setter property 2*/ +// private set pp3( /** this is value*/value: number) { +// this.pp1 = this.pp2(value); +// ^ +// | ---------------------------------------------------------------------- +// | pp2(**b: number**): number +// | sum with property +// | ---------------------------------------------------------------------- +// } +// /** Constructor method*/ +// constructor() { +// } +// /** s1 is static property of c1*/ +// static s1: number; +// /** static sum with property*/ +// static s2(/** number to add*/b: number) { +// return c1.s1 + b; +// } +// /** static getter property*/ +// static get s3() { +// return c1.s2(c1.s1); +// ^ +// | ---------------------------------------------------------------------- +// | s2(**b: number**): number +// | static sum with property +// | ---------------------------------------------------------------------- +// } +// /** setter property 3*/ +// static set s3( /** this is value*/value: number) { +// c1.s1 = c1.s2(value); +// ^ +// | ---------------------------------------------------------------------- +// | s2(**b: number**): number +// | static sum with property +// | ---------------------------------------------------------------------- +// } +// public nc_p1: number; +// public nc_p2(b: number) { +// return this.nc_p1 + b; +// } +// public get nc_p3() { +// return this.nc_p2(this.nc_p1); +// ^ +// | ---------------------------------------------------------------------- +// | nc_p2(**b: number**): number +// | ---------------------------------------------------------------------- +// } +// public set nc_p3(value: number) { +// this.nc_p1 = this.nc_p2(value); +// ^ +// | ---------------------------------------------------------------------- +// | nc_p2(**b: number**): number +// | ---------------------------------------------------------------------- +// } +// private nc_pp1: number; +// private nc_pp2(b: number) { +// return this.nc_pp1 + b; +// } +// private get nc_pp3() { +// return this.nc_pp2(this.nc_pp1); +// ^ +// | ---------------------------------------------------------------------- +// | nc_pp2(**b: number**): number +// | ---------------------------------------------------------------------- +// } +// private set nc_pp3(value: number) { +// this.nc_pp1 = this.nc_pp2(value); +// ^ +// | ---------------------------------------------------------------------- +// | nc_pp2(**b: number**): number +// | ---------------------------------------------------------------------- +// } +// static nc_s1: number; +// static nc_s2(b: number) { +// return c1.nc_s1 + b; +// } +// static get nc_s3() { +// return c1.nc_s2(c1.nc_s1); +// ^ +// | ---------------------------------------------------------------------- +// | nc_s2(**b: number**): number +// | ---------------------------------------------------------------------- +// } +// static set nc_s3(value: number) { +// c1.nc_s1 = c1.nc_s2(value); +// ^ +// | ---------------------------------------------------------------------- +// | nc_s2(**b: number**): number +// | ---------------------------------------------------------------------- +// } +// } +// var i1 = new c1(); +// ^ +// | ---------------------------------------------------------------------- +// | c1(): c1 +// | Constructor method +// | ---------------------------------------------------------------------- +// var i1_p = i1.p1; +// var i1_f = i1.p2; +// var i1_r = i1.p2(20); +// ^ +// | ---------------------------------------------------------------------- +// | p2(**b: number**): number +// | sum with property +// | ---------------------------------------------------------------------- +// var i1_prop = i1.p3; +// i1.p3 = i1_prop; +// var i1_nc_p = i1.nc_p1; +// var i1_ncf = i1.nc_p2; +// var i1_ncr = i1.nc_p2(20); +// ^ +// | ---------------------------------------------------------------------- +// | nc_p2(**b: number**): number +// | ---------------------------------------------------------------------- +// var i1_ncprop = i1.nc_p3; +// i1.nc_p3 = i1_ncprop; +// var i1_s_p = c1.s1; +// var i1_s_f = c1.s2; +// var i1_s_r = c1.s2(20); +// ^ +// | ---------------------------------------------------------------------- +// | s2(**b: number**): number +// | static sum with property +// | ---------------------------------------------------------------------- +// var i1_s_prop = c1.s3; +// c1.s3 = i1_s_prop; +// var i1_s_nc_p = c1.nc_s1; +// var i1_s_ncf = c1.nc_s2; +// var i1_s_ncr = c1.nc_s2(20); +// ^ +// | ---------------------------------------------------------------------- +// | nc_s2(**b: number**): number +// | ---------------------------------------------------------------------- +// var i1_s_ncprop = c1.nc_s3; +// c1.nc_s3 = i1_s_ncprop; +// var i1_c = c1; +// +// class cProperties { +// private val: number; +// /** getter only property*/ +// public get p1() { +// return this.val; +// } +// public get nc_p1() { +// return this.val; +// } +// /**setter only property*/ +// public set p2(value: number) { +// this.val = value; +// } +// public set nc_p2(value: number) { +// this.val = value; +// } +// } +// var cProperties_i = new cProperties(); +// cProperties_i.p2 = cProperties_i.p1; +// cProperties_i.nc_p2 = cProperties_i.nc_p1; +// class cWithConstructorProperty { +// /** +// * this is class cWithConstructorProperty's constructor +// * @param a this is first parameter a +// */ +// constructor(/**more info about a*/public a: number) { +// var bbbb = 10; +// this.a = a + 2 + bbbb; +// } +// } + [ { "marker": { @@ -5,7 +215,7 @@ "position": 275, "name": "8" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -102,7 +312,7 @@ "position": 399, "name": "13" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -199,7 +409,7 @@ "position": 656, "name": "20" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -296,7 +506,7 @@ "position": 786, "name": "25" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -393,7 +603,7 @@ "position": 1105, "name": "35" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -490,7 +700,7 @@ "position": 1224, "name": "42" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -587,7 +797,7 @@ "position": 1382, "name": "47" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -674,7 +884,7 @@ "position": 1471, "name": "49" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -761,7 +971,7 @@ "position": 1637, "name": "54" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -848,7 +1058,7 @@ "position": 1731, "name": "56" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -935,7 +1145,7 @@ "position": 1885, "name": "61" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -1022,7 +1232,7 @@ "position": 1968, "name": "63" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -1109,7 +1319,7 @@ "position": 2000, "name": "65" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -1176,7 +1386,7 @@ "position": 2056, "name": "71" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -1273,7 +1483,7 @@ "position": 2168, "name": "81" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -1360,7 +1570,7 @@ "position": 2280, "name": "92" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -1457,7 +1667,7 @@ "position": 2402, "name": "102" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/signatureHelpCommentsCommentParsing.baseline b/tests/baselines/reference/signatureHelpCommentsCommentParsing.baseline index 7e9750044ed31..4d1c395b6cbb1 100644 --- a/tests/baselines/reference/signatureHelpCommentsCommentParsing.baseline +++ b/tests/baselines/reference/signatureHelpCommentsCommentParsing.baseline @@ -1,3 +1,446 @@ +=== /tests/cases/fourslash/signatureHelpCommentsCommentParsing.ts === +// /// This is simple /// comments +// function simple() { +// } +// +// simple( ); +// ^ +// | ---------------------------------------------------------------------- +// | simple(): void +// | ---------------------------------------------------------------------- +// +// /// multiLine /// Comments +// /// This is example of multiline /// comments +// /// Another multiLine +// function multiLine() { +// } +// multiLine( ); +// ^ +// | ---------------------------------------------------------------------- +// | multiLine(): void +// | ---------------------------------------------------------------------- +// +// /** this is eg of single line jsdoc style comment */ +// function jsDocSingleLine() { +// } +// jsDocSingleLine(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocSingleLine(): void +// | this is eg of single line jsdoc style comment +// | ---------------------------------------------------------------------- +// +// +// /** this is multiple line jsdoc stule comment +// *New line1 +// *New Line2*/ +// function jsDocMultiLine() { +// } +// jsDocMultiLine(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMultiLine(): void +// | this is multiple line jsdoc stule comment +// | New line1 +// | New Line2 +// | ---------------------------------------------------------------------- +// +// /** multiple line jsdoc comments no longer merge +// *New line1 +// *New Line2*/ +// /** Shoul mege this line as well +// * and this too*/ /** Another this one too*/ +// function jsDocMultiLineMerge() { +// } +// jsDocMultiLineMerge(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMultiLineMerge(): void +// | Another this one too +// | ---------------------------------------------------------------------- +// +// +// /// Triple slash comment +// /** jsdoc comment */ +// function jsDocMixedComments1() { +// } +// jsDocMixedComments1(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMixedComments1(): void +// | jsdoc comment +// | ---------------------------------------------------------------------- +// +// /// Triple slash comment +// /** jsdoc comment */ /** another jsDocComment*/ +// function jsDocMixedComments2() { +// } +// jsDocMixedComments2(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMixedComments2(): void +// | another jsDocComment +// | ---------------------------------------------------------------------- +// +// /** jsdoc comment */ /*** triplestar jsDocComment*/ +// /// Triple slash comment +// function jsDocMixedComments3() { +// } +// jsDocMixedComments3(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMixedComments3(): void +// | * triplestar jsDocComment +// | ---------------------------------------------------------------------- +// +// /** jsdoc comment */ /** another jsDocComment*/ +// /// Triple slash comment +// /// Triple slash comment 2 +// function jsDocMixedComments4() { +// } +// jsDocMixedComments4(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMixedComments4(): void +// | another jsDocComment +// | ---------------------------------------------------------------------- +// +// /// Triple slash comment 1 +// /** jsdoc comment */ /** another jsDocComment*/ +// /// Triple slash comment +// /// Triple slash comment 2 +// function jsDocMixedComments5() { +// } +// jsDocMixedComments5(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMixedComments5(): void +// | another jsDocComment +// | ---------------------------------------------------------------------- +// +// /** another jsDocComment*/ +// /// Triple slash comment 1 +// /// Triple slash comment +// /// Triple slash comment 2 +// /** jsdoc comment */ +// function jsDocMixedComments6() { +// } +// jsDocMixedComments6(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocMixedComments6(): void +// | jsdoc comment +// | ---------------------------------------------------------------------- +// +// // This shoulnot be help comment +// function noHelpComment1() { +// } +// noHelpComment1(); +// ^ +// | ---------------------------------------------------------------------- +// | noHelpComment1(): void +// | ---------------------------------------------------------------------- +// +// /* This shoulnot be help comment */ +// function noHelpComment2() { +// } +// noHelpComment2(); +// ^ +// | ---------------------------------------------------------------------- +// | noHelpComment2(): void +// | ---------------------------------------------------------------------- +// +// function noHelpComment3() { +// } +// noHelpComment3(); +// ^ +// | ---------------------------------------------------------------------- +// | noHelpComment3(): void +// | ---------------------------------------------------------------------- +// /** Adds two integers and returns the result +// * @param {number} a first number +// * @param b second number +// */ +// function sum(a: number, b: number) { +// return a + b; +// } +// sum(10, 20); +// ^ +// | ---------------------------------------------------------------------- +// | sum(**a: number**, b: number): number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | sum(a: number, **b: number**): number +// | Adds two integers and returns the result +// | @param a first number +// | @param b second number +// | ---------------------------------------------------------------------- +// /** This is multiplication function +// * @param +// * @param a first number +// * @param b +// * @param c { +// @param d @anotherTag +// * @param e LastParam @anotherTag*/ +// function multiply(a: number, b: number, c?: number, d?, e?) { +// } +// multiply(10, 20, 30, 40, 50); +// ^ +// | ---------------------------------------------------------------------- +// | multiply(**a: number**, b: number, c?: number, d?: any, e?: any): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | multiply(a: number, **b: number**, c?: number, d?: any, e?: any): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | multiply(a: number, b: number, **c?: number**, d?: any, e?: any): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | multiply(a: number, b: number, c?: number, **d?: any**, e?: any): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | multiply(a: number, b: number, c?: number, d?: any, **e?: any**): void +// | This is multiplication function +// | @param +// | @param a first number +// | @param b +// | @param c +// | @param d +// | @anotherTag +// | @param e LastParam +// | @anotherTag +// | ---------------------------------------------------------------------- +// /** fn f1 with number +// * @param { string} b about b +// */ +// function f1(a: number); +// function f1(b: string); +// /**@param opt optional parameter*/ +// function f1(aOrb, opt?) { +// return aOrb; +// } +// f1(10); +// ^ +// | ---------------------------------------------------------------------- +// | f1(**a: number**): any +// | fn f1 with number +// | @param b about b +// | ---------------------------------------------------------------------- +// f1("hello"); +// ^ +// | ---------------------------------------------------------------------- +// | f1(**b: string**): any +// | ---------------------------------------------------------------------- +// +// /** This is subtract function +// @param { a +// *@param { number | } b this is about b +// @param { { () => string; } } c this is optional param c +// @param { { () => string; } d this is optional param d +// @param { { () => string; } } e this is optional param e +// @param { { { () => string; } } f this is optional param f +// */ +// function subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string) { +// } +// subtract(10, 20, null, null, null, null); +// ^ +// | ---------------------------------------------------------------------- +// | subtract(**a: number**, b: number, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | subtract(a: number, **b: number**, c?: () => string, d?: () => string, e?: () => string, f?: () => string): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | subtract(a: number, b: number, **c?: () => string**, d?: () => string, e?: () => string, f?: () => string): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | subtract(a: number, b: number, c?: () => string, **d?: () => string**, e?: () => string, f?: () => string): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | subtract(a: number, b: number, c?: () => string, d?: () => string, **e?: () => string**, f?: () => string): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | subtract(a: number, b: number, c?: () => string, d?: () => string, e?: () => string, **f?: () => string**): void +// | This is subtract function +// | @param +// | @param b this is about b +// | @param c this is optional param c +// | @param d this is optional param d +// | @param e this is optional param e +// | @param { () => string; } } f this is optional param f +// | ---------------------------------------------------------------------- +// /** this is square function +// @paramTag { number } a this is input number of paramTag +// @param { number } a this is input number +// @returnType { number } it is return type +// */ +// function square(a: number) { +// return a * a; +// } +// square(10); +// ^ +// | ---------------------------------------------------------------------- +// | square(**a: number**): number +// | this is square function +// | @paramTag { number } a this is input number of paramTag +// | @param a this is input number +// | @returnType { number } it is return type +// | ---------------------------------------------------------------------- +// /** this is divide function +// @param { number} a this is a +// @paramTag { number } g this is optional param g +// @param { number} b this is b +// */ +// function divide(a: number, b: number) { +// } +// divide(10, 20); +// ^ +// | ---------------------------------------------------------------------- +// | divide(**a: number**, b: number): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | divide(a: number, **b: number**): void +// | this is divide function +// | @param a this is a +// | @paramTag { number } g this is optional param g +// | @param b this is b +// | ---------------------------------------------------------------------- +// /** +// Function returns string concat of foo and bar +// @param {string} foo is string +// @param {string} bar is second string +// */ +// function fooBar(foo: string, bar: string) { +// return foo + bar; +// } +// fooBar("foo","bar"); +// ^ +// | ---------------------------------------------------------------------- +// | fooBar(**foo: string**, bar: string): string +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | fooBar(foo: string, **bar: string**): string +// | Function returns string concat of foo and bar +// | @param foo is string +// | @param bar is second string +// | ---------------------------------------------------------------------- +// /** This is a comment */ +// var x; +// /** +// * This is a comment +// */ +// var y; +// /** this is jsdoc style function with param tag as well as inline parameter help +// *@param a it is first parameter +// *@param c it is third parameter +// */ +// function jsDocParamTest(/** this is inline comment for a */a: number, /** this is inline comment for b*/ b: number, c: number, d: number) { +// return a + b + c + d; +// ^ +// | ---------------------------------------------------------------------- +// | No signature help at /*39*/. +// | ---------------------------------------------------------------------- +// } +// jsDocParamTest(30, 40, 50, 60); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocParamTest(**a: number**, b: number, c: number, d: number): number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | jsDocParamTest(a: number, **b: number**, c: number, d: number): number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | jsDocParamTest(a: number, b: number, **c: number**, d: number): number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | jsDocParamTest(a: number, b: number, c: number, **d: number**): number +// | this is jsdoc style function with param tag as well as inline parameter help +// | @param a it is first parameter +// | @param c it is third parameter +// | ---------------------------------------------------------------------- +// /** This is function comment +// * And properly aligned comment +// */ +// function jsDocCommentAlignmentTest1() { +// } +// jsDocCommentAlignmentTest1(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocCommentAlignmentTest1(): void +// | This is function comment +// | And properly aligned comment +// | ---------------------------------------------------------------------- +// /** This is function comment +// * And aligned with 4 space char margin +// */ +// function jsDocCommentAlignmentTest2() { +// } +// jsDocCommentAlignmentTest2(); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocCommentAlignmentTest2(): void +// | This is function comment +// | And aligned with 4 space char margin +// | ---------------------------------------------------------------------- +// /** This is function comment +// * And aligned with 4 space char margin +// * @param {string} a this is info about a +// * spanning on two lines and aligned perfectly +// * @param b this is info about b +// * spanning on two lines and aligned perfectly +// * spanning one more line alined perfectly +// * spanning another line with more margin +// * @param c this is info about b +// * not aligned text about parameter will eat only one space +// */ +// function jsDocCommentAlignmentTest3(a: string, b, c) { +// } +// jsDocCommentAlignmentTest3("hello",1, 2); +// ^ +// | ---------------------------------------------------------------------- +// | jsDocCommentAlignmentTest3(**a: string**, b: any, c: any): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | jsDocCommentAlignmentTest3(a: string, **b: any**, c: any): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | jsDocCommentAlignmentTest3(a: string, b: any, **c: any**): void +// | This is function comment +// | And aligned with 4 space char margin +// | @param a this is info about a +// | spanning on two lines and aligned perfectly +// | @param b this is info about b +// | spanning on two lines and aligned perfectly +// | spanning one more line alined perfectly +// | spanning another line with more margin +// | @param c this is info about b +// | not aligned text about parameter will eat only one space +// | ---------------------------------------------------------------------- +// +// ^ +// | ---------------------------------------------------------------------- +// | No signature help at /**/. +// | ---------------------------------------------------------------------- +// class NoQuickInfoClass { +// } + [ { "marker": { @@ -5,7 +448,7 @@ "position": 63, "name": "1" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -67,7 +510,7 @@ "position": 198, "name": "2" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -129,7 +572,7 @@ "position": 302, "name": "3" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -196,7 +639,7 @@ "position": 422, "name": "4" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -263,7 +706,7 @@ "position": 631, "name": "5" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -330,7 +773,7 @@ "position": 737, "name": "6" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -397,7 +840,7 @@ "position": 869, "name": "7" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -464,7 +907,7 @@ "position": 1005, "name": "8" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -531,7 +974,7 @@ "position": 1164, "name": "9" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -598,7 +1041,7 @@ "position": 1350, "name": "10" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -665,7 +1108,7 @@ "position": 1536, "name": "11" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -732,7 +1175,7 @@ "position": 1618, "name": "12" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -794,7 +1237,7 @@ "position": 1703, "name": "13" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -856,7 +1299,7 @@ "position": 1752, "name": "14" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -918,7 +1361,7 @@ "position": 1928, "name": "16" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -1079,7 +1522,7 @@ "position": 1932, "name": "17" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -1240,7 +1683,7 @@ "position": 2166, "name": "19" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -1527,7 +1970,7 @@ "position": 2169, "name": "20" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -1814,7 +2257,7 @@ "position": 2173, "name": "21" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -2101,7 +2544,7 @@ "position": 2178, "name": "22" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -2388,7 +2831,7 @@ "position": 2182, "name": "23" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -2675,7 +3118,7 @@ "position": 2372, "name": "25" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -2854,7 +3297,7 @@ "position": 2380, "name": "26" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -3033,7 +3476,7 @@ "position": 2823, "name": "28" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -3456,7 +3899,7 @@ "position": 2827, "name": "29" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -3879,7 +4322,7 @@ "position": 2832, "name": "30" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -4302,7 +4745,7 @@ "position": 2839, "name": "31" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -4725,7 +5168,7 @@ "position": 2846, "name": "32" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -5148,7 +5591,7 @@ "position": 2853, "name": "33" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -5571,7 +6014,7 @@ "position": 3085, "name": "34" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -5704,7 +6147,7 @@ "position": 3276, "name": "35" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -5874,7 +6317,7 @@ "position": 3280, "name": "36" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -6044,7 +6487,7 @@ "position": 3491, "name": "37" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -6205,7 +6648,7 @@ "position": 3497, "name": "38" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -6373,7 +6816,7 @@ "position": 3906, "name": "40" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -6595,7 +7038,7 @@ "position": 3910, "name": "41" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -6817,7 +7260,7 @@ "position": 3914, "name": "42" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -7039,7 +7482,7 @@ "position": 3918, "name": "43" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -7261,7 +7704,7 @@ "position": 4059, "name": "45" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -7328,7 +7771,7 @@ "position": 4210, "name": "46" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -7395,7 +7838,7 @@ "position": 4826, "name": "47" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -7602,7 +8045,7 @@ "position": 4834, "name": "48" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -7809,7 +8252,7 @@ "position": 4837, "name": "49" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/signatureHelpCommentsFunctionDeclaration.baseline b/tests/baselines/reference/signatureHelpCommentsFunctionDeclaration.baseline index ae0df4a76e18c..2e09ffe321777 100644 --- a/tests/baselines/reference/signatureHelpCommentsFunctionDeclaration.baseline +++ b/tests/baselines/reference/signatureHelpCommentsFunctionDeclaration.baseline @@ -1,3 +1,42 @@ +=== /tests/cases/fourslash/signatureHelpCommentsFunctionDeclaration.ts === +// /** This comment should appear for foo*/ +// function foo() { +// } +// foo(); +// ^ +// | ---------------------------------------------------------------------- +// | foo(): void +// | This comment should appear for foo +// | ---------------------------------------------------------------------- +// /** This is comment for function signature*/ +// function fooWithParameters(/** this is comment about a*/a: string, +// /** this is comment for b*/ +// b: number) { +// var d = a; +// } +// fooWithParameters("a",10); +// ^ +// | ---------------------------------------------------------------------- +// | fooWithParameters(**a: string**, b: number): void +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | fooWithParameters(a: string, **b: number**): void +// | This is comment for function signature +// | ---------------------------------------------------------------------- +// /** +// * Does something +// * @param a a string +// */ +// declare function fn(a: string); +// fn("hello"); +// ^ +// | ---------------------------------------------------------------------- +// | fn(**a: string**): any +// | Does something +// | @param a a string +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +44,7 @@ "position": 64, "name": "4" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -72,7 +111,7 @@ "position": 263, "name": "10" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -198,7 +237,7 @@ "position": 267, "name": "11" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -324,7 +363,7 @@ "position": 351, "name": "12" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/signatureHelpCommentsFunctionExpression.baseline b/tests/baselines/reference/signatureHelpCommentsFunctionExpression.baseline index 61cf0188c30f0..87b967bb589a3 100644 --- a/tests/baselines/reference/signatureHelpCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/signatureHelpCommentsFunctionExpression.baseline @@ -1,3 +1,51 @@ +=== /tests/cases/fourslash/signatureHelpCommentsFunctionExpression.ts === +// /** lambdaFoo var comment*/ +// var lambdaFoo = /** this is lambda comment*/ (/**param a*/a: number, /**param b*/b: number) => a + b; +// var lambddaNoVarComment = /** this is lambda multiplication*/ (/**param a*/a: number, /**param b*/b: number) => a * b; +// lambdaFoo(10, 20); +// ^ +// | ---------------------------------------------------------------------- +// | lambdaFoo(**a: number**, b: number): number +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | lambdaFoo(a: number, **b: number**): number +// | this is lambda comment +// | lambdaFoo var comment +// | ---------------------------------------------------------------------- +// function anotherFunc(a: number) { +// /** documentation +// @param b {string} inner parameter */ +// var lambdaVar = /** inner docs */(b: string) => { +// var localVar = "Hello "; +// return localVar + b; +// } +// return lambdaVar("World") + a; +// } +// /** +// * On variable +// * @param s the first parameter! +// * @returns the parameter's length +// */ +// var assigned = /** +// * Summary on expression +// * @param s param on expression +// * @returns return on expression +// */function(/** On parameter */s: string) { +// return s.length; +// } +// assigned("hey"); +// ^ +// | ---------------------------------------------------------------------- +// | assigned(**s: string**): number +// | Summary on expression +// | On variable +// | @param s param on expression +// | @returns return on expression +// | @param s the first parameter! +// | @returns the parameter's length +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +53,7 @@ "position": 259, "name": "5" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -139,7 +187,7 @@ "position": 263, "name": "6" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -273,7 +321,7 @@ "position": 862, "name": "18" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/signatureHelpConstructorCallParamProperties.baseline b/tests/baselines/reference/signatureHelpConstructorCallParamProperties.baseline index d99bf82ceaa31..3c53b2a872226 100644 --- a/tests/baselines/reference/signatureHelpConstructorCallParamProperties.baseline +++ b/tests/baselines/reference/signatureHelpConstructorCallParamProperties.baseline @@ -1,3 +1,20 @@ +=== /tests/cases/fourslash/signatureHelpConstructorCallParamProperties.ts === +// class Circle { +// /** +// * Initialize a circle. +// * @param radius The radius of the circle. +// */ +// constructor(private radius: number) { +// } +// } +// var a = new Circle( +// ^ +// | ---------------------------------------------------------------------- +// | Circle(**radius: number**): Circle +// | Initialize a circle. +// | @param radius The radius of the circle. +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +22,7 @@ "position": 179, "name": "" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/signatureHelpJSDocCallbackTag.baseline b/tests/baselines/reference/signatureHelpJSDocCallbackTag.baseline index 640c0c7dc1e79..504c321e9addf 100644 --- a/tests/baselines/reference/signatureHelpJSDocCallbackTag.baseline +++ b/tests/baselines/reference/signatureHelpJSDocCallbackTag.baseline @@ -1,3 +1,42 @@ +=== /tests/cases/fourslash/server/jsdocCallbackTag.js === +// /** +// * @callback FooHandler - A kind of magic +// * @param {string} eventName - So many words +// * @param eventName2 {number | string} - Silence is golden +// * @param eventName3 - Osterreich mos def +// * @return {number} - DIVEKICK +// */ +// /** +// * @type {FooHandler} callback +// */ +// var t; +// +// /** +// * @callback FooHandler2 - What, another one? +// * @param {string=} eventName - it keeps happening +// * @param {string} [eventName2] - i WARNED you dog +// */ +// /** +// * @type {FooHandler2} callback +// */ +// var t2; +// t("!", 12, false); +// ^ +// | ---------------------------------------------------------------------- +// | t(**eventName: string**, eventName2: string | number, eventName3: any): number +// | @type {FooHandler} callback +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | t(eventName: string, **eventName2: string | number**, eventName3: any): number +// | @type {FooHandler} callback +// | ---------------------------------------------------------------------- +// ^ +// | ---------------------------------------------------------------------- +// | t(eventName: string, eventName2: string | number, **eventName3: any**): number +// | @type {FooHandler} callback +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +44,7 @@ "position": 480, "name": "4" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -187,7 +226,7 @@ "position": 485, "name": "5" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -369,7 +408,7 @@ "position": 489, "name": "6" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/signatureHelpJSDocTags.baseline b/tests/baselines/reference/signatureHelpJSDocTags.baseline index aa9108406a593..c7153917d6c86 100644 --- a/tests/baselines/reference/signatureHelpJSDocTags.baseline +++ b/tests/baselines/reference/signatureHelpJSDocTags.baseline @@ -1,3 +1,85 @@ +=== /tests/cases/fourslash/signatureHelpJSDocTags.ts === +// /** +// * This is class Foo. +// * @mytag comment1 comment2 +// */ +// class Foo { +// /** +// * This is the constructor. +// * @myjsdoctag this is a comment +// */ +// constructor(value: number) {} +// /** +// * method1 documentation +// * @mytag comment1 comment2 +// */ +// static method1() {} +// /** +// * @mytag +// */ +// method2() {} +// /** +// * @mytag comment1 comment2 +// */ +// property1: string; +// /** +// * @mytag1 some comments +// * some more comments about mytag1 +// * @mytag2 +// * here all the comments are on a new line +// * @mytag3 +// * @mytag +// */ +// property2: number; +// /** +// * @returns {number} a value +// */ +// method3(): number { return 3; } +// /** +// * @param {string} foo A value. +// * @returns {number} Another value +// * @mytag +// */ +// method4(foo: string): number { return 3; } +// /** @mytag */ +// method5() {} +// /** method documentation +// * @mytag a JSDoc tag +// */ +// newMethod() {} +// } +// var foo = new Foo(4); +// ^ +// | ---------------------------------------------------------------------- +// | Foo(**value: number**): Foo +// | This is the constructor. +// | @myjsdoctag this is a comment +// | ---------------------------------------------------------------------- +// Foo.method1(); +// ^ +// | ---------------------------------------------------------------------- +// | method1(): void +// | method1 documentation +// | @mytag comment1 comment2 +// | ---------------------------------------------------------------------- +// foo.method2(); +// ^ +// | ---------------------------------------------------------------------- +// | method2(): void +// | @mytag +// | ---------------------------------------------------------------------- +// foo.method3(); +// ^ +// | ---------------------------------------------------------------------- +// | method3(): number +// | @returns a value +// | ---------------------------------------------------------------------- +// foo.method4(); +// foo.property1; +// foo.property2; +// foo.method5(); +// foo.newMet + [ { "marker": { @@ -5,7 +87,7 @@ "position": 981, "name": "10" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -107,7 +189,7 @@ "position": 997, "name": "11" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -184,7 +266,7 @@ "position": 1012, "name": "12" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -250,7 +332,7 @@ "position": 1027, "name": "13" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline b/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline index 67dfa434799d7..8fa5f4b2f0d72 100644 --- a/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline +++ b/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline @@ -1,3 +1,13 @@ +=== /tests/cases/fourslash/test.js === +// foo.filter() +// ^ +// | ---------------------------------------------------------------------- +// | ReadonlyArray.filter(**predicate: (value: T, index: number, array: readonly T[]) => value is S**, thisArg?: any): S[] +// | Returns the elements of an array that meet the condition specified in a callback function. +// | @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. +// | @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +15,7 @@ "position": 11, "name": "" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/signatureHelpTypeArguments2.baseline b/tests/baselines/reference/signatureHelpTypeArguments2.baseline index 7e70e96ada6a5..b2e999604dafa 100644 --- a/tests/baselines/reference/signatureHelpTypeArguments2.baseline +++ b/tests/baselines/reference/signatureHelpTypeArguments2.baseline @@ -1,3 +1,57 @@ +=== /tests/cases/fourslash/signatureHelpTypeArguments2.ts === +// /** some documentation +// * @template T some documentation 2 +// * @template W +// * @template U,V others +// * @param a ok +// * @param b not ok +// */ +// function f(a: number, b: string, c: boolean): void { } +// f<; +// ^ +// | ---------------------------------------------------------------------- +// | f<**T**, U, V, W>(a: number, b: string, c: boolean): void +// | some documentation +// | @template T some documentation 2 +// | @template W +// | @template U, V others +// | @param a ok +// | @param b not ok +// | ---------------------------------------------------------------------- +// f(a: number, b: string, c: boolean): void +// | some documentation +// | @template T some documentation 2 +// | @template W +// | @template U, V others +// | @param a ok +// | @param b not ok +// | ---------------------------------------------------------------------- +// f(a: number, b: string, c: boolean): void +// | some documentation +// | @template T some documentation 2 +// | @template W +// | @template U, V others +// | @param a ok +// | @param b not ok +// | ---------------------------------------------------------------------- +// f(a: number, b: string, c: boolean): void +// | some documentation +// | @template T some documentation 2 +// | @template W +// | @template U, V others +// | @param a ok +// | @param b not ok +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +59,7 @@ "position": 205, "name": "f0" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -298,7 +352,7 @@ "position": 217, "name": "f1" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -591,7 +645,7 @@ "position": 237, "name": "f2" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -884,7 +938,7 @@ "position": 266, "name": "f3" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/signatureHelpWithUnknown.baseline b/tests/baselines/reference/signatureHelpWithUnknown.baseline index 4a9c81e46906e..c78887cdbac49 100644 --- a/tests/baselines/reference/signatureHelpWithUnknown.baseline +++ b/tests/baselines/reference/signatureHelpWithUnknown.baseline @@ -1,3 +1,12 @@ +=== /tests/cases/fourslash/signatureHelpWithUnknown.ts === +// eval(\ +// ^ +// | ---------------------------------------------------------------------- +// | eval(**x: string**): any +// | Evaluates JavaScript code and executes it. +// | @param x A String value that contains valid JavaScript code. +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +14,7 @@ "position": 6, "name": "1" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/signatureHelp_unionType.baseline b/tests/baselines/reference/signatureHelp_unionType.baseline index 17ba6f279be38..feea6c66a9af5 100644 --- a/tests/baselines/reference/signatureHelp_unionType.baseline +++ b/tests/baselines/reference/signatureHelp_unionType.baseline @@ -1,3 +1,33 @@ +=== /tests/cases/fourslash/signatureHelp_unionType.ts === +// declare const a: (fn?: ((x: string) => string) | ((y: number) => number)) => void; +// declare const b: (x: string | number) => void; +// +// interface Callback { +// (x: string): string; +// (x: number): number; +// (x: string | number): string | number; +// } +// declare function c(callback: Callback): void; +// a(() => { +// ^ +// | ---------------------------------------------------------------------- +// | a(**fn?: ((x: string) => string) | ((y: number) => number)**): void +// | ---------------------------------------------------------------------- +// return undefined; +// }); +// +// b(); +// ^ +// | ---------------------------------------------------------------------- +// | b(**x: string | number**): void +// | ---------------------------------------------------------------------- +// +// c(() => {}); +// ^ +// | ---------------------------------------------------------------------- +// | Callback(**x: string | number**): string | number +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +35,7 @@ "position": 296, "name": "1" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -200,7 +230,7 @@ "position": 332, "name": "2" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -303,7 +333,7 @@ "position": 339, "name": "3" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/baselines/reference/trailingCommaSignatureHelp.baseline b/tests/baselines/reference/trailingCommaSignatureHelp.baseline index 628d1a322d60b..327474709ebd8 100644 --- a/tests/baselines/reference/trailingCommaSignatureHelp.baseline +++ b/tests/baselines/reference/trailingCommaSignatureHelp.baseline @@ -1,3 +1,27 @@ +=== /tests/cases/fourslash/trailingCommaSignatureHelp.ts === +// function str(n: number): string; +// /** +// * Stringifies a number with radix +// * @param radix The radix +// */ +// function str(n: number, radix: number): string; +// function str(n: number, radix?: number): string { return ""; } +// +// str(1, ) +// ^ +// | ---------------------------------------------------------------------- +// | str(n: number, **radix: number**): string +// | Stringifies a number with radix +// | @param radix The radix +// | ---------------------------------------------------------------------- +// +// declare function f(a: T): T; +// f(2, ); +// ^ +// | ---------------------------------------------------------------------- +// | f(a: 2): 2 +// | ---------------------------------------------------------------------- + [ { "marker": { @@ -5,7 +29,7 @@ "position": 221, "name": "a" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, @@ -213,7 +237,7 @@ "position": 261, "name": "b" }, - "signatureHelp": { + "item": { "items": [ { "isVariadic": false, diff --git a/tests/cases/fourslash/completionsClassMembers1.ts b/tests/cases/fourslash/completionsClassMembers1.ts index 094039a61853c..af568de8d08c2 100644 --- a/tests/cases/fourslash/completionsClassMembers1.ts +++ b/tests/cases/fourslash/completionsClassMembers1.ts @@ -6,7 +6,6 @@ //// ////export class C implements I { //// property = "foo" -//// //// /**/ ////} diff --git a/tests/cases/fourslash/completionsClassMembers2.ts b/tests/cases/fourslash/completionsClassMembers2.ts index 039334e14c735..0aa36901428f0 100644 --- a/tests/cases/fourslash/completionsClassMembers2.ts +++ b/tests/cases/fourslash/completionsClassMembers2.ts @@ -6,7 +6,6 @@ //// ////export class C implements I { //// property = "foo" -//// //// /**/ ////} diff --git a/tests/cases/fourslash/completionsClassMembers3.ts b/tests/cases/fourslash/completionsClassMembers3.ts index f648ef0ab433d..bb8e36ee6290b 100644 --- a/tests/cases/fourslash/completionsClassMembers3.ts +++ b/tests/cases/fourslash/completionsClassMembers3.ts @@ -6,7 +6,6 @@ //// ////export class C implements I { //// property = "foo" + "foo" -//// //// /**/ ////} diff --git a/tests/cases/fourslash/jsDocTypedefQuickInfo1.ts b/tests/cases/fourslash/jsDocTypedefQuickInfo1.ts index eea17f182e96a..3a5e8f45c2871 100644 --- a/tests/cases/fourslash/jsDocTypedefQuickInfo1.ts +++ b/tests/cases/fourslash/jsDocTypedefQuickInfo1.ts @@ -12,7 +12,7 @@ //// */ //// function foo(/*1*/opts) { //// opts.x; -///// } +//// } //// foo({x: 'abc'}); @@ -30,4 +30,4 @@ //// } //// foo1({x: 'abc'}); -verify.baselineQuickInfo(); \ No newline at end of file +verify.baselineQuickInfo();