Files
oxc-project__oxc/tasks/coverage/misc/pass/oxc-11593.ts
Boshen e9a8832ce6 refactor(parser): rewrite decorator parsing (#11604)
fixes #11593

Parse decorators and pass them around explicitly instead of using a state to store them.
2025-06-11 11:11:58 +00:00

20 lines
325 B
TypeScript

export class C extends B {
@convert(val => {
if (['rect', 'triangle'].includes(val)) {
return val;
}
return 'rect';
})
@derive(val => {
if (val === 'triangle') {
return {
rotate: 0,
};
}
return {};
})
@field()
accessor shapeType: 'rect' | 'triangle' = 'rect';
}