[**NOT RESOLVED**][Typing] Nested schemas properties are marked as any
See original GitHub issueDescribe the bug
This is using the @types/yup
package.
Define the following schema:
export const test = object({
prop: string(),
otherProp: object({
subProp: string(),
})
});
When compiled, this will output a .d.ts
file with the following:
export declare const test: import("yup").ObjectSchema<{
prop: string | undefined;
otherProp: {
subProp: any;
} | undefined;
} | undefined>;
To Reproduce
View the code sandbox.
To rebuild the Typescript, you can open a new terminal and type yarn build
.
https://codesandbox.io/s/yup-type-problem-inxy7
Expected behavior The nested properties are typed properly.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Python jsonschema unable to validate JSON schema ...
Look. remote_os in our data is a string, but it has been defined in the schema as being an object. Remove type: object...
Read more >Advanced topics on federated entities - Apollo GraphQL Docs
This article describes complex behaviors of federated entities beyond those covered in entity basics. Advanced @key s. A single entity can have multiple...
Read more >Structuring a complex schema — Understanding JSON ...
When an object contains a $ref property, the object is considered a reference, not a schema. Therefore, any other properties you put in...
Read more >Setting crawler configuration options - AWS Glue
Remove any metadata that is not set by the crawler. ... such as classification, compression type, or CSV delimiter, mark the table as...
Read more >Type Constraints - Configuration Language | Terraform
In this case, Terraform will replace any with the exact type of the given value and thus perform no type conversion whatsoever. Optional...
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
types aren’t maintained here currently open an Issue on DT please
@jquense The issue still persists, even in the latest version of yup.