···1818import { CallTsDsl } from './expr/call';
1919import { ExprTsDsl } from './expr/expr';
2020import { fromValue as exprValue } from './expr/fromValue';
2121+import { IdTsDsl } from './expr/id';
2122import { LiteralTsDsl } from './expr/literal';
2223import { NewTsDsl } from './expr/new';
2324import { ObjectTsDsl } from './expr/object';
···133134 /** Creates a single-line comment (//). */
134135 hint: (...args: ConstructorParameters<typeof HintTsDsl>) =>
135136 new HintTsDsl(...args),
137137+138138+ /** Creates an identifier (e.g. `foo`). */
139139+ id: (...args: ConstructorParameters<typeof IdTsDsl>) => new IdTsDsl(...args),
136140137141 /** Creates an if statement. */
138142 if: (...args: ConstructorParameters<typeof IfTsDsl>) => new IfTsDsl(...args),
+2-1
packages/openapi-ts/src/ts-dsl/layout/doc.ts
···2233import type { MaybeArray } from '../base';
44import { TsDsl } from '../base';
55+import { IdTsDsl } from '../expr/id';
5667export class DocTsDsl extends TsDsl<ts.Node> {
78 protected _lines: Array<string> = [];
···6162 // this class does not build a standalone node;
6263 // it modifies other nodes via `apply()`.
6364 // Return a dummy comment node for compliance.
6464- return ts.factory.createIdentifier('');
6565+ return this.$node(new IdTsDsl(''));
6566 }
6667}
+2-1
packages/openapi-ts/src/ts-dsl/layout/hint.ts
···2233import type { MaybeArray } from '../base';
44import { TsDsl } from '../base';
55+import { IdTsDsl } from '../expr/id';
5667export class HintTsDsl extends TsDsl<ts.Node> {
78 protected _lines: Array<string> = [];
···4344 // this class does not build a standalone node;
4445 // it modifies other nodes via `apply()`.
4546 // Return a dummy comment node for compliance.
4646- return ts.factory.createIdentifier('');
4747+ return this.$node(new IdTsDsl(''));
4748 }
4849}
+3-2
packages/openapi-ts/src/ts-dsl/layout/newline.ts
···11-import ts from 'typescript';
11+import type ts from 'typescript';
2233import { TsDsl } from '../base';
44+import { IdTsDsl } from '../expr/id';
4556export class NewlineTsDsl extends TsDsl<ts.Identifier> {
67 $render(): ts.Identifier {
77- return ts.factory.createIdentifier('\n');
88+ return this.$node(new IdTsDsl('\n'));
89 }
910}
+2-1
packages/openapi-ts/src/ts-dsl/layout/note.ts
···2233import type { MaybeArray } from '../base';
44import { TsDsl } from '../base';
55+import { IdTsDsl } from '../expr/id';
5667export class NoteTsDsl extends TsDsl<ts.Node> {
78 protected _lines: Array<string> = [];
···4142 // this class does not build a standalone node;
4243 // it modifies other nodes via `apply()`.
4344 // Return a dummy comment node for compliance.
4444- return ts.factory.createIdentifier('');
4545+ return this.$node(new IdTsDsl(''));
4546 }
4647}