David Blass is a full-time open source TypeScript developer and author of ArkType, a 1:1 validator for TypeScript. ArkType is the first validator to include a static parser that can infer TypeScript’s syntax as well as a full type system that can compare arbitrary pairs of types for assignability and automatically discriminate unions. Predictably, David loves parsers and types, but also bow ties and his wife’s vegan cooking. He lives with her and their 5 pets in Boston, Massachusetts, and is currently pursuing funding to continue working on ArkType full-time! GitHub: github.com/arktypeio/arktype Docs: arktype.io Discord: discord.gg/xEzdc3fJQC Twitter (me): twitter.com/ssalbdivad Twitter (ArkType): twitter.com/arktypeio
31:50 ideally there would be 3 options in total: - input unknow + validation - input known without validation - input known + validation (new!) and this still makes sense because many ArkType restrictions can't be expressed via TypeScript like string length so actual validation is still required. sure, you can just pipe `.from(...)` into the validation manually, so this would just be a convenience function just like `.from()` technically is because you could also infer the type and use it that way.
That's a good way to think about it! I am adding user.from and user.fromOutput (for morphs, not covered in this video unfortunately) with the next release. My only concern with adding to many variants for niche scenarios is making the API feel overwhelming and/or less intuitive for new users, but I'll definitely consider a method like the one you described!
David Blass is a full-time open source TypeScript developer and author of ArkType, a 1:1 validator for TypeScript. ArkType is the first validator to include a static parser that can infer TypeScript’s syntax as well as a full type system that can compare arbitrary pairs of types for assignability and automatically discriminate unions. Predictably, David loves parsers and types, but also bow ties and his wife’s vegan cooking. He lives with her and their 5 pets in Boston, Massachusetts, and is currently pursuing funding to continue working on ArkType full-time!
GitHub: github.com/arktypeio/arktype
Docs: arktype.io
Discord: discord.gg/xEzdc3fJQC
Twitter (me): twitter.com/ssalbdivad
Twitter (ArkType): twitter.com/arktypeio
I am definitely going to check this out; I love type level programming and parsing.
thanks for your support!
31:50 ideally there would be 3 options in total:
- input unknow + validation
- input known without validation
- input known + validation (new!) and this still makes sense because many ArkType restrictions can't be expressed via TypeScript like string length so actual validation is still required.
sure, you can just pipe `.from(...)` into the validation manually, so this would just be a convenience function just like `.from()` technically is because you could also infer the type and use it that way.
That's a good way to think about it! I am adding user.from and user.fromOutput (for morphs, not covered in this video unfortunately) with the next release.
My only concern with adding to many variants for niche scenarios is making the API feel overwhelming and/or less intuitive for new users, but I'll definitely consider a method like the one you described!
Where is the first part?
This is the full interview on ArkType. Do you mean ua-cam.com/video/yWZqtsTVuug/v-deo.html by any chance?