Closed depsimon closed 1 day ago
Do you think this is related: https://github.com/microsoft/TypeScript/issues/40263
Did you manage to solve this? 🙂 I ran into the same problem when following the docs example.
Nope, I'm not using this at the moment.
Seems to work to wrap the Identifiers in ts.factory.createTypeReferenceNode
:
const BLOB = ts.factory.createTypeReferenceNode(ts.factory.createIdentifier("Blob"));
const FILE = ts.factory.createTypeReferenceNode(ts.factory.createIdentifier("File"));
const NULL = ts.factory.createLiteralTypeNode(ts.factory.createNull());
Btw. I found out by using the TypeScript AST Viewer, where you can type in some TypeScript and see the factory method calls needed to generate that TypeScript: https://ts-ast-viewer.com/#code/C4TwDgpgBMEM7CgXigMQJYBsIB8B2ArppkA
Btw. I found out by using the TypeScript AST Viewer, where you can type in some TypeScript and see the factory method calls needed to generate that TypeScript: https://ts-ast-viewer.com/#code/C4TwDgpgBMEM7CgXigMQJYBsIB8B2ArppkA
Oh I hadn’t seen that website before! That’s very handy! Bookmarking it.
Description
I'm trying to use the docs example to transform the schema for Date & Blobs.
openapi-typescript
7.0.0-rc.0
v20.11.1
v5.5.5
macOS 14.5
Reproduction
Here's my TS file I'm using to generate my SDK:
Expected result
No Typescript errors.
Checklist
npx @redocly/cli@latest lint
)