fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at feat/use-query-options 25 lines 525 B view raw
1import type { AnalysisContext } from '@hey-api/codegen-core'; 2 3import { py } from '../../py-compiler'; 4import { PyDsl } from '../base'; 5 6const Mixed = PyDsl<py.Literal>; 7 8export class LiteralPyDsl extends Mixed { 9 readonly '~dsl' = 'LiteralPyDsl'; 10 11 protected value: py.LiteralValue; 12 13 constructor(value: py.LiteralValue) { 14 super(); 15 this.value = value; 16 } 17 18 override analyze(_ctx: AnalysisContext): void { 19 super.analyze(_ctx); 20 } 21 22 override toAst() { 23 return py.factory.createLiteral(this.value); 24 } 25}