David Blass
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!
ArkType: Bringing TypeScript to Runtime
TypeScript Congress 2023
21 min
ArkType: Bringing TypeScript to Runtime
ArkType is a new runtime validator for TypeScript and the first library with the goal of making type syntax available 1:1 in JS with no compilation step.
It uses a carefully optimized static parser so that with each character you type, you'll see a list of completions, a clear ParseError, or your inferred type. At runtime, a simple definition like "string|number[]" will be transformed into a TypeNode that can be used to validate or transform inputs, compared to other TypeNodes, or combined with other definitions to form new TypeNodes.
This talk will cover the process of building ArkType, with a focus on the type-level parser and runtime type system, and demo some of the most exciting features like scopes, index signatures and generics.
It uses a carefully optimized static parser so that with each character you type, you'll see a list of completions, a clear ParseError, or your inferred type. At runtime, a simple definition like "string|number[]" will be transformed into a TypeNode that can be used to validate or transform inputs, compared to other TypeNodes, or combined with other definitions to form new TypeNodes.
This talk will cover the process of building ArkType, with a focus on the type-level parser and runtime type system, and demo some of the most exciting features like scopes, index signatures and generics.