|
| 1 | +badExport.ts(1,10): error TS2304: Cannot find name 'foo'. |
| 2 | +badExport.ts(1,17): error TS1003: Identifier expected. |
| 3 | +badExport.ts(1,20): error TS1128: Declaration or statement expected. |
| 4 | +badExport2.ts(1,10): error TS1003: Identifier expected. |
| 5 | +badExport2.ts(1,16): error TS2304: Cannot find name 'foo'. |
| 6 | +badExport2.ts(1,20): error TS1128: Declaration or statement expected. |
| 7 | +badImport.ts(1,10): error TS1003: Identifier expected. |
| 8 | +badImport.ts(1,10): error TS1141: String literal expected. |
| 9 | +badImport.ts(1,20): error TS1128: Declaration or statement expected. |
| 10 | +badImport.ts(1,22): error TS1434: Unexpected keyword or identifier. |
| 11 | +badImport.ts(1,22): error TS2304: Cannot find name 'from'. |
| 12 | +badImport2.ts(1,17): error TS1003: Identifier expected. |
| 13 | +badImport2.ts(1,17): error TS1141: String literal expected. |
| 14 | +badImport2.ts(1,20): error TS1128: Declaration or statement expected. |
| 15 | +badImport2.ts(1,22): error TS1434: Unexpected keyword or identifier. |
| 16 | +badImport2.ts(1,22): error TS2304: Cannot find name 'from'. |
| 17 | + |
| 18 | + |
| 19 | +==== foo.ts (0 errors) ==== |
| 20 | + const foo = 0n; |
| 21 | + export { foo as "0n" }; |
| 22 | + |
| 23 | +==== correctUse.ts (0 errors) ==== |
| 24 | + import { "0n" as foo } from "./foo"; |
| 25 | + export { foo as "0n" }; |
| 26 | + |
| 27 | +==== badImport.ts (5 errors) ==== |
| 28 | + import { 0n as foo } from "./foo"; |
| 29 | + ~~ |
| 30 | +!!! error TS1003: Identifier expected. |
| 31 | + ~~~~~~~~~ |
| 32 | +!!! error TS1141: String literal expected. |
| 33 | + ~ |
| 34 | +!!! error TS1128: Declaration or statement expected. |
| 35 | + ~~~~ |
| 36 | +!!! error TS1434: Unexpected keyword or identifier. |
| 37 | + ~~~~ |
| 38 | +!!! error TS2304: Cannot find name 'from'. |
| 39 | + |
| 40 | +==== badImport2.ts (5 errors) ==== |
| 41 | + import { foo as 0n } from "./foo"; |
| 42 | + ~~ |
| 43 | +!!! error TS1003: Identifier expected. |
| 44 | + ~~ |
| 45 | +!!! error TS1141: String literal expected. |
| 46 | + ~ |
| 47 | +!!! error TS1128: Declaration or statement expected. |
| 48 | + ~~~~ |
| 49 | +!!! error TS1434: Unexpected keyword or identifier. |
| 50 | + ~~~~ |
| 51 | +!!! error TS2304: Cannot find name 'from'. |
| 52 | + |
| 53 | +==== badExport.ts (3 errors) ==== |
| 54 | + export { foo as 0n }; |
| 55 | + ~~~ |
| 56 | +!!! error TS2304: Cannot find name 'foo'. |
| 57 | + ~~ |
| 58 | +!!! error TS1003: Identifier expected. |
| 59 | + ~ |
| 60 | +!!! error TS1128: Declaration or statement expected. |
| 61 | + |
| 62 | +==== badExport2.ts (3 errors) ==== |
| 63 | + export { 0n as foo }; |
| 64 | + ~~ |
| 65 | +!!! error TS1003: Identifier expected. |
| 66 | + ~~~ |
| 67 | +!!! error TS2304: Cannot find name 'foo'. |
| 68 | + ~ |
| 69 | +!!! error TS1128: Declaration or statement expected. |
0 commit comments