You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decorator metadata is not stored properly if type are not defined in right order.
import 'reflect-metadata';
function field(target: Object, propertyName: string) {}
export class C {}
export class A {
@field
public bb: B;
@field
public cc: C;
@field
public xx: boolean;
}
export class B {
@field
public aa: A;
}
console.log(Reflect.getOwnMetadata('design:type', A.prototype, 'bb')); // Return undefined expected B
console.log(Reflect.getOwnMetadata('design:type', A.prototype, 'cc'));
console.log(Reflect.getOwnMetadata('design:type', A.prototype, 'xx'));
The text was updated successfully, but these errors were encountered:
This is related to #27519 but you can reproduce it without circular dependency
import 'reflect-metadata';
function field(target: Object, propertyName: string) {}
export class A {
@field
public bb: B;
}
export class B {}
console.log(Reflect.getOwnMetadata('design:type', A.prototype, 'bb')); // Return undefined expected B
Bug Report
Decorator metadata is not stored properly if type are not defined in right order.
The text was updated successfully, but these errors were encountered: