@@ -116,7 +116,7 @@ By default, openapiTS will generate `updated_at?: string;` because it’s not su
116
116
import openapiTS from "openapi-typescript";
117
117
import ts from "typescript";
118
118
119
- const DATE = ts.factory.createIdentifier("Date"); // ` Date`
119
+ const DATE = ts.factory.createTypeReferenceNode(ts.factory. createIdentifier("Date") ); // ` Date`
120
120
const NULL = ts.factory.createLiteralTypeNode(ts.factory.createNull()); // `null`
121
121
122
122
const ast = await openapiTS(mySchema, {
@@ -168,7 +168,7 @@ Use the same pattern to transform the types:
168
168
import openapiTS from "openapi-typescript";
169
169
import ts from "typescript";
170
170
171
- const BLOB = ts.factory.createIdentifier("Blob"); // ` Blob`
171
+ const BLOB = ts.factory.createTypeReferenceNode(ts.factory. createIdentifier("Blob") ); // ` Blob`
172
172
const NULL = ts.factory.createLiteralTypeNode(ts.factory.createNull()); // `null`
173
173
174
174
const ast = await openapiTS(mySchema, {
@@ -221,7 +221,7 @@ Here we return an object with a schema property, which is the same as the above
221
221
import openapiTS from "openapi-typescript";
222
222
import ts from "typescript";
223
223
224
- const BLOB = ts.factory.createIdentifier("Blob"); // ` Blob`
224
+ const BLOB = ts.factory.createTypeReferenceNode(ts.factory. createIdentifier("Blob") ); // ` Blob`
225
225
const NULL = ts.factory.createLiteralTypeNode(ts.factory.createNull()); // `null`
226
226
227
227
const ast = await openapiTS(mySchema, {
0 commit comments