* 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
103 lines
1.5 KiB
Plaintext
103 lines
1.5 KiB
Plaintext
=== tests/cases/compiler/typeofProperty.ts ===
|
|
interface I1 {
|
|
>I1 : I1
|
|
|
|
a: number;
|
|
>a : number
|
|
|
|
b: typeof a; // Should yield error (a is not a value)
|
|
>b : any
|
|
>a : any
|
|
}
|
|
|
|
interface I2 {
|
|
>I2 : I2
|
|
|
|
c: typeof d; // Should yield error (d is not a value)
|
|
>c : any
|
|
>d : any
|
|
|
|
d: string;
|
|
>d : string
|
|
}
|
|
|
|
interface I3 {
|
|
>I3 : I3
|
|
|
|
e: typeof e; // Should yield error (e is not a value)
|
|
>e : any
|
|
>e : any
|
|
}
|
|
|
|
class C1 {
|
|
>C1 : C1
|
|
|
|
a: number;
|
|
>a : number
|
|
|
|
b: typeof a; // Should yield error (a is not a value)
|
|
>b : any
|
|
>a : any
|
|
}
|
|
|
|
|
|
class C2 {
|
|
>C2 : C2
|
|
|
|
c: typeof d; // Should yield error (d is not a value)
|
|
>c : any
|
|
>d : any
|
|
|
|
d: string;
|
|
>d : string
|
|
}
|
|
|
|
class C3 {
|
|
>C3 : C3
|
|
|
|
e: typeof e; // Should yield error (e is not a value)
|
|
>e : any
|
|
>e : any
|
|
}
|
|
|
|
|
|
|
|
interface ValidInterface {
|
|
>ValidInterface : ValidInterface
|
|
|
|
x: string;
|
|
>x : string
|
|
}
|
|
|
|
class ValidClass implements ValidInterface {
|
|
>ValidClass : ValidClass
|
|
>ValidInterface : ValidInterface
|
|
|
|
x: string;
|
|
>x : string
|
|
}
|
|
|
|
var vcInstance = new ValidClass();
|
|
>vcInstance : ValidClass
|
|
>new ValidClass() : ValidClass
|
|
>ValidClass : typeof ValidClass
|
|
|
|
var viInstance = vcInstance;
|
|
>viInstance : ValidClass
|
|
>vcInstance : ValidClass
|
|
|
|
var x1: typeof vcInstance.x; // x1: string
|
|
>x1 : string
|
|
>vcInstance.x : string
|
|
>vcInstance : ValidClass
|
|
>x : string
|
|
|
|
var x2: typeof viInstance.x; // x2: string
|
|
>x2 : string
|
|
>viInstance.x : string
|
|
>viInstance : ValidClass
|
|
>x : string
|
|
|
|
|
|
|