swc/ecmascript/transforms/optimization/tests/expr-simplifier/issue-1846/fcase1/input.js

19 lines
475 B
JavaScript
Raw Normal View History

import "reflect-metadata";
const Test = (target) => {
const metadata = Reflect.getMetadataKeys(target).reduce((metadata, key) => {
const { [key]: values = [] } = metadata;
const all = Reflect.getMetadata(key, target);
const own = Reflect.getOwnMetadata(key, target);
return {
...metadata,
[key]: [{ all, own }, ...values],
};
}, {});
console.dir(metadata, { depth: 5 });
};
export class Foo { }