unjs / magic-regexp

A compiled-away, type-safe, readable RegExp alternative

Home Page:https://regexp.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`createRegExp` not sanitising strings (in type)

danielroe opened this issue · comments

createRegExp('.com') should return the same type as createRegExp(exactly('.com'))

Hi.

If I understand the problem correctly, I assume I'll have to make a new type similar to Join in src/core/types/join.ts? I imagine that being quite complicated though, so is there a better/easier way here?