-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0eba61c
commit 96a3047
Showing
28 changed files
with
213 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
tests/cases/conformance/externalModules/err1.d.ts(3,1): error TS1314: Global module exports may only appear in module files. | ||
tests/cases/conformance/externalModules/err2.d.ts(3,2): error TS1314: Global module exports may only appear in module files. | ||
tests/cases/conformance/externalModules/err2.d.ts(3,2): error TS1316: Global module exports may only appear at top level. | ||
tests/cases/conformance/externalModules/err3.d.ts(3,1): error TS1184: Modifiers cannot appear here. | ||
tests/cases/conformance/externalModules/err3.d.ts(4,1): error TS1184: Modifiers cannot appear here. | ||
tests/cases/conformance/externalModules/err3.d.ts(5,1): error TS1184: Modifiers cannot appear here. | ||
tests/cases/conformance/externalModules/err3.d.ts(6,7): error TS1134: Variable declaration expected. | ||
tests/cases/conformance/externalModules/err4.d.ts(3,2): error TS1316: Global module exports may only appear at top level. | ||
tests/cases/conformance/externalModules/err5.ts(3,1): error TS1315: Global module exports may only appear in declaration files. | ||
|
||
|
||
==== tests/cases/conformance/externalModules/err1.d.ts (1 errors) ==== | ||
|
||
// Illegal, can't be in script file | ||
export as namespace Foo; | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS1314: Global module exports may only appear in module files. | ||
|
||
==== tests/cases/conformance/externalModules/err2.d.ts (2 errors) ==== | ||
// Illegal, can't be in external ambient module | ||
declare module "Foo" { | ||
export as namespace Bar; | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS1314: Global module exports may only appear in module files. | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS1316: Global module exports may only appear at top level. | ||
} | ||
|
||
==== tests/cases/conformance/externalModules/err3.d.ts (4 errors) ==== | ||
// Illegal, can't have modifiers | ||
export var p; | ||
static export as namespace oo1; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS1184: Modifiers cannot appear here. | ||
declare export as namespace oo2; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS1184: Modifiers cannot appear here. | ||
public export as namespace oo3; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS1184: Modifiers cannot appear here. | ||
const export as namespace oo4; | ||
~~~~~~ | ||
!!! error TS1134: Variable declaration expected. | ||
|
||
==== tests/cases/conformance/externalModules/err4.d.ts (1 errors) ==== | ||
// Illegal, must be at top-level | ||
export namespace B { | ||
export as namespace C1; | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS1316: Global module exports may only appear at top level. | ||
} | ||
|
||
==== tests/cases/conformance/externalModules/err5.ts (1 errors) ==== | ||
// Illegal, may not appear in implementation files | ||
export var v; | ||
export as namespace C2; | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS1315: Global module exports may only appear in declaration files. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
//// [tests/cases/conformance/externalModules/umd-errors.ts] //// | ||
|
||
//// [err1.d.ts] | ||
|
||
// Illegal, can't be in script file | ||
export as namespace Foo; | ||
|
||
//// [err2.d.ts] | ||
// Illegal, can't be in external ambient module | ||
declare module "Foo" { | ||
export as namespace Bar; | ||
} | ||
|
||
//// [err3.d.ts] | ||
// Illegal, can't have modifiers | ||
export var p; | ||
static export as namespace oo1; | ||
declare export as namespace oo2; | ||
public export as namespace oo3; | ||
const export as namespace oo4; | ||
|
||
//// [err4.d.ts] | ||
// Illegal, must be at top-level | ||
export namespace B { | ||
export as namespace C1; | ||
} | ||
|
||
//// [err5.ts] | ||
// Illegal, may not appear in implementation files | ||
export var v; | ||
export as namespace C2; | ||
|
||
|
||
|
||
//// [err5.js] | ||
"use strict"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
=== tests/cases/conformance/externalModules/err5.d.ts === | ||
// Illegal, may not appear in implementation files | ||
export var v; | ||
>v : Symbol(v, Decl(err5.d.ts, 1, 10)) | ||
|
||
export as namespace C; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
=== tests/cases/conformance/externalModules/err5.d.ts === | ||
// Illegal, may not appear in implementation files | ||
export var v; | ||
>v : any | ||
|
||
export as namespace C; | ||
>C : any | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.