-
-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Report a bug
π Search Terms
instanceOf
π§© Context
- ArkType version: 2.2.0
- TypeScript version (5.1+): 5.9.3
π§βπ» Repro
import { type } from "arktype"
const Thing = type({
tags: type
.Record("string", "boolean")
.pipe((tags) => Object.keys(tags))
.pipe((tags) => tags.map((tag) => tag.slice(1).replaceAll("_", "-")))
.to("string.uuid[] > 0") // Doesn't work.
// .pipe(type("string.uuid[] > 0")) // Works.
})
const out = Thing({
tags: {
_6baf599f_8a93_478c_9a3b_51cc01451628: true
}
})The above code causes a ParseError to be thrown with the following message: instanceOf operand must be a function (was undefined).
Interestingly, using .pipe(type("string.uuid[] > 0")) works.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
To do