cell_helpers.ts

Declarations
#

8 declarations

view source

CellValueDecoder
#

cell_helpers.ts view source

CellValueDecoder<TSchema, TKey>

Type helper for decoders that includes base schema properties. Use this instead of ValueParser when creating decoders for cells to properly type the base properties.

generics

TSchema

constraint z.ZodType

TKey

constraint keyof z.infer<TSchema>
default keyof z.infer<TSchema>

FILE_DATETIME_FORMAT
#

FILE_SHORT_DATE_FORMAT
#

FILE_TIME_FORMAT
#

get_schema_class_info
#

cell_helpers.ts view source

(schema: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>> | null | undefined): SchemaClassInfo | null

Get schema class information from a Zod schema. This helps determine how to decode values based on their schema definition.

schema

type ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>> | null | undefined

returns

SchemaClassInfo | null

HANDLED
#

SchemaClassInfo
#

cell_helpers.ts view source

SchemaClassInfo

Schema class information extracted from a Zod schema.

type

type string

is_array

type boolean

class_name

type string

element_class

type string

ValueParser
#

cell_helpers.ts view source

ValueParser<TSchema, TKey>

generics

TSchema

constraint z.ZodType

TKey

constraint keyof z.infer<TSchema>
default keyof z.infer<TSchema>

Depends on
#

Imported by
#