mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Emit generated name for unnamed default exported class with decorated members
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// @target: ES2015
|
||||
// @module: ES2015
|
||||
// @experimentaldecorators: true
|
||||
declare function dec<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>;
|
||||
|
||||
export default class {
|
||||
@dec get accessor() { return 1; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// @target: ES2015
|
||||
// @module: ES2015
|
||||
// @experimentaldecorators: true
|
||||
declare function dec<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>;
|
||||
|
||||
export default class {
|
||||
@dec method() {}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// @target: ES2015
|
||||
// @module: ES2015
|
||||
// @experimentaldecorators: true
|
||||
declare function dec(target: Object, propertyKey: string | symbol, parameterIndex: number): void;
|
||||
|
||||
export default class {
|
||||
method(@dec p: number) {}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// @target: ES2015
|
||||
// @module: ES2015
|
||||
// @experimentaldecorators: true
|
||||
declare function dec(target: any, propertyKey: string): void;
|
||||
|
||||
export default class {
|
||||
@dec prop;
|
||||
}
|
||||
Reference in New Issue
Block a user