Skip to content

ArkRegex's regex() returns any type in the playground #1529

Closed

Description

@roottool

Report a bug

Using ArkRegex's regex() in the Playground results in type inference being any, which is different from what is shown in the demo video of "Introducing ArkRegex".

Expected behavior

The results of type inference will be the same for both of the demo and the playground.

🔎 Search Terms

  • ArkRegex
  • regex
  • Playground

🧩 Context

  • Other context you think may be relevant (JS flavor, OS, etc.): The playground at the time this issue was created.

🧑‍💻 Repro

Playground Link: Here

The code for reproduction is the sample code in the blog post "Introducing ArkRegex".

import { regex } from "arkregex"

const ok = regex("^ok$", "i")
// Regex<"ok" | "oK" | "Ok" | "OK", { flags: "i" }>

const semver = regex("^(\\d*)\\.(\\d*)\\.(\\d*)$")
// Regex<`${bigint}.${bigint}.${bigint}`, { captures: [`${bigint}`, `${bigint}`, `${bigint}`] }>

const email = regex("^(?<name>\\w+)@(?<domain>\\w+\\.\\w+)$")
// Regex<`${string}@${string}.${string}`, { names: { name: string; domain: `${string}.${string}`; }; ...>

I don't know if it's related, but a reference error Define a Type called "Thing" to enable introspection. was displayed.

Screenshots Image Image

Activity

  1. added a commit that references this issue on Oct 13, 2026
    f7c4312
  2. ssalbdivad commented on Nov 18, 2026

    @ssalbdivad
    Member

    Fixed in 3.0.0-beta.0 (#1728). Try it with npm i arktype@next.

  3. moved this from To do to Done (merged or closed) in arktypeioon Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

  • Status
    Done (merged or closed)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions