mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 22:22:34 +03:00
97269a37b9
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)
13 lines
262 B
TypeScript
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';
|
|
} |