Cannot find name 'ref'
See original GitHub issueI have an OpenAPI json like that:
{
"swagger": "2.0",
"definitions": {
"Messages": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Message"
}
},
"Message": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"text": {
"type": "string"
}
}
}
}
}
Which results in typescript:
export interface definitions {
Messages: { [key: string]: ref }
Message: { code?: number; text?: string }
}
It is not valid, because of ref. What is ref, and why it is not defined?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Typescript cannot find name even though it is referenced
I have an angular project I'm writing in typescript. This worked well for me under VS, and now I'm trying the same with...
Read more >project refs gives "cannot find name" error #30424 - GitHub
In your project-refs-typeroots-bug/tsconfig because you don't have "files": [] its including all files in the tree which do include files from ...
Read more >Angular - Cannot find name 'ElementRef' - Solved
This tutorial will provide example of Cannot find name 'ElementRef' in angular. this example will help you angular error ts2304 cannot find ...
Read more >Fix the Cannot Find Name 'require' Error in TypeScript
To fix the “cannot find name 'require'” error in TypeScript, install the @types/node package into your project by running npm i -D @types/node...
Read more >TypeScript error TS2304 cannot find name require - Edureka
The error that I'm getting is the "TS2304: Cannot find name 'require' " when I attempt to transpile a simple TypeScript Node.js page....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Also facing this issue. Any ideas on a timeframe for a fix?
Fixed (hopefully) in #266