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
These would be sweet as type guard functions in TypeScript.
As an example,
const blah: unknown = undefined let s: string = '' if (upcast.is(blah, 'string')) { s = blah // ok } else { s = blah // type error }
working sample implementation on TypeScript playground. Hover on blah within both branches of the conditional.
blah
The text was updated successfully, but these errors were encountered:
I’ll get to this soon. I’ve already got a typescript fork I’m using at work.
Sorry, something went wrong.
@OmgImAlexis hello, I know is old thread...but any chance you might share the types for upcast.js file? 🙏
upcast.js
No branches or pull requests
These would be sweet as type guard functions in TypeScript.
As an example,
working sample implementation on TypeScript playground. Hover on
blah
within both branches of the conditional.The text was updated successfully, but these errors were encountered: