Something went wrong. Try again.
fork of hey-api/openapi-ts because I need some additional things
Something went wrong. Try again.
536 B · 24 lines
TypeScript
12345678910111213141516171819202122232425import type { AnalysisContext, NodeName } from '@hey-api/codegen-core';
import { py } from '../../ts-python';import { PyDsl } from '../base';
const Mixed = PyDsl<py.Identifier>;
export class IdPyDsl extends Mixed { readonly '~dsl' = 'IdPyDsl';
constructor(name: NodeName) { super(); this.name.set(name); }
override analyze(ctx: AnalysisContext): void { super.analyze(ctx); ctx.analyze(this.name); }
override toAst(): py.Identifier { return py.factory.createIdentifier(this.name.toString()); }}