|
| 1 | + export interface Superinterface { |
| 2 | +// ^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/Superinterface# |
| 3 | +// documentation ```ts\ninterface Superinterface\n``` |
| 4 | + property: string |
| 5 | +// ^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/Superinterface#property. |
| 6 | +// documentation ```ts\n(property) property: string\n``` |
| 7 | + interfaceMethod(): string |
| 8 | +// ^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/Superinterface#interfaceMethod(). |
| 9 | +// documentation ```ts\n(method) interfaceMethod() => string\n``` |
| 10 | + } |
| 11 | + export abstract class Superclass { |
| 12 | +// ^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/Superclass# |
| 13 | +// documentation ```ts\nclass Superclass\n``` |
| 14 | + public abstract overrideMethod(): string |
| 15 | +// ^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/Superclass#overrideMethod(). |
| 16 | +// documentation ```ts\n(method) overrideMethod(): string\n``` |
| 17 | + } |
| 18 | + export abstract class IntermediateSuperclass extends Superclass {} |
| 19 | +// ^^^^^^^^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/IntermediateSuperclass# |
| 20 | +// documentation ```ts\nclass IntermediateSuperclass\n``` |
| 21 | +// ^^^^^^^^^^ reference syntax 1.0.0 src/`inheritance.ts`/Superclass# |
| 22 | + export class Subclass extends IntermediateSuperclass implements Superinterface { |
| 23 | +// ^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/Subclass# |
| 24 | +// documentation ```ts\nclass Subclass\n``` |
| 25 | +// ^^^^^^^^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`inheritance.ts`/IntermediateSuperclass# |
| 26 | +// ^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`inheritance.ts`/Superinterface# |
| 27 | + property = 'property' |
| 28 | +// ^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/Subclass#property. |
| 29 | +// documentation ```ts\n(property) property: string\n``` |
| 30 | + public overrideMethod(): string { |
| 31 | +// ^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/Subclass#overrideMethod(). |
| 32 | +// documentation ```ts\n(method) overrideMethod(): string\n``` |
| 33 | + throw new Error('Method not implemented.') |
| 34 | +// ^^^^^ reference typescript 4.6.2 lib/`lib.es5.d.ts`/Error# |
| 35 | +// ^^^^^ reference typescript 4.6.2 lib/`lib.es5.d.ts`/Error. |
| 36 | + } |
| 37 | + public interfaceMethod(): string { |
| 38 | +// ^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/Subclass#interfaceMethod(). |
| 39 | +// documentation ```ts\n(method) interfaceMethod(): string\n``` |
| 40 | + throw new Error('Method not implemented.') |
| 41 | +// ^^^^^ reference typescript 4.6.2 lib/`lib.es5.d.ts`/Error# |
| 42 | +// ^^^^^ reference typescript 4.6.2 lib/`lib.es5.d.ts`/Error. |
| 43 | + } |
| 44 | + } |
| 45 | + export const objectLiteralImplementation: Superinterface = { |
| 46 | +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/objectLiteralImplementation. |
| 47 | +// documentation ```ts\nvar objectLiteralImplementation: Superinterface\n``` |
| 48 | +// ^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`inheritance.ts`/Superinterface# |
| 49 | + property: 'property', |
| 50 | +// ^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/property0: |
| 51 | +// documentation ```ts\n(property) property: string\n``` |
| 52 | + interfaceMethod: (): string => { |
| 53 | +// ^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/interfaceMethod0: |
| 54 | +// documentation ```ts\n(property) interfaceMethod: () => string\n``` |
| 55 | + throw new Error('Function not implemented.') |
| 56 | +// ^^^^^ reference typescript 4.6.2 lib/`lib.es5.d.ts`/Error# |
| 57 | +// ^^^^^ reference typescript 4.6.2 lib/`lib.es5.d.ts`/Error. |
| 58 | + }, |
| 59 | + } |
| 60 | + export function consumesInterface(superInterface: Superinterface): void {} |
| 61 | +// ^^^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/consumesInterface(). |
| 62 | +// documentation ```ts\nfunction consumesInterface(superInterface: Superinterface): void\n``` |
| 63 | +// ^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/consumesInterface().(superInterface) |
| 64 | +// documentation ```ts\n(parameter) superInterface: Superinterface\n``` |
| 65 | +// ^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`inheritance.ts`/Superinterface# |
| 66 | + export function infersInterface(): void { |
| 67 | +// ^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/infersInterface(). |
| 68 | +// documentation ```ts\nfunction infersInterface(): void\n``` |
| 69 | + consumesInterface({ |
| 70 | +// ^^^^^^^^^^^^^^^^^ reference syntax 1.0.0 src/`inheritance.ts`/consumesInterface(). |
| 71 | + interfaceMethod: (): string => 'inferred', |
| 72 | +// ^^^^^^^^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/interfaceMethod1: |
| 73 | +// documentation ```ts\n(property) interfaceMethod: () => string\n``` |
| 74 | + property: 'inferred', |
| 75 | +// ^^^^^^^^ definition syntax 1.0.0 src/`inheritance.ts`/property1: |
| 76 | +// documentation ```ts\n(property) property: string\n``` |
| 77 | + }) |
| 78 | + } |
| 79 | + |
0 commit comments