Skip to content

Commit bf1b590

Browse files
committed
Update snapshot tests
1 parent e4b8e50 commit bf1b590

9 files changed

+74
-159
lines changed

snapshots/output/syntax/src/decorators.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@
3030

3131
@MyDecorator({ property: 42, property2: '42' })
3232
// ^^^^^^^^^^^ reference syntax 1.0.0 src/`decorators.ts`/MyDecorator().
33-
// ^^^^^^^^ definition syntax 1.0.0 src/`decorators.ts`/property0:
34-
// documentation ```ts\n(property) property: number\n```
35-
// ^^^^^^^^^ definition syntax 1.0.0 src/`decorators.ts`/property20:
36-
// documentation ```ts\n(property) property2: string\n```
33+
// ^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Numbers#property.
34+
// ^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Strings#property2.
3735
class MyClass {
3836
// ^^^^^^^ definition syntax 1.0.0 src/`decorators.ts`/MyClass#
3937
// documentation ```ts\nclass MyClass\n```

snapshots/output/syntax/src/destructuring.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
// ^^^^^ definition syntax 1.0.0 src/`destructuring.ts`/props.
1212
// documentation ```ts\nvar props: Props\n```
1313
// ^^^^^ reference syntax 1.0.0 src/`destructuring.ts`/Props#
14-
// ^ definition syntax 1.0.0 src/`destructuring.ts`/a0:
15-
// documentation ```ts\n(property) a: number\n```
16-
// relationship implementation reference scip-typescript npm syntax 1.0.0 src/`destructuring.ts`/Props#a.
14+
// ^ reference syntax 1.0.0 src/`destructuring.ts`/Props#a.
1715

1816
export function objectDestructuring(): number[] {
1917
// ^^^^^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`destructuring.ts`/objectDestructuring().

snapshots/output/syntax/src/inheritance.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,9 @@
105105
// documentation ```ts\nvar objectLiteralImplementation: Superinterface\n```
106106
// ^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Superinterface#
107107
property: 'property',
108-
// ^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/property0:
109-
// documentation ```ts\n(property) property: string\n```
110-
// relationship implementation reference scip-typescript npm syntax 1.0.0 src/`reusable-types.ts`/Superinterface#property.
108+
// ^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Superinterface#property.
111109
interfaceMethod: (): string => {
112-
// ^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/interfaceMethod0:
113-
// documentation ```ts\n(property) interfaceMethod: () => string\n```
114-
// relationship implementation reference scip-typescript npm syntax 1.0.0 src/`reusable-types.ts`/Superinterface#interfaceMethod().
110+
// ^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Superinterface#interfaceMethod().
115111
throw new Error('Function not implemented.')
116112
// ^^^^^ reference typescript 4.8.4 lib/`lib.es5.d.ts`/Error#
117113
// ^^^^^ reference typescript 4.8.4 lib/`lib.es5.d.ts`/Error.

snapshots/output/syntax/src/interface.ts

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,20 @@
2424
// ^^^^^^^^^ reference syntax 1.0.0 src/`interface.ts`/Interface#
2525
return {
2626
property: 'a',
27-
// ^^^^^^^^ definition syntax 1.0.0 src/`interface.ts`/property0:
28-
// documentation ```ts\n(property) property: string\n```
29-
// relationship implementation reference scip-typescript npm syntax 1.0.0 src/`interface.ts`/Interface#property.
27+
// ^^^^^^^^ reference syntax 1.0.0 src/`interface.ts`/Interface#property.
3028
methodSignature(param: string): string {
31-
// ^^^^^^^^^^^^^^^ definition local 4
32-
// documentation ```ts\n(method) methodSignature(param: string): string\n```
33-
// relationship implementation reference scip-typescript npm syntax 1.0.0 src/`interface.ts`/Interface#methodSignature().
34-
// ^^^^^ definition local 5
29+
// ^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`interface.ts`/Interface#methodSignature().
30+
// ^^^^^ definition syntax 1.0.0 src/`interface.ts`/Interface#methodSignature().(param)
3531
// documentation ```ts\n(parameter) param: string\n```
3632
return param
37-
// ^^^^^ reference local 5
33+
// ^^^^^ reference syntax 1.0.0 src/`interface.ts`/Interface#methodSignature().(param)
3834
},
3935
methodSignature2: (param: string): string => {
40-
// ^^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`interface.ts`/methodSignature20:
41-
// documentation ```ts\n(property) methodSignature2: (param: string) => string\n```
42-
// relationship implementation reference scip-typescript npm syntax 1.0.0 src/`interface.ts`/Interface#methodSignature2.
43-
// ^^^^^ definition local 7
36+
// ^^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`interface.ts`/Interface#methodSignature2.
37+
// ^^^^^ definition local 3
4438
// documentation ```ts\n(parameter) param: string\n```
4539
return param
46-
// ^^^^^ reference local 7
40+
// ^^^^^ reference local 3
4741
},
4842
}
4943
}

snapshots/output/syntax/src/object-literals-arrow-function.ts

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#
3030
return fn({ foobar: 42 + something })
3131
// ^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/hasArrowFunctionParameter().(fn)
32-
// ^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/foobar0:
33-
// documentation ```ts\n(property) foobar: number\n```
34-
// relationship implementation reference scip-typescript npm syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar.
32+
// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar.
3533
// ^^^^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/hasArrowFunctionParameter().(something)
3634
}
3735

@@ -44,17 +42,15 @@
4442
// ^^^^^^ definition local 10
4543
// documentation ```ts\n(parameter) foobar: number\n```
4644
// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar.
47-
// ^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/foobar1:
48-
// documentation ```ts\n(property) foobar: number\n```
45+
// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar.
4946
// ^^^^^^ reference local 10
5047
.foobar +
5148
// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar.
5249
hasArrowFunctionParameter(2, foobar => ({ foobar: foobar.foobar + 2 }))
5350
// ^^^^^^^^^^^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/hasArrowFunctionParameter().
5451
// ^^^^^^ definition local 14
5552
// documentation ```ts\n(parameter) foobar: Foobar\n```
56-
// ^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/foobar2:
57-
// documentation ```ts\n(property) foobar: number\n```
53+
// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar.
5854
// ^^^^^^ reference local 14
5955
// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar.
6056
.foobar
@@ -71,8 +67,7 @@
7167
// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#
7268
// ^ definition local 18
7369
// documentation ```ts\n(parameter) n: number\n```
74-
// ^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/foobar3:
75-
// documentation ```ts\n(property) foobar: number\n```
70+
// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar.
7671
// ^ reference local 18
7772
}
7873

@@ -87,10 +82,8 @@
8782
// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#
8883
// ^ definition local 22
8984
// documentation ```ts\n(parameter) n: number\n```
90-
// ^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/value0:
91-
// documentation ```ts\n(property) value: { foobar: number; }\n```
92-
// ^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/foobar4:
93-
// documentation ```ts\n(property) foobar: number\n```
85+
// ^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Option#value.
86+
// ^^^^^^ reference syntax 1.0.0 src/`object-literals-arrow-function.ts`/Foobar#foobar.
9487
// ^ reference local 22
9588
}
9689

@@ -104,7 +97,7 @@
10497
// ^^^ reference typescript 4.8.4 lib/`lib.es5.d.ts`/Array#map().
10598
// ^ definition local 26
10699
// documentation ```ts\n(parameter) n: number\n```
107-
// ^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/foobar5:
100+
// ^^^^^^ definition syntax 1.0.0 src/`object-literals-arrow-function.ts`/foobar0:
108101
// documentation ```ts\n(property) foobar: number\n```
109102
// ^ reference local 26
110103
}

snapshots/output/syntax/src/object-literals-call-signatures.ts

Lines changed: 19 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -44,54 +44,37 @@
4444
consumesInterface({
4545
// ^^^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`object-literals-call-signatures.ts`/consumesInterface().
4646
interfaceMethod: (): string => 'inferred',
47-
// ^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/interfaceMethod0:
48-
// documentation ```ts\n(property) interfaceMethod: () => string\n```
49-
// relationship implementation reference scip-typescript npm syntax 1.0.0 src/`reusable-types.ts`/Superinterface#interfaceMethod().
47+
// ^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Superinterface#interfaceMethod().
5048
property: 'inferred',
51-
// ^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property0:
52-
// documentation ```ts\n(property) property: string\n```
53-
// relationship implementation reference scip-typescript npm syntax 1.0.0 src/`reusable-types.ts`/Superinterface#property.
49+
// ^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Superinterface#property.
5450
})
5551
consumesArray([
5652
// ^^^^^^^^^^^^^ reference syntax 1.0.0 src/`object-literals-call-signatures.ts`/consumesArray().
5753
{
5854
interfaceMethod: (): string => 'inferred',
59-
// ^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/interfaceMethod1:
60-
// documentation ```ts\n(property) interfaceMethod: () => string\n```
55+
// ^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Superinterface#interfaceMethod().
6156
property: 'inferred',
62-
// ^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property1:
63-
// documentation ```ts\n(property) property: string\n```
57+
// ^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Superinterface#property.
6458
},
6559
])
6660
consumesGenericInterface<number>({
6761
// ^^^^^^^^^^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`object-literals-call-signatures.ts`/consumesGenericInterface().
6862
interfaceMethod: (): string => 'inferred',
69-
// ^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/interfaceMethod2:
70-
// documentation ```ts\n(property) interfaceMethod: () => string\n```
71-
// relationship implementation reference scip-typescript npm syntax 1.0.0 src/`reusable-types.ts`/GenericInterface#interfaceMethod().
63+
// ^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/GenericInterface#interfaceMethod().
7264
property: 123,
73-
// ^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property2:
74-
// documentation ```ts\n(property) property: number\n```
75-
// relationship implementation reference scip-typescript npm syntax 1.0.0 src/`reusable-types.ts`/GenericInterface#property.
65+
// ^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/GenericInterface#property.
7666
})
7767
consumesGenericInterface<Option<Configuration>[]>({
7868
// ^^^^^^^^^^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`object-literals-call-signatures.ts`/consumesGenericInterface().
7969
// ^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Option#
8070
// ^^^^^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Configuration#
8171
interfaceMethod: (): string => 'inferred',
82-
// ^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/interfaceMethod3:
83-
// documentation ```ts\n(property) interfaceMethod: () => string\n```
84-
// relationship implementation reference scip-typescript npm syntax 1.0.0 src/`reusable-types.ts`/GenericInterface#interfaceMethod().
72+
// ^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/GenericInterface#interfaceMethod().
8573
property: [{ value: { property: 42, property2: '42' } }],
86-
// ^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property3:
87-
// documentation ```ts\n(property) property: { value: { property: number; property2: string; }; }[]\n```
88-
// relationship implementation reference scip-typescript npm syntax 1.0.0 src/`reusable-types.ts`/GenericInterface#property.
89-
// ^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/value0:
90-
// documentation ```ts\n(property) value: { property: number; property2: string; }\n```
91-
// ^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property4:
92-
// documentation ```ts\n(property) property: number\n```
93-
// ^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property20:
94-
// documentation ```ts\n(property) property2: string\n```
74+
// ^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/GenericInterface#property.
75+
// ^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Option#value.
76+
// ^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Numbers#property.
77+
// ^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Strings#property2.
9578
})
9679
}
9780

@@ -112,12 +95,10 @@
11295
// ^^^^^^ reference local 3
11396
return {
11497
property: incremented,
115-
// ^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property5:
116-
// documentation ```ts\n(property) property: number\n```
98+
// ^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Numbers#property.
11799
// ^^^^^^^^^^^ reference local 6
118100
property2: incremented.toString(),
119-
// ^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property21:
120-
// documentation ```ts\n(property) property2: string\n```
101+
// ^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Strings#property2.
121102
// ^^^^^^^^^^^ reference local 6
122103
// ^^^^^^^^ reference typescript 4.8.4 lib/`lib.es5.d.ts`/Number#toString().
123104
}
@@ -134,12 +115,10 @@
134115
// ^^^^^^ reference local 10
135116
return {
136117
property: incremented,
137-
// ^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property6:
138-
// documentation ```ts\n(property) property: number\n```
118+
// ^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Numbers#property.
139119
// ^^^^^^^^^^^ reference local 13
140120
property2: incremented.toString(),
141-
// ^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property22:
142-
// documentation ```ts\n(property) property2: string\n```
121+
// ^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Strings#property2.
143122
// ^^^^^^^^^^^ reference local 13
144123
// ^^^^^^^^ reference typescript 4.8.4 lib/`lib.es5.d.ts`/Number#toString().
145124
}
@@ -155,10 +134,8 @@
155134
return new GenericClass<Configuration>([{ property: 1, property2: '2' }])
156135
// ^^^^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/GenericClass#`<constructor>`().
157136
// ^^^^^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Configuration#
158-
// ^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property7:
159-
// documentation ```ts\n(property) property: number\n```
160-
// ^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property23:
161-
// documentation ```ts\n(property) property2: string\n```
137+
// ^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Numbers#property.
138+
// ^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Strings#property2.
162139
}
163140

164141
export function handleGenericClass() {
@@ -174,12 +151,10 @@
174151
// documentation ```ts\n(parameter) property2: string\n```
175152
// ^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Strings#property2.
176153
property: property + 1,
177-
// ^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property8:
178-
// documentation ```ts\n(property) property: number\n```
154+
// ^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Numbers#property.
179155
// ^^^^^^^^ reference local 19
180156
property2: property2 + '1',
181-
// ^^^^^^^^^ definition syntax 1.0.0 src/`object-literals-call-signatures.ts`/property24:
182-
// documentation ```ts\n(property) property2: string\n```
157+
// ^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Strings#property2.
183158
// ^^^^^^^^^ reference local 20
184159
}))
185160
}

0 commit comments

Comments
 (0)