eclipse-typescript
eclipse-typescript copied to clipboard
imports not reporting errors
I'm using external modules in typescript. I have two imports: import {IDashWidgetData} from '../data/IDashWidgetData'; import {ITabularData} from '../../data/ITabularData';
The files are both in the same directory, and the correct path is the bottom one. However, the top is not reported as an error in the TypeScript editor (1.7.0.v20151201-1631). When actually compiling (command line) , using the typescript compiler, it fails to compile (cannot find module ...). If I get the name wrong (e.g: '../data/IDashWidgetDataZZZ' or '../dataZZZ/IDashWidgetData'), the editor correctly reports it as an error.
Basically, if I give it a path that could be valid, depending on where you start from, then the editor doesn't report it as an error (but the compiler does).
Hmm, that's not good. The errors reported by the plug-in are from the TypeScript language services so this might either be a bug in how the service is being used or the service itself. Its likely going to be a while before I'll have a chance to look into this so if you'd like to take a shot at a fix I'd love to take back the PR.
@mconner try setting module to commonjs. If that fixes it (starts giving error) report back :rose:
@basarat good idea!
@basarat I already had "Module code generation:" in Preferences>TypeScript>Compile set to CommonJS. (Sorry for the delayed response. I thought I had responded already.)
this appears to be fixed in 1.8