@@ -4,24 +4,24 @@ import { Options, toASCII, ToASCIIOptions, toUnicode } from "tr46";
44type O = Options ;
55type TAO = ToASCIIOptions ;
66
7- toASCII ( "foo.bar" ) ; // $ExpectType string
8- toASCII ( "foo.bar" , { checkBidi : true } ) ; // $ExpectType string
9- toASCII ( "foo.bar" , { checkHyphens : true } ) ; // $ExpectType string
10- toASCII ( "foo.bar" , { checkJoiners : true } ) ; // $ExpectType string
11- toASCII ( "foo.bar" , { ignoreInvalidPunycode : true } ) ; // $ExpectType string
12- toASCII ( "foo.bar" , { transitionalProcessing : true } ) ; // $ExpectType string
13- toASCII ( "foo.bar" , { useSTD3ASCIIRules : true } ) ; // $ExpectType string
14- toASCII ( "foo.bar" , { verifyDNSLength : true } ) ; // $ExpectType string
7+ toASCII ( "foo.bar" ) ; // $ExpectType string | null
8+ toASCII ( "foo.bar" , { checkBidi : true } ) ; // $ExpectType string | null
9+ toASCII ( "foo.bar" , { checkHyphens : true } ) ; // $ExpectType string | null
10+ toASCII ( "foo.bar" , { checkJoiners : true } ) ; // $ExpectType string | null
11+ toASCII ( "foo.bar" , { ignoreInvalidPunycode : true } ) ; // $ExpectType string | null
12+ toASCII ( "foo.bar" , { transitionalProcessing : true } ) ; // $ExpectType string | null
13+ toASCII ( "foo.bar" , { useSTD3ASCIIRules : true } ) ; // $ExpectType string | null
14+ toASCII ( "foo.bar" , { verifyDNSLength : true } ) ; // $ExpectType string | null
1515// @ts -expect-error
1616toASCII ( "foo.bar" , { foo : true } ) ;
1717
18- toUnicode ( "foo.bar" ) ; // $ExpectType string
19- toUnicode ( "foo.bar" , { checkBidi : true } ) ; // $ExpectType string
20- toUnicode ( "foo.bar" , { checkHyphens : true } ) ; // $ExpectType string
21- toUnicode ( "foo.bar" , { checkJoiners : true } ) ; // $ExpectType string
22- toUnicode ( "foo.bar" , { ignoreInvalidPunycode : true } ) ; // $ExpectType string
23- toUnicode ( "foo.bar" , { transitionalProcessing : true } ) ; // $ExpectType string
24- toUnicode ( "foo.bar" , { useSTD3ASCIIRules : true } ) ; // $ExpectType string
18+ toUnicode ( "foo.bar" ) ; // $ExpectType { domain: string, error: boolean }
19+ toUnicode ( "foo.bar" , { checkBidi : true } ) ; // $ExpectType { domain: string, error: boolean }
20+ toUnicode ( "foo.bar" , { checkHyphens : true } ) ; // $ExpectType { domain: string, error: boolean }
21+ toUnicode ( "foo.bar" , { checkJoiners : true } ) ; // $ExpectType { domain: string, error: boolean }
22+ toUnicode ( "foo.bar" , { ignoreInvalidPunycode : true } ) ; // $ExpectType { domain: string, error: boolean }
23+ toUnicode ( "foo.bar" , { transitionalProcessing : true } ) ; // $ExpectType { domain: string, error: boolean }
24+ toUnicode ( "foo.bar" , { useSTD3ASCIIRules : true } ) ; // $ExpectType { domain: string, error: boolean }
2525// @ts -expect-error
2626toUnicode ( "foo.bar" , { verifyDNSLength : true } ) ;
2727// @ts -expect-error
0 commit comments