Skip to content

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

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

Fields

No fields configured for issues without a type.

Projects

Status
Done (merged or closed)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions