fix symbol display for computed properties

This commit is contained in:
Ron Buckton
2017-05-02 17:34:08 -07:00
parent 3b684d420f
commit 64fd857b0d
21 changed files with 73 additions and 69 deletions

View File

@@ -2898,7 +2898,7 @@ namespace ts {
function getNameOfSymbol(symbol: Symbol): string {
if (symbol.flags & SymbolFlags.Dynamic) {
return unescapeIdentifier(symbol.name);
return `"${escapeString(unescapeIdentifier(symbol.name))}"`;
}
if (symbol.declarations && symbol.declarations.length) {
const declaration = symbol.declarations[0];
@@ -2940,14 +2940,18 @@ namespace ts {
const needsElementAccess = !isIdentifierStart(firstChar, languageVersion);
if (needsElementAccess) {
writePunctuation(writer, SyntaxKind.OpenBracketToken);
if (firstChar !== CharacterCodes.openBracket) {
writePunctuation(writer, SyntaxKind.OpenBracketToken);
}
if (isSingleOrDoubleQuote(firstChar)) {
writer.writeStringLiteral(symbolName);
}
else {
writer.writeSymbol(symbolName, symbol);
}
writePunctuation(writer, SyntaxKind.CloseBracketToken);
if (firstChar !== CharacterCodes.openBracket) {
writePunctuation(writer, SyntaxKind.CloseBracketToken);
}
}
else {
writePunctuation(writer, SyntaxKind.DotToken);
@@ -5232,7 +5236,7 @@ namespace ts {
const nameType = checkComputedPropertyName(<ComputedPropertyName>member.name);
if (nameType.flags & TypeFlags.StringOrNumberLiteral) {
// TODO(rbuckton): ESSymbolLiteral
const memberName = escapeIdentifier((<LiteralType>nameType).text);
const memberName = (<LiteralType>nameType).text;
let symbol = symbolTable.get(memberName);
if (!symbol) {
symbolTable.set(memberName, symbol = createSymbol(SymbolFlags.Dynamic, memberName));

View File

@@ -29,10 +29,10 @@ class C {
>s : Symbol(s, Decl(computedPropertyNames13_ES5.ts, 0, 3))
static [""]() { }
>"" : Symbol(C[[""]], Decl(computedPropertyNames13_ES5.ts, 8, 14))
>"" : Symbol(C[""], Decl(computedPropertyNames13_ES5.ts, 8, 14))
[0]() { }
>0 : Symbol(C[[0]], Decl(computedPropertyNames13_ES5.ts, 9, 21))
>0 : Symbol(C[0], Decl(computedPropertyNames13_ES5.ts, 9, 21))
[a]() { }
>a : Symbol(a, Decl(computedPropertyNames13_ES5.ts, 2, 3))

View File

@@ -29,10 +29,10 @@ class C {
>s : Symbol(s, Decl(computedPropertyNames13_ES6.ts, 0, 3))
static [""]() { }
>"" : Symbol(C[[""]], Decl(computedPropertyNames13_ES6.ts, 8, 14))
>"" : Symbol(C[""], Decl(computedPropertyNames13_ES6.ts, 8, 14))
[0]() { }
>0 : Symbol(C[[0]], Decl(computedPropertyNames13_ES6.ts, 9, 21))
>0 : Symbol(C[0], Decl(computedPropertyNames13_ES6.ts, 9, 21))
[a]() { }
>a : Symbol(a, Decl(computedPropertyNames13_ES6.ts, 2, 3))

View File

@@ -31,11 +31,11 @@ class C {
>s : Symbol(s, Decl(computedPropertyNames16_ES5.ts, 0, 3))
static set [""](v) { }
>"" : Symbol(C[[""]], Decl(computedPropertyNames16_ES5.ts, 8, 28))
>"" : Symbol(C[""], Decl(computedPropertyNames16_ES5.ts, 8, 28))
>v : Symbol(v, Decl(computedPropertyNames16_ES5.ts, 9, 20))
get [0]() { return 0; }
>0 : Symbol(C[[0]], Decl(computedPropertyNames16_ES5.ts, 9, 26))
>0 : Symbol(C[0], Decl(computedPropertyNames16_ES5.ts, 9, 26))
set [a](v) { }
>a : Symbol(a, Decl(computedPropertyNames16_ES5.ts, 2, 3))

View File

@@ -31,11 +31,11 @@ class C {
>s : Symbol(s, Decl(computedPropertyNames16_ES6.ts, 0, 3))
static set [""](v) { }
>"" : Symbol(C[[""]], Decl(computedPropertyNames16_ES6.ts, 8, 28))
>"" : Symbol(C[""], Decl(computedPropertyNames16_ES6.ts, 8, 28))
>v : Symbol(v, Decl(computedPropertyNames16_ES6.ts, 9, 20))
get [0]() { return 0; }
>0 : Symbol(C[[0]], Decl(computedPropertyNames16_ES6.ts, 9, 26))
>0 : Symbol(C[0], Decl(computedPropertyNames16_ES6.ts, 9, 26))
set [a](v) { }
>a : Symbol(a, Decl(computedPropertyNames16_ES6.ts, 2, 3))

View File

@@ -17,11 +17,11 @@ class C {
// Computed properties
get ["get1"]() { return new Foo }
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames37_ES5.ts, 4, 22))
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames37_ES5.ts, 4, 22))
>Foo : Symbol(Foo, Decl(computedPropertyNames37_ES5.ts, 0, 0))
set ["set1"](p: Foo2) { }
>"set1" : Symbol(C[["set1"]], Decl(computedPropertyNames37_ES5.ts, 7, 37))
>"set1" : Symbol(C["set1"], Decl(computedPropertyNames37_ES5.ts, 7, 37))
>p : Symbol(p, Decl(computedPropertyNames37_ES5.ts, 8, 17))
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames37_ES5.ts, 0, 15))
}

View File

@@ -17,11 +17,11 @@ class C {
// Computed properties
get ["get1"]() { return new Foo }
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames37_ES6.ts, 4, 22))
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames37_ES6.ts, 4, 22))
>Foo : Symbol(Foo, Decl(computedPropertyNames37_ES6.ts, 0, 0))
set ["set1"](p: Foo2) { }
>"set1" : Symbol(C[["set1"]], Decl(computedPropertyNames37_ES6.ts, 7, 37))
>"set1" : Symbol(C["set1"], Decl(computedPropertyNames37_ES6.ts, 7, 37))
>p : Symbol(p, Decl(computedPropertyNames37_ES6.ts, 8, 17))
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames37_ES6.ts, 0, 15))
}

View File

@@ -17,6 +17,6 @@ class C {
// Computed properties
static [""]() { return new Foo }
>"" : Symbol(C[[""]], Decl(computedPropertyNames41_ES5.ts, 4, 28))
>"" : Symbol(C[""], Decl(computedPropertyNames41_ES5.ts, 4, 28))
>Foo : Symbol(Foo, Decl(computedPropertyNames41_ES5.ts, 0, 0))
}

View File

@@ -17,6 +17,6 @@ class C {
// Computed properties
static [""]() { return new Foo }
>"" : Symbol(C[[""]], Decl(computedPropertyNames41_ES6.ts, 4, 28))
>"" : Symbol(C[""], Decl(computedPropertyNames41_ES6.ts, 4, 28))
>Foo : Symbol(Foo, Decl(computedPropertyNames41_ES6.ts, 0, 0))
}

View File

@@ -3,12 +3,12 @@ class C {
>C : Symbol(C, Decl(computedPropertyNamesSourceMap1_ES5.ts, 0, 0))
["hello"]() {
>"hello" : Symbol(C[["hello"]], Decl(computedPropertyNamesSourceMap1_ES5.ts, 0, 9))
>"hello" : Symbol(C["hello"], Decl(computedPropertyNamesSourceMap1_ES5.ts, 0, 9))
debugger;
}
get ["goodbye"]() {
>"goodbye" : Symbol(C[["goodbye"]], Decl(computedPropertyNamesSourceMap1_ES5.ts, 3, 5))
>"goodbye" : Symbol(C["goodbye"], Decl(computedPropertyNamesSourceMap1_ES5.ts, 3, 5))
return 0;
}

View File

@@ -3,12 +3,12 @@ class C {
>C : Symbol(C, Decl(computedPropertyNamesSourceMap1_ES6.ts, 0, 0))
["hello"]() {
>"hello" : Symbol(C[["hello"]], Decl(computedPropertyNamesSourceMap1_ES6.ts, 0, 9))
>"hello" : Symbol(C["hello"], Decl(computedPropertyNamesSourceMap1_ES6.ts, 0, 9))
debugger;
}
get ["goodbye"]() {
>"goodbye" : Symbol(C[["goodbye"]], Decl(computedPropertyNamesSourceMap1_ES6.ts, 3, 2))
>"goodbye" : Symbol(C["goodbye"], Decl(computedPropertyNamesSourceMap1_ES6.ts, 3, 2))
return 0;
}

View File

@@ -15,9 +15,9 @@ class C {
@dec ["1"]() { }
>dec : Symbol(dec, Decl(decoratorOnClassMethod13.ts, 0, 0))
>"1" : Symbol(C[["1"]], Decl(decoratorOnClassMethod13.ts, 2, 9))
>"1" : Symbol(C["1"], Decl(decoratorOnClassMethod13.ts, 2, 9))
@dec ["b"]() { }
>dec : Symbol(dec, Decl(decoratorOnClassMethod13.ts, 0, 0))
>"b" : Symbol(C[["b"]], Decl(decoratorOnClassMethod13.ts, 3, 20))
>"b" : Symbol(C["b"], Decl(decoratorOnClassMethod13.ts, 3, 20))
}

View File

@@ -15,5 +15,5 @@ class C {
@dec ["method"]() {}
>dec : Symbol(dec, Decl(decoratorOnClassMethod4.ts, 0, 0))
>"method" : Symbol(C[["method"]], Decl(decoratorOnClassMethod4.ts, 2, 9))
>"method" : Symbol(C["method"], Decl(decoratorOnClassMethod4.ts, 2, 9))
}

View File

@@ -15,5 +15,5 @@ class C {
@dec() ["method"]() {}
>dec : Symbol(dec, Decl(decoratorOnClassMethod5.ts, 0, 0))
>"method" : Symbol(C[["method"]], Decl(decoratorOnClassMethod5.ts, 2, 9))
>"method" : Symbol(C["method"], Decl(decoratorOnClassMethod5.ts, 2, 9))
}

View File

@@ -15,5 +15,5 @@ class C {
@dec public ["method"]() {}
>dec : Symbol(dec, Decl(decoratorOnClassMethod7.ts, 0, 0))
>"method" : Symbol(C[["method"]], Decl(decoratorOnClassMethod7.ts, 2, 9))
>"method" : Symbol(C["method"], Decl(decoratorOnClassMethod7.ts, 2, 9))
}

View File

@@ -100,7 +100,7 @@ namespace N {
>T5 : T5
}
export declare type T7 = {
>T7 : { a: number; 1: string; }
>T7 : { "a": number; "1": string; }
[N.c2]: number;
>N.c2 : "a"
@@ -147,7 +147,7 @@ declare class T10 extends T9 {
>T9 : T9
}
declare type T11 = {
>T11 : { a: number; 1: string; }
>T11 : { "a": number; "1": string; }
[c4]: number;
>c4 : "a"
@@ -239,9 +239,9 @@ let t6: N.T6;
>T6 : N.T6
let t7: N.T7;
>t7 : { a: number; 1: string; }
>t7 : { "a": number; "1": string; }
>N : any
>T7 : { a: number; 1: string; }
>T7 : { "a": number; "1": string; }
let t8: T8;
>t8 : T8
@@ -256,8 +256,8 @@ let t10: T10;
>T10 : T10
let t11: T11;
>t11 : { a: number; 1: string; }
>T11 : { a: number; 1: string; }
>t11 : { "a": number; "1": string; }
>T11 : { "a": number; "1": string; }
let t12: T12;
>t12 : T12
@@ -329,13 +329,13 @@ t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7,
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5, t7 = t6 : N.T6
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5 : N.T5
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4 : N.T4
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7 : { a: number; 1: string; }
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7 : { "a": number; "1": string; }
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5 : N.T5
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4 : N.T4
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7 : { a: number; 1: string; }
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7 : { "a": number; "1": string; }
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6 : N.T6
>t4 = t5, t4 = t6, t4 = t7, t5 = t4 : N.T4
>t4 = t5, t4 = t6, t4 = t7 : { a: number; 1: string; }
>t4 = t5, t4 = t6, t4 = t7 : { "a": number; "1": string; }
>t4 = t5, t4 = t6 : N.T6
>t4 = t5 : N.T5
>t4 : N.T4
@@ -343,35 +343,35 @@ t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7,
>t4 = t6 : N.T6
>t4 : N.T4
>t6 : N.T6
>t4 = t7 : { a: number; 1: string; }
>t4 = t7 : { "a": number; "1": string; }
>t4 : N.T4
>t7 : { a: number; 1: string; }
>t7 : { "a": number; "1": string; }
>t5 = t4 : N.T4
>t5 : N.T5
>t4 : N.T4
>t5 = t6 : N.T6
>t5 : N.T5
>t6 : N.T6
>t5 = t7 : { a: number; 1: string; }
>t5 = t7 : { "a": number; "1": string; }
>t5 : N.T5
>t7 : { a: number; 1: string; }
>t7 : { "a": number; "1": string; }
>t6 = t4 : N.T4
>t6 : N.T6
>t4 : N.T4
>t6 = t5 : N.T5
>t6 : N.T6
>t5 : N.T5
>t6 = t7 : { a: number; 1: string; }
>t6 = t7 : { "a": number; "1": string; }
>t6 : N.T6
>t7 : { a: number; 1: string; }
>t7 : { "a": number; "1": string; }
>t7 = t4 : N.T4
>t7 : { a: number; 1: string; }
>t7 : { "a": number; "1": string; }
>t4 : N.T4
>t7 = t5 : N.T5
>t7 : { a: number; 1: string; }
>t7 : { "a": number; "1": string; }
>t5 : N.T5
>t7 = t6 : N.T6
>t7 : { a: number; 1: string; }
>t7 : { "a": number; "1": string; }
>t6 : N.T6
t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0, t14 = t0, t15 = t0;

View File

@@ -2,10 +2,10 @@ tests/cases/compiler/dynamicNamesErrors.ts(5,5): error TS2300: Duplicate identif
tests/cases/compiler/dynamicNamesErrors.ts(6,5): error TS2300: Duplicate identifier '1'.
tests/cases/compiler/dynamicNamesErrors.ts(19,5): error TS2711: Subsequent property declarations must have the same type. Property '[c1]' must be of type 'number', but here has type 'string'.
tests/cases/compiler/dynamicNamesErrors.ts(25,1): error TS2322: Type 'T2' is not assignable to type 'T1'.
Types of property '1' are incompatible.
Types of property '"1"' are incompatible.
Type 'string' is not assignable to type 'number'.
tests/cases/compiler/dynamicNamesErrors.ts(26,1): error TS2322: Type 'T1' is not assignable to type 'T2'.
Types of property '1' are incompatible.
Types of property '"1"' are incompatible.
Type 'number' is not assignable to type 'string'.
@@ -43,10 +43,10 @@ tests/cases/compiler/dynamicNamesErrors.ts(26,1): error TS2322: Type 'T1' is not
t1 = t2;
~~
!!! error TS2322: Type 'T2' is not assignable to type 'T1'.
!!! error TS2322: Types of property '1' are incompatible.
!!! error TS2322: Types of property '"1"' are incompatible.
!!! error TS2322: Type 'string' is not assignable to type 'number'.
t2 = t1;
~~
!!! error TS2322: Type 'T1' is not assignable to type 'T2'.
!!! error TS2322: Types of property '1' are incompatible.
!!! error TS2322: Types of property '"1"' are incompatible.
!!! error TS2322: Type 'number' is not assignable to type 'string'.

View File

@@ -19,27 +19,27 @@ class C {
return "BYE";
}
static get ["computedname"]() {
>"computedname" : Symbol(C[["computedname"]], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 7, 5), Decl(emitClassDeclarationWithGetterSetterInES6.ts, 24, 33))
>"computedname" : Symbol(C["computedname"], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 7, 5), Decl(emitClassDeclarationWithGetterSetterInES6.ts, 24, 33))
return "";
}
get ["computedname1"]() {
>"computedname1" : Symbol(C[["computedname1"]], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 10, 5))
>"computedname1" : Symbol(C["computedname1"], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 10, 5))
return "";
}
get ["computedname2"]() {
>"computedname2" : Symbol(C[["computedname2"]], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 13, 5))
>"computedname2" : Symbol(C["computedname2"], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 13, 5))
return "";
}
set ["computedname3"](x: any) {
>"computedname3" : Symbol(C[["computedname3"]], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 16, 5))
>"computedname3" : Symbol(C["computedname3"], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 16, 5))
>x : Symbol(x, Decl(emitClassDeclarationWithGetterSetterInES6.ts, 18, 26))
}
set ["computedname4"](y: string) {
>"computedname4" : Symbol(C[["computedname4"]], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 19, 5))
>"computedname4" : Symbol(C["computedname4"], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 19, 5))
>y : Symbol(y, Decl(emitClassDeclarationWithGetterSetterInES6.ts, 20, 26))
}
@@ -52,6 +52,6 @@ class C {
>b : Symbol(b, Decl(emitClassDeclarationWithGetterSetterInES6.ts, 24, 19))
static set ["computedname"](b: string) { }
>"computedname" : Symbol(C[["computedname"]], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 7, 5), Decl(emitClassDeclarationWithGetterSetterInES6.ts, 24, 33))
>"computedname" : Symbol(C["computedname"], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 7, 5), Decl(emitClassDeclarationWithGetterSetterInES6.ts, 24, 33))
>b : Symbol(b, Decl(emitClassDeclarationWithGetterSetterInES6.ts, 25, 32))
}

View File

@@ -9,14 +9,14 @@ class D {
>foo : Symbol(D.foo, Decl(emitClassDeclarationWithMethodInES6.ts, 1, 17))
["computedName1"]() { }
>"computedName1" : Symbol(D[["computedName1"]], Decl(emitClassDeclarationWithMethodInES6.ts, 2, 13))
>"computedName1" : Symbol(D["computedName1"], Decl(emitClassDeclarationWithMethodInES6.ts, 2, 13))
["computedName2"](a: string) { }
>"computedName2" : Symbol(D[["computedName2"]], Decl(emitClassDeclarationWithMethodInES6.ts, 3, 27))
>"computedName2" : Symbol(D["computedName2"], Decl(emitClassDeclarationWithMethodInES6.ts, 3, 27))
>a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 4, 22))
["computedName3"](a: string): number { return 1; }
>"computedName3" : Symbol(D[["computedName3"]], Decl(emitClassDeclarationWithMethodInES6.ts, 4, 36))
>"computedName3" : Symbol(D["computedName3"], Decl(emitClassDeclarationWithMethodInES6.ts, 4, 36))
>a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 5, 22))
bar(): string {
@@ -35,14 +35,14 @@ class D {
return "HELLO";
}
static ["computedname4"]() { }
>"computedname4" : Symbol(D[["computedname4"]], Decl(emitClassDeclarationWithMethodInES6.ts, 11, 5))
>"computedname4" : Symbol(D["computedname4"], Decl(emitClassDeclarationWithMethodInES6.ts, 11, 5))
static ["computedname5"](a: string) { }
>"computedname5" : Symbol(D[["computedname5"]], Decl(emitClassDeclarationWithMethodInES6.ts, 12, 34))
>"computedname5" : Symbol(D["computedname5"], Decl(emitClassDeclarationWithMethodInES6.ts, 12, 34))
>a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 13, 29))
static ["computedname6"](a: string): boolean { return true; }
>"computedname6" : Symbol(D[["computedname6"]], Decl(emitClassDeclarationWithMethodInES6.ts, 13, 43))
>"computedname6" : Symbol(D["computedname6"], Decl(emitClassDeclarationWithMethodInES6.ts, 13, 43))
>a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 14, 29))
static staticMethod() {

View File

@@ -14,13 +14,13 @@
const ranges = test.ranges();
const [r0, r1, r2] = ranges;
verify.referenceGroups(r0, [{ definition: '(property) I[["prop1"]]: () => void', ranges }]);
verify.referenceGroups(r0, [{ definition: '(property) I["prop1"]: () => void', ranges }]);
verify.referenceGroups(r1, [
{ definition: '(property) I[["prop1"]]: () => void', ranges: [r0, r2] },
{ definition: '(property) C[["prop1"]]: any', ranges: [r1] }
{ definition: '(property) I["prop1"]: () => void', ranges: [r0, r2] },
{ definition: '(property) C["prop1"]: any', ranges: [r1] }
]);
verify.referenceGroups(r2, [
{ definition: '(property) I[["prop1"]]: () => void', ranges: [r0, r1] },
{ definition: '(property) I["prop1"]: () => void', ranges: [r0, r1] },
{ definition: '(property) ["prop1"]: () => void', ranges: [r2] }
]);

View File

@@ -14,12 +14,12 @@
const ranges = test.ranges();
const [r0, r1, r2] = ranges;
verify.referenceGroups(r0, [{ definition: "(method) I[[42]](): void", ranges }]);
verify.referenceGroups(r0, [{ definition: "(method) I[42](): void", ranges }]);
verify.referenceGroups(r1, [
{ definition: "(method) I[[42]](): void", ranges: [r0, r2] },
{ definition: "(property) C[[42]]: any", ranges: [r1] }
{ definition: "(method) I[42](): void", ranges: [r0, r2] },
{ definition: "(property) C[42]: any", ranges: [r1] }
]);
verify.referenceGroups(r2, [
{ definition: "(method) I[[42]](): void", ranges: [r0, r1] },
{ definition: "(method) I[42](): void", ranges: [r0, r1] },
{ definition: '(property) ["42"]: () => void', ranges: [r2] }
]);