swc/tests/fixture/issue-1421/case1/input/index.ts
강동윤 97269a37b9
fix(swc): Fix bugs for v1.2.50 (#1444)
swc:
 - Respect `react` config.

swc_ecma_transforms_compat:
 - `export-namespace-from`: Preserve `use strict`. (#1423)

swc_ecma_transforms_module:
 - Inject `use strict` before imports. (#1423)

swc_ecma_transforms_proposal:
 - Emit metadata for literal types. (#1421)
2021-03-03 20:39:02 +09:00

13 lines
262 B
TypeScript

import 'reflect-metadata';
const COL_KEY = Symbol('col');
const column = () => {
return (object: any, key: string) => {
Reflect.defineMetadata(COL_KEY, 'value', object, key);
};
};
class User {
@column() currency!: 'usd' | 'eur' | 'yen';
}