mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
e9a8832ce6
fixes #11593 Parse decorators and pass them around explicitly instead of using a state to store them.
20 lines
325 B
TypeScript
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';
|
|
}
|