We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Types created using type functions with nested props don't work correctly.
type CustomType<Color> = { bar: { color: Color, }, } type MyType1 = CustomType<'red'>; type MyType2 = CustomType<'blue'>; type MyType = MyType1 | MyType2; console.log( is<MyType>({ bar: { color: 'red', } }), is<MyType>({ bar: { color: 'blue', } }), );
^ outputs true, false. Just for comparasion, if the color was not nested, the same example works.
true, false
color
The text was updated successfully, but these errors were encountered:
Use this, then no problem on such union type
https://github.com/samchon/typescript-json#runtime-validators
Sorry, something went wrong.
No branches or pull requests
Types created using type functions with nested props don't work correctly.
^ outputs
true, false
. Just for comparasion, if thecolor
was not nested, the same example works.The text was updated successfully, but these errors were encountered: