Skip to content

type.fn.raw incorrectly undefined (exists only at type-level)Β #1609

@eralmansouri

Description

@eralmansouri

Report a bug

πŸ”Ž Search Terms

type.fn

🧩 Context

  • ArkType version: 2.2
  • TypeScript version (5.1+): 5.9, 6.0

πŸ§‘β€πŸ’» Repro

type.fn.raw is always undefined, but exists at the type-level (typed as a function):

import { type } from "arktype"

type.fn.raw() // throws type.fn.raw is not a function
//      ^? FnParser<{}>.raw: (...args: unknown[]) => (...args: unknown[]) => unknown
//         An alias of fn with no type-level validation or inference.
//         Useful when wrapping fn or using it to parse a dynamic definition.

Playground: Link

Edit: Fixed an incorrect playground link.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

Status

To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions