Answer Overflow Logo
Change Theme
Search Answer Overflow
GitHub
Add Your Server
Login
Home
Popular
Topics
Gaming
Programming
All posts for arktype
Optional required pairs?
Best way of sharing/compiling types?
Why are the partial operator `?` and explicit `undefined` incompatible?
Framework-level onDeepUndeclaredKey
email or empty string not working
Test that a string contains a substring?
Is there a recommended way to create a Record using a type as a key?
`narrow` vs `satisfying`
Are there docs on how to do non-trivial self reference?
Some performance struggles
Using scope with morphs
Passing an exported scope to a function (Type 'string' is not assignable to type 'never')
Is there a way to set a default value that is not valid?
Union Fallthrough?
Defining and inferring a generic type defined inside a scope
morphing to typescript type
Generic middleware validator
Compiling scope to interfaces
Union of generics
Merging types instead of using an intersection when using generics
Generic & intersection
Is there a way to morph an optional value back to a required one?
Generic modules, Enums and AnyOf
Multiple @ark registries detected
File type
Type definitions must be strings or objects (was undefined)
Function which receives a arktype's 'type'
Conform to an existing type
Using `atLeastLength` on morphed array
Partial Application of the validator
Customizing Error Messages
v2 docs
Pipe chains don't work in rc13
Node of kind optional is not valid as a required definition
How to check if a function is Type instance?
Identifying a Date value in an object type
Extenting Type interface
Morph on failure
Property 'describe' does not exist on type 'instantiateType<inferTupleExpression<...>, {}>'
Piping types no longer works
Post-morph constraints not checked if constraints not met on another property
Is there currently a known issue with arktype + trpc compatibility?
How would you define an object with optional keys, but require at least one of the keys to be filled
`scope.validate` for a scope with imports
Automatic "full" discriminated union
Is there a recommended way to transform a type union into a discriminated union by adding a tag?
Is there a way to do a case insensitive literal match?
Is there a way to perform schema parsing generically?
Use native ts type
ParseError: undefined must be a PropertyKey or stringifyNonKey must be passed to options
Dynamic type based on another value
Why does an optional property add a " | undefined" instead of just being an optional property?
Generic with Narrow/Morph
Extracting defaults at runtime
Ark attest cannot find module error
Is there a way to parse Dates and date iso strings without losing toJsonSchema capabilities.
`string.integer.parsed` with limits
Got syntax error in some browser
ToJsonSchema fails with narrow
extracting redux-like actions from type.enumerated discriminated union
alternative to nesting quotes in quotes for strings?
template literal/backtick string types e.g. type T = `type-${string}`
Multiple versions
Compile-time typesafe merge/and for data-only "traits"
Creating default object from type definition
inferred type of '...' cannot be named without a reference to '...'
Type instantiation is excessively deep and possibly infinite
Extracting intent into runtime
string input, number output
Represent the File class
Any way to tell if a custom description has been provided?
Converting Zod to Arktype
Record with number as key?
Is there a way to rename the key in parse result
Can I add a default value to a type if everything other satisfies in a union type
How to type an expressjs-like route handler based on the path pattern.
Compiling to JavaScript results in `any` type
Was `any` removed?
Type instantiation is excessively deep and possibly infinite
Best way to pass `Type` around
Default number
Optional property with const string array
Extending types similar to an interface
Indexed Access Types
vscode intellisense errors on the same type definition in some files, but not others
Accept number in string type
Automatically applying parse.integer
Extract type from or
Get type without constraints
String length
codecs
subtypes available on scope in 2.0.0-beta.6
must be an instance of FormData (was object)
How to handle checkbox in type('parse.formData').to(...)
Latest "keys:distilled" equivalent?
Error internationalization (i18n)
Tried to initialize an $ark registry in a monorepo
Adding comment to object key
Optional key
Convert string to number with constraints
Are there examples of how to create mapped types?
ArkType mutates original input?
How to accept a generic non-empty const string array for use in `type`?
ParseError: Root of kind union should be one of alias,intersection,unit,domain,proto
Type Magic: validation on type property
Usage for HTTP validation
Can you create types with dynamic literals?
Cannot assign to Type
How to validate `Record<string, string>`?
Property 'name' is missing in type
Type 'distillOut<T>' is not assignable to type 'T'.
Mapping types
How to improve error messages?
Pipe required before narrow
Error transforming object
Problem with Out type
Problem with validation in 2.0 dev?
Referencing self
Export type to JSON and share it
Array error message
Unions with optional params?
ParseError: '3.0' was parsed as a number but could not be narrowed to a literal value.
CJS/ESM issue with arktype
The inferred type of '... cannot be named without a reference to '../../../../node_modules/arktype/
Need help with typing scope output properly
non-empty string - how to?
How to incorporate existing type?
How to declare an optional schema?
Can scopes validate?
How to properly make a property of a class type?
Utility to make Partials?
default values - how to define them?
Using existing enum/const to build a type
How to import `arktype` into a typescript project?
Context-sensitive validation / validation with parameters
Validate string is URL
How to validate that a value is an instance of a class
Key not specified in type, but no problems
Array/Object keys to type?
Nesting ArkTypes within a regex
Custom type-making functions
Syntax Overview
How to access current scope types with `type()` / `morph()` / `narrow()` / `arrayOf()` inside scope?