arktype icon indicating copy to clipboard operation
arktype copied to clipboard

TypeScript's 1:1 validator, optimized from editor to runtime

Results 100 arktype issues
Sort by recently updated
recently updated
newest added

This would be a large feature allowing JSON schemas as an alternative definition format, that would be statically validated and inferred, similarly to the primary TS-based syntax. Some additional investigation...

Using the new metadata attached to type nodes, we could convert a type node back into a minimal definition for that node in a given scope. This could be extremely...

Given a definition like: ```ts const $ = scope({ a: ["'a'", "=>", () => "b"], o: { "[a]": "string", }, }); ``` We could parse `o` as an object of...

We previously had a test case like this: ```ts const $ = scope({ a: () => $.type({ b: "b" }), b: () => $.type({ a: "a" }), }); ``` Sometime...

After the refactor is complete, search repo for this issue's link and address any TODOs referencing it. Also, add: = (Default value) (should also work in string) Merge (maybe use...

This is a likely candidate for a bug in TS, though more investigation is needed. The b key following expression is incorrectly inferred as never: ```ts const myType = type({...

#804 fixes the `no-restricted-imports` eslint rule, but I wasn't able to quickly restrict imports from a folder project wide.

```ts // Very efficient const a = type({ a: "string", }); // Also fine const referenced = type("string"); const b = type({ a: referenced, }); // Much slower const b...

Would use the expected syntax: ```ts const inScope = scope({ "box": { box: "s", }, }); const inType = type("", { box: "s", }); ``` Should also update `tsGenerics` from...

Would add support for declaring the inferred types of an entire scope, with autocomplete for alias names. Similar to existing API for declared types (in beta). Maybe something like: ```ts...