Last active
August 29, 2015 14:25
-
-
Save na2hiro/6e49b3e74230a6bf6b25 to your computer and use it in GitHub Desktop.
TS4029 error case
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
$ sh ./run.sh | |
ts4029.ts(5,2): error TS4029: Public property 'mod' of exported class has or is using name '' from external module "mod" but cannot be named. | |
ts4029-another-variable.ts(6,2): error TS4029: Public property 'mod2' of exported class has or is using name '' from external module "mod" but cannot be named. |
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
export var PI = 3.14; |
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
tsc --module commonjs -d ts4029.ts # bad | |
tsc --module commonjs ts4029.ts # ok | |
tsc --module commonjs -d ts4029-static_ok.ts # ok | |
tsc --module commonjs -d ts4029-another-variable_ok.ts # ok | |
tsc --module commonjs -d ts4029-another-variable.ts # bad | |
tsc --module commonjs -d ts4029-non-export_ok.ts # ok |
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
import mod = require("mod"); | |
export = Hoge; | |
class Hoge{ | |
mod; | |
mod2 = mod; | |
} |
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
import mod = require("mod"); | |
export = Hoge; | |
class Hoge{ | |
mod2 = mod; | |
} |
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
import mod = require("mod"); | |
class Hoge{ | |
mod = mod; | |
} |
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
export = Hoge; | |
import mod = require("mod"); | |
class Hoge{ | |
static mod = mod; | |
} |
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
import mod = require("mod"); | |
export = Hoge; | |
class Hoge{ | |
mod = mod; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment