nippur72 / ifdef-loader

Webpack loader for JavaScript/TypeScript conditional compilation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting wrong line numbers: "Including lines [NaN-NaN]"

Monokai opened this issue · comments

I don't know when this started but I think since 2.2.0, I'm getting Condition 'DEBUG' is TRUE. Including lines [NaN-NaN]. The line numbers were there before. It looks like the conditional still works fine. Any idea?

I think I know what could be. While changing a tuple [number,number] into a proper object, I noticed that TypeScript didn't complain at all, but I lazily ignored this fact. So I think now that has leaked into release (but only in the message printing as you already noticed). Let me check.

fixed in v2.2.1.

Apparently in TypeScript, it's perfectly normal to write a thing like:

let a = 8[5];

which IMO is a gun aimed at your foot.