* Always generate type & symbol baselines * Accept changed shadowed baselines * Accept brand new type and symbol baselines * Allow `getTypeAtLocation` to return undefined in the type writer * Accept baselines which had missing type information * Bind container for dynamically names enum members so they may be printed * Accept type/symbol baselines for enums with computed members * First pass at reducing typeWriter memory overhead * Use generators to allow for type and symbol baselines with no cache * Accept new baselines for tests whose output was fixed by better newline splitting * Hard cap on number of declarations printed, cache declaration print text * handle differing newlines better still to handle RWC newlines * Lower abridging count, accept abridged baselines * Limit max RWC error output size, limit RWC type and symbol baseline input size * Move skip logic into type and symbol baseliner to streamline error handling * Accept removal of empty baselines * Canonicalize path earlier to handle odd paths in input files * Do canonicalization earlier still, also ensure parallel perf profiles for different targets do not trample one another * No need to pathify again
98 lines
2.2 KiB
Plaintext
98 lines
2.2 KiB
Plaintext
=== tests/cases/compiler/declarationEmitExpressionInExtends3.ts ===
|
|
export class ExportedClass<T> {
|
|
>ExportedClass : ExportedClass<T>
|
|
>T : T
|
|
|
|
x: T;
|
|
>x : T
|
|
>T : T
|
|
}
|
|
|
|
class LocalClass<T, U> {
|
|
>LocalClass : LocalClass<T, U>
|
|
>T : T
|
|
>U : U
|
|
|
|
x: T;
|
|
>x : T
|
|
>T : T
|
|
|
|
y: U;
|
|
>y : U
|
|
>U : U
|
|
}
|
|
|
|
export interface ExportedInterface {
|
|
>ExportedInterface : ExportedInterface
|
|
|
|
x: number;
|
|
>x : number
|
|
}
|
|
|
|
interface LocalInterface {
|
|
>LocalInterface : LocalInterface
|
|
|
|
x: number;
|
|
>x : number
|
|
}
|
|
|
|
function getLocalClass<T>(c: T) {
|
|
>getLocalClass : <T>(c: T) => typeof LocalClass
|
|
>T : T
|
|
>c : T
|
|
>T : T
|
|
|
|
return LocalClass;
|
|
>LocalClass : typeof LocalClass
|
|
}
|
|
|
|
function getExportedClass<T>(c: T) {
|
|
>getExportedClass : <T>(c: T) => typeof ExportedClass
|
|
>T : T
|
|
>c : T
|
|
>T : T
|
|
|
|
return ExportedClass;
|
|
>ExportedClass : typeof ExportedClass
|
|
}
|
|
|
|
|
|
|
|
export class MyClass extends getLocalClass<LocalInterface>(undefined)<string, number> { // error LocalClass is inaccisible
|
|
>MyClass : MyClass
|
|
>getLocalClass<LocalInterface>(undefined) : LocalClass<string, number>
|
|
>getLocalClass : <T>(c: T) => typeof LocalClass
|
|
>LocalInterface : LocalInterface
|
|
>undefined : undefined
|
|
}
|
|
|
|
|
|
export class MyClass2 extends getExportedClass<LocalInterface>(undefined)<string> { // OK
|
|
>MyClass2 : MyClass2
|
|
>getExportedClass<LocalInterface>(undefined) : ExportedClass<string>
|
|
>getExportedClass : <T>(c: T) => typeof ExportedClass
|
|
>LocalInterface : LocalInterface
|
|
>undefined : undefined
|
|
}
|
|
|
|
|
|
export class MyClass3 extends getExportedClass<LocalInterface>(undefined)<LocalInterface> { // Error LocalInterface is inaccisble
|
|
>MyClass3 : MyClass3
|
|
>getExportedClass<LocalInterface>(undefined) : ExportedClass<LocalInterface>
|
|
>getExportedClass : <T>(c: T) => typeof ExportedClass
|
|
>LocalInterface : LocalInterface
|
|
>undefined : undefined
|
|
>LocalInterface : LocalInterface
|
|
}
|
|
|
|
|
|
export class MyClass4 extends getExportedClass<LocalInterface>(undefined)<ExportedInterface> { // OK
|
|
>MyClass4 : MyClass4
|
|
>getExportedClass<LocalInterface>(undefined) : ExportedClass<ExportedInterface>
|
|
>getExportedClass : <T>(c: T) => typeof ExportedClass
|
|
>LocalInterface : LocalInterface
|
|
>undefined : undefined
|
|
>ExportedInterface : ExportedInterface
|
|
}
|
|
|