a15030ff6f
* fix(35050): fix decorated block-scoped class emit * Only use internal name when targeting ES5/3 Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
36 lines
812 B
Plaintext
36 lines
812 B
Plaintext
=== tests/cases/conformance/decorators/class/a.ts ===
|
|
function decorator() {
|
|
>decorator : () => (target: new (...args: any[]) => any) => void
|
|
|
|
return (target: new (...args: any[]) => any) => {}
|
|
>(target: new (...args: any[]) => any) => {} : (target: new (...args: any[]) => any) => void
|
|
>target : new (...args: any[]) => any
|
|
>args : any[]
|
|
}
|
|
|
|
try {
|
|
@decorator()
|
|
>decorator() : (target: new (...args: any[]) => any) => void
|
|
>decorator : () => (target: new (...args: any[]) => any) => void
|
|
|
|
class Foo {
|
|
>Foo : Foo
|
|
|
|
public static func(): Foo {
|
|
>func : () => Foo
|
|
|
|
return new Foo();
|
|
>new Foo() : Foo
|
|
>Foo : typeof Foo
|
|
}
|
|
}
|
|
Foo.func();
|
|
>Foo.func() : Foo
|
|
>Foo.func : () => Foo
|
|
>Foo : typeof Foo
|
|
>func : () => Foo
|
|
}
|
|
catch (e) {}
|
|
>e : any
|
|
|