Skip to content

Quantifier ignored on invalid number inferenceΒ #1534

Description

@codpro2005

Report a bug

πŸ”Ž Search Terms

ArkRegex,
regex,
quantifiers,
whitespace

🧩 Context

  • ArkRegex version: 0.0.2
  • TypeScript version (5.1+): 5.9.3

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

Playground Link: https://www.typescriptlang.org/play/?ssl=5&ssc=30&pln=1&pc=1#code/JYWwDg9gTgLgBAbzlApgcxQDzgXzgMyghDgHIBDKAaxgE8wVSBuAKBYGMIA7AZ3mwC8ydFgAUpAHrkARkgCMOACSkAlADpgXfCiisA9HrhG4EgPwsDcHgAsIAVwA2AEzjSUALjide-TzPk4QA

import { regex } from 'arktype';

const x = regex('^ab{ 1}$').infer;
//    ^? const x: "a"
// should be: const x: ab{ 1}

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