ReferenceType has undefined type
See original GitHub issueI get the an undefined error trying to parse MyType
.
import { View, ViewStyle, StyleProp } from 'react-native';
export type MyType = StyleProp<ViewStyle>
TypeError: Cannot read property 'getId' of undefined
at ReferenceType.getId (/Users/awinograd/programming/ts-json-schema-generator/dist/src/Type/ReferenceType.js:12:26)
at (.types.map (/Users/awinograd/programming/ts-json-schema-generator/dist/src/Type/UnionType.js:11:25)
at Array.map (<anonymous>)
at UnionType.getId (/Users/awinograd/programming/ts-json-schema-generator/dist/src/Type/UnionType.js:10:33)
at ids.join.<.context.getArguments.map (/Users/awinograd/programming/ts-json-schema-generator/dist/src/CircularReferenceNodeParser.js:33:78)
at Array.map (<anonymous>)
at CircularReferenceNodeParser.createCacheKey (/Users/awinograd/programming/ts-json-schema-generator/dist/src/CircularReferenceNodeParser.js:33:61)
at CircularReferenceNodeParser.createType (/Users/awinograd/programming/ts-json-schema-generator/dist/src/CircularReferenceNodeParser.js:13:26)
at ChainNodeParser.createType (/Users/awinograd/programming/ts-json-schema-generator/dist/src/ChainNodeParser.js:17:50)
at ExpressionWithTypeArgumentsNodeParser.createType (/Users/awinograd/programming/ts-json-schema-generator/dist/src/NodeParser/ExpressionWithTypeArgumentsNodeParser.js:23:41)
So far, I’ve figured out that getId
is called in createType
before the returned value is actually set on the reference on the same line in CircularReferenceNodeParser
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
"Record is using a reference type undefined in this output style"?
This link answer the question on what do I do if I get an error message that says "Record is using a reference...
Read more >How to resolve "[Record #9063 is using a reference type ...
“[Record #9063 is using a reference type undefined in this output style.]” (the second one has a different record #).
Read more >Reference Type Within itself, TypeScript - Stack Overflow
This generic mapped type takes an object Routes and maps it to a new object with the same keys, but the values are...
Read more >ReferenceType (Java Debug Interface ) - Oracle Help Center
For arrays ( ArrayType ) and primitive classes, the return value is undefined. Returns: true if this type is abstract; false otherwise. isFinal....
Read more >What does this mean: [Record #2776 is using a reference type ...
[Record #2573 is using a reference type undefined in this output style.] What does it mean and how can I resolve the problem?...
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 FreeTop 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
Top GitHub Comments
Here’s a minimal repro in astexplorer.net for reference
https://astexplorer.net/#/gist/f418932fb2afef0eb5a16cd9fb2598f1/79e310c9b62ea6ef55e558242cb530c810743c68
I recommend https://astexplorer.net/ to look at what is actually defined.