Skip to content

Instantly share code, notes, and snippets.

@na2hiro
Last active August 29, 2015 14:25
Show Gist options
  • Save na2hiro/6e49b3e74230a6bf6b25 to your computer and use it in GitHub Desktop.
Save na2hiro/6e49b3e74230a6bf6b25 to your computer and use it in GitHub Desktop.
TS4029 error case
$ 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.
export var PI = 3.14;
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
import mod = require("mod");
export = Hoge;
class Hoge{
mod;
mod2 = mod;
}
import mod = require("mod");
export = Hoge;
class Hoge{
mod2 = mod;
}
import mod = require("mod");
class Hoge{
mod = mod;
}
export = Hoge;
import mod = require("mod");
class Hoge{
static mod = mod;
}
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