Skip to content

Commit 3e98b37

Browse files
committed
fix example
1 parent 815e05d commit 3e98b37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ or as dev dependency: `npm i -D typed-regexp`
2121
```ts
2222
import type { TypedRegExp } from "typed-regexp";
2323

24-
const regexp = /(?<name>[ab])({.*)/ as TypedRegExp<[`{${name}`],{group:"a"|"b"}>;
24+
const regexp = /(?<name>[ab])({.*)/ as TypedRegExp<[`{${string}`],{name:"a"|"b"}>;
2525
const match = "string to match".match(regexp);
2626
if (match) {
2727
const namedGroup = match.groups.name;

0 commit comments

Comments
 (0)