Skip to content

Commit d871224

Browse files
committed
WIP
1 parent 923f483 commit d871224

17 files changed

+240
-312
lines changed

snapshots/input/react/src/GenericAttribute.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { Configuration } from './object-literals-types'
1+
import { Configuration } from './reusable-types'
22

3-
function MyDecorator2(value: Configuration) {
3+
function MyDecorator(value: Configuration) {
44
return function (target: Function) {
55
console.log(`MyDecorator is called with value: ${value}`)
66
}
77
}
88

9-
@MyDecorator2({ property: 42, property2: '42' })
10-
class MyClass2 {
9+
@MyDecorator({ property: 42, property2: '42' })
10+
class MyClass {
1111
//...
1212
}

snapshots/input/syntax/src/inheritance.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1+
import { Superinterface } from './reusable-types'
12
import { Overloader } from './overload'
23

3-
export interface Superinterface {
4-
property: string
5-
interfaceMethod(): string
6-
}
7-
export interface GenericInterface<T> {
8-
property: T
9-
interfaceMethod(): string
10-
}
114
export interface IntermediateSuperinterface extends Superinterface {
125
intermediateInterfaceMethod(): string
136
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Option } from './object-literals-types'
1+
import { Option } from './reusable-types'
22

33
interface Foobar {
44
foobar: number

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
import { GenericInterface, Superinterface } from './inheritance'
2-
import { Configuration, GenericClass, Option } from './object-literals-types'
1+
import {
2+
Configuration,
3+
GenericClass,
4+
GenericInterface,
5+
Option,
6+
Superinterface,
7+
} from './reusable-types'
38

49
export function consumesInterface(superInterface: Superinterface): void {}
510
export function consumesArray(superInterface: Superinterface[]): void {}

snapshots/input/syntax/src/object-literals-nested.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Option } from './object-literals-types'
1+
import { Option } from './reusable-types'
22

33
interface Address {
44
street: string

snapshots/input/syntax/src/object-literals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Configuration } from './object-literals-types'
1+
import { Configuration } from './reusable-types'
22

33
function random(): number {
44
return Math.random()

snapshots/input/syntax/src/object-literals-types.ts renamed to snapshots/input/syntax/src/reusable-types.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Reusable types for object-literal-* tests
1+
// Reusable types for other snapshot tests
22

33
export interface Option<A> {
44
value?: A
@@ -18,3 +18,12 @@ export class GenericClass<A> {
1818
return this.values.map(a => fn(a))
1919
}
2020
}
21+
22+
export interface Superinterface {
23+
property: string
24+
interfaceMethod(): string
25+
}
26+
export interface GenericInterface<T> {
27+
property: T
28+
interfaceMethod(): string
29+
}

snapshots/output/react/src/GenericAttribute.tsx

Lines changed: 0 additions & 68 deletions
This file was deleted.
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import { Configuration } from './object-literals-types'
1+
import { Configuration } from './reusable-types'
22
// definition syntax 1.0.0 src/`decorators.ts`/
33
//documentation ```ts\nmodule "decorators.ts"\n```
4-
// ^^^^^^^^^^^^^ reference syntax 1.0.0 src/`object-literals-types.ts`/Configuration#
5-
// ^^^^^^^^^^^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`object-literals-types.ts`/
4+
// ^^^^^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Configuration#
5+
// ^^^^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/
66

7-
function MyDecorator2(value: Configuration) {
8-
// ^^^^^^^^^^^^ definition syntax 1.0.0 src/`decorators.ts`/MyDecorator2().
9-
// documentation ```ts\nfunction MyDecorator2(value: Configuration): (target: Function) => void\n```
10-
// ^^^^^ definition local 0
11-
// documentation ```ts\n(parameter) value: Configuration\n```
12-
// ^^^^^^^^^^^^^ reference syntax 1.0.0 src/`object-literals-types.ts`/Configuration#
7+
function MyDecorator(value: Configuration) {
8+
// ^^^^^^^^^^^ definition syntax 1.0.0 src/`decorators.ts`/MyDecorator().
9+
// documentation ```ts\nfunction MyDecorator(value: Configuration): (target: Function) => void\n```
10+
// ^^^^^ definition local 0
11+
// documentation ```ts\n(parameter) value: Configuration\n```
12+
// ^^^^^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Configuration#
1313
return function (target: Function) {
1414
// ^^^^^^ definition local 1
1515
// documentation ```ts\n(parameter) target: Function\n```
@@ -28,13 +28,13 @@
2828
}
2929
}
3030

31-
@MyDecorator2({ property: 42, property2: '42' })
32-
// ^^^^^^^^^^^^ reference syntax 1.0.0 src/`decorators.ts`/MyDecorator2().
33-
// ^^^^^^^^ reference syntax 1.0.0 src/`object-literals-types.ts`/Numbers#property.
34-
// ^^^^^^^^^ reference syntax 1.0.0 src/`object-literals-types.ts`/Strings#property2.
35-
class MyClass2 {
36-
// ^^^^^^^^ definition syntax 1.0.0 src/`decorators.ts`/MyClass2#
37-
// documentation ```ts\nclass MyClass2\n```
31+
@MyDecorator({ property: 42, property2: '42' })
32+
// ^^^^^^^^^^^ reference syntax 1.0.0 src/`decorators.ts`/MyDecorator().
33+
// ^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Numbers#property.
34+
// ^^^^^^^^^ reference syntax 1.0.0 src/`reusable-types.ts`/Strings#property2.
35+
class MyClass {
36+
// ^^^^^^^ definition syntax 1.0.0 src/`decorators.ts`/MyClass#
37+
// documentation ```ts\nclass MyClass\n```
3838
//...
3939
}
4040

0 commit comments

Comments
 (0)