File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 "c8" : " ^11.0.0" ,
1616 "eslint" : " ^9.17.0" ,
1717 "neostandard" : " ^0.13.0" ,
18- "tsd " : " ^0.33 .0"
18+ "tstyche " : " ^7.0 .0"
1919 },
2020 "scripts" : {
2121 "lint" : " eslint" ,
2222 "lint:fix" : " eslint --fix" ,
2323 "test" : " npm run test:unit && npm run test:typescript" ,
24- "test:typescript" : " tsd " ,
24+ "test:typescript" : " tstyche " ,
2525 "test:unit" : " c8 --100 node --test"
2626 },
2727 "repository" : {
7575 }
7676 ],
7777 "license" : " MIT"
78- }
78+ }
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import safeRegex , { safeRegex as safeRegexNamed } from '..'
2+ import { expect } from 'tstyche'
3+
4+ expect ( safeRegex ( 'regex' ) ) . type . toBe < boolean > ( )
5+ expect ( safeRegex ( / r e g e x / ) ) . type . toBe < boolean > ( )
6+ expect ( safeRegex ( '^[a-zA-Z0-9]+(?:\\s[a-zA-Z0-9]+)*$' ) ) . type . toBe < boolean > ( )
7+ expect ( safeRegex ( / ^ [ a - z A - Z 0 - 9 ] + (?: \s [ a - z A - Z 0 - 9 ] + ) * $ / g) ) . type . toBe < boolean > ( )
8+
9+ expect ( safeRegexNamed ( 'regex' ) ) . type . toBe < boolean > ( )
10+ expect ( safeRegexNamed ( / r e g e x / ) ) . type . toBe < boolean > ( )
11+ expect ( safeRegexNamed ( '^[a-zA-Z0-9]+(?:\\s[a-zA-Z0-9]+)*$' ) ) . type . toBe < boolean > ( )
12+ expect ( safeRegexNamed ( / ^ [ a - z A - Z 0 - 9 ] + (?: \s [ a - z A - Z 0 - 9 ] + ) * $ / g) ) . type . toBe < boolean > ( )
You can’t perform that action at this time.
0 commit comments