@@ -116,7 +116,7 @@ By default, openapiTS will generate `updated_at?: string;` because it’s not su
116116import openapiTS from "openapi-typescript";
117117import ts from "typescript";
118118
119- const DATE = ts.factory.createIdentifier("Date"); // ` Date`
119+ const DATE = ts.factory.createTypeReferenceNode(ts.factory. createIdentifier("Date") ); // ` Date`
120120const NULL = ts.factory.createLiteralTypeNode(ts.factory.createNull()); // `null`
121121
122122const ast = await openapiTS(mySchema, {
@@ -168,7 +168,7 @@ Use the same pattern to transform the types:
168168import openapiTS from "openapi-typescript";
169169import ts from "typescript";
170170
171- const BLOB = ts.factory.createIdentifier("Blob"); // ` Blob`
171+ const BLOB = ts.factory.createTypeReferenceNode(ts.factory. createIdentifier("Blob") ); // ` Blob`
172172const NULL = ts.factory.createLiteralTypeNode(ts.factory.createNull()); // `null`
173173
174174const ast = await openapiTS(mySchema, {
@@ -221,7 +221,7 @@ Here we return an object with a schema property, which is the same as the above
221221import openapiTS from "openapi-typescript";
222222import ts from "typescript";
223223
224- const BLOB = ts.factory.createIdentifier("Blob"); // ` Blob`
224+ const BLOB = ts.factory.createTypeReferenceNode(ts.factory. createIdentifier("Blob") ); // ` Blob`
225225const NULL = ts.factory.createLiteralTypeNode(ts.factory.createNull()); // `null`
226226
227227const ast = await openapiTS(mySchema, {
0 commit comments