Question: Why does my generated type have a member of type `string option` instead of `ActualType option`?
See original GitHub issueI generated with the schema: “https://selectapi.datascope.refinitiv.com/RestApi/v1/Authentication/$metadata”.
One of the types that is generated is
type ActionImportRequestTokenPayload =
{ Credentials: Option<string> }
but it should be
type ActionImportRequestTokenPayload =
{ Credentials: Option<DataScopeSelectApiAuthenticationCredentials> }
Looking at the --from-odata-schema output, I see a few cases of anyOf, and I see from the readme section that anyOf is not supported.
Is the current absence of support the reason these types get represented as strings?
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Typescript Type 'string' is not assignable to type
I often run into the 'not assignable' error if I have a string like 'banana' in my typescript and the compiler thinks I...
Read more >Documentation - Object Types
It is possible to support both types of indexers, but the type returned from a numeric indexer must be a subtype of the...
Read more >Protobuf bytes type. but my question concerns ...
Current GRPC implementation validates strings to be UTF-8 only during ... Paths are specified in terms of the Protobuf type name (not the...
Read more >Python Type Checking (Guide)
type() returns the type of an object. These examples confirm that the type of thing is allowed to change, and Python correctly infers...
Read more >Methods - C# Guide
Since all types in the managed type system inherit directly or indirectly from the Object class, all types inherit its members, such as...
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

works, thank you.
Generating the code becomes a lot more difficult, but will think about it nonetheless. Using type aliases should be easy enough for consumers now