File tree Expand file tree Collapse file tree 5 files changed +63
-0
lines changed
Expand file tree Collapse file tree 5 files changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ *
2+ ! ** /* .d.ts
3+ ! ** /* .d.cts
4+ ! ** /* .d.mts
5+ ! ** /* .d. * .ts
Original file line number Diff line number Diff line change 1+ import diacritics = require( "diacritic" ) ;
2+
3+ const cleaned = diacritics . clean ( "déjà vu" ) ;
4+ // $ExpectType string
5+ cleaned ;
6+
7+ const mapped = diacritics . map [ "é" ] ;
8+ // $ExpectType string
9+ mapped ;
10+
11+ // @ts -expect-error
12+ diacritics . clean ( 123 ) ;
Original file line number Diff line number Diff line change 1+ export as namespace Diacritics ;
2+
3+ interface DiacriticsStatic {
4+ map : Record < string , string > ;
5+ clean ( input ?: string | null ) : string ;
6+ }
7+
8+ declare const diacritics : DiacriticsStatic ;
9+
10+ export = diacritics ;
Original file line number Diff line number Diff line change 1+ {
2+ "private" : true ,
3+ "name" : " @types/diacritic" ,
4+ "version" : " 0.0.9999" ,
5+ "projects" : [
6+ " https://github.com/nijikokun/Diacritics.js"
7+ ],
8+ "devDependencies" : {
9+ "@types/diacritic" : " workspace:."
10+ },
11+ "owners" : [
12+ {
13+ "name" : " TurtIeSocks" ,
14+ "githubUsername" : " TurtIeSocks"
15+ }
16+ ]
17+ }
Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "module" : " node16" ,
4+ "lib" : [
5+ " es6"
6+ ],
7+ "noImplicitAny" : true ,
8+ "noImplicitThis" : true ,
9+ "strictNullChecks" : true ,
10+ "strictFunctionTypes" : true ,
11+ "types" : [],
12+ "noEmit" : true ,
13+ "forceConsistentCasingInFileNames" : true
14+ },
15+ "files" : [
16+ " index.d.ts" ,
17+ " diacritic-tests.ts"
18+ ]
19+ }
You can’t perform that action at this time.
0 commit comments