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
Extend at runtime doesn't seem to match its inferred type (nor typescript).
Here's a simple example:
import { Type, type Static } from '@sinclair/typebox'; const T = Type.Intersect([ Type.Object({ str: Type.String(), }), Type.Object({ num: Type.Number(), }), ]); type T = Static<typeof T>; type R1 = T extends T ? true : false; const R2 = Type.Extends(T, T, Type.Literal(true), Type.Literal(false)); type R2 = Static<typeof R2>; const assertTrue1: R1 = true; // passes const assertTrue2: R2 = true; // passes if (!R2.const) { throw new Error(`oh no ${ R2.const.toString() }`); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Extend at runtime doesn't seem to match its inferred type (nor typescript).
Here's a simple example:
The text was updated successfully, but these errors were encountered: