Hello,
I have an issue, when I define a type like this:
export type Uuid = string;
The emit type is:
Object
The full case:
export type Uuid = string;
function Decorate() {
return (target: any, prop: string): any => {
const propertyType = Reflect.getMetadata("design:type", target, prop);
console.log('propertyType', propertyType); // emit the Object type
}
}
class Foo {
@Decorate()
public bar!: Uuid;
}
and my babel config:
// babel.config.js
module.exports = {
presets: [
["@babel/preset-env", { "targets": { "node": "current" }, "modules": "commonjs" }],
"@babel/preset-typescript"
],
"plugins": [
"babel-plugin-transform-typescript-metadata",
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/proposal-class-properties", { "loose": true }],
"@babel/proposal-object-rest-spread"
]
};
I don't know if it's a defect coming from my Babel configuration, or a limitation from @babel/preset-typescript.
Hello,
I have an issue, when I define a type like this:
export type Uuid = string;The emit type is:
ObjectThe full case:
and my babel config:
I don't know if it's a defect coming from my Babel configuration, or a limitation from
@babel/preset-typescript.