-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Closed
Copy link
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: DecoratorsThe issue relates to the decorator syntaxThe issue relates to the decorator syntaxFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
Hi guys,
A "error" will be happened when there is have a undefined namespace property, for example, I have such a namespace definition, but lack of some property:
export namespace com {
export namespace alibaba {
export namespace constant{
export interface Constant{}
}
}
}
above example I am forgetting to define a namespace test and the interface demo.
Then I use the v2.9.1 to compile this segment code:
function A(a: com.alibaba.test.demo) {}
Ts will generate the "error" code,
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
function A([typeof (_e = ((_c = ((_d = (typeof com !== "undefined" && com).alibaba) && _d).test) && _c).demo)) === "function" && _e || Object)
the above code can not run.
I test other versions, only the version which > 2.9.0 will compile to this style.
< 2.9.1, eg, 2.9.0, will compile to :
function A(Object)
Any guys who know this compile rule is based on which feature, I read the changeLog but can not find any change which is related to this.
Thanks in advance.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: DecoratorsThe issue relates to the decorator syntaxThe issue relates to the decorator syntaxFixedA PR has been merged for this issueA PR has been merged for this issue