(type: { $type: string })
| 58 | |
| 59 | // generation handler decorator |
| 60 | function gen(type: { $type: string }) { |
| 61 | return function (_target: unknown, _propertyKey: string, descriptor: PropertyDescriptor) { |
| 62 | if (!generationHandlers.get(type.$type)) { |
| 63 | generationHandlers.set(type.$type, descriptor); |
| 64 | } |
| 65 | return descriptor; |
| 66 | }; |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Generates ZModel source code from AST. |