Comments (6)
Yes - confirmed. You need features from TS 4.7+; versions below that show this error.
from magic-regexp.
@tim3trick No need to do anything. For now you can use a newer version of TypeScript. I'll keep this open until I've had a chance to see whether it's possible to make the features of this library work with earlier versions of TS or whether I should instead mention it in the README.
from magic-regexp.
Addition: oneOrMore('x')
fails with the same when used inside and
,
i have updated the sandbox: https://codesandbox.io/s/angry-wave-fr0m5s?file=/src/index.ts
Code that fails:
createRegExp( oneOrMore('a') .and('.') .and(oneOrMore('b')) )
from magic-regexp.
You can see it working fine in stackblitz (here). It also works fine for me locally.
Are you getting this locally, or just in codesandbox (which seems to be using TS 4.4)? If so, what is your local TypeScript version?
from magic-regexp.
I get this locally with 4.6.3 as well.
from magic-regexp.
Excuse the question, but am I supposed to to something with the ticket?
from magic-regexp.
Related Issues (20)
- `createRegExp` not sanitising strings (in type) HOT 1
- Very low contrast
- Incorrect open graph image HOT 1
- 500 - If you want to use `GithubLink` component, you must specify: `owner`, `repo` and `branch`.
- how do i recreate a password requirements regex? HOT 5
- No "exports" main defined in ....\.pnpm\[email protected]\node_modules\estree-walker\package.json HOT 3
- Lazy quantifier HOT 1
- not.word is not defined HOT 1
- Why is `MagicRegExpMatchArray` typed with `string | undefined`? HOT 3
- Infer the literals used in the type of the groups HOT 10
- Allow for custom regex, and clarifying the usage of `anyOf()` HOT 7
- Library blocks Typescript compilation HOT 2
- Action Required: Fix Renovate Configuration
- Documentation site is down HOT 1
- Can I rework docs using Nuxt UI Pro HOT 4
- Maige Usage
- Support match everything in preset inputs
- [QUESTION] How to create typed function with RegExp or MagicRegExp input? (TypeScript)
- Unable to convert regex with custom character set to magic-regexp
- The esbuild plugin doesn't work flawlessly with tsup
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magic-regexp.