10 comments
Comment actions Permalink

is the corresponding d.ts file included in tsconfig.json? Does compilation work outside of WebStorm when using same config? Also, please provide your tsconfig.json and output from typescript compiler console

0
Comment actions Permalink

Compilation works fine but just is marked red when writing code annoying.



{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true
},
"exclude": [
"node_modules",
"typings/index.d.ts",
"typings/index"
],
"filesGlob": [
"./src/**/*.ts",
"./test/**/*.ts",
"!./node_modules/**/*.ts",
"src/custom_typings.d.ts",
"typings/index.d.ts"
],
"compileOnSave": false,
"buildOnSave": false,
"atom": {
"rewriteTsconfig": false
},
"files": [
"typings/index.d.ts",
"./src/app.ts",
"./src/main.ts",
"./src/polyfills.ts",
"src/app/xxxxxxxxxxxxxxxxx.ts",
"more of my app ts files"



in version 2016.1.3 I did not find this issue. Only after upgrade to .2. Also HTML tags is greyed as below:



0
Comment actions Permalink

and where is the Promise defined? Also, can you provide the compiler console content?

 

>HTML tags is greyed as below

they aren't greyed in your screenshot - look normal... Only the comment appear in grey - as it should. Can you explain what is wrong here in your opinion?

0
Comment actions Permalink

the background of html content is grey, just like they are selected. Previous version is clear white.

Cannot figure out where promise, require, then defined, maybe in typings.json but the point is in 2016.1.x no such problems.

there is no error in console during compiling. Here is last few lines.

7:486-493 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
@ ./~/swagger-client/browser/swagger-client.min.js 7:486-493
Child html-webpack-plugin for "index.html":
chunk {0} index.html 468 kB [rendered]
[0] ./~/html-webpack-plugin/lib/loader.js!./src/index.html 3.47 kB {0} [built]
factory:38ms building:38ms = 76ms
[1] ./~/html-webpack-plugin/~/lodash/index.js 411 kB {0} [built]
[0] 76ms -> factory:2786ms building:556ms = 3418ms
[2] ./~/underscore/underscore.js 52.9 kB {0} [built]
[0] 76ms -> [1] 3342ms -> factory:994ms building:1074ms = 5486ms
[3] (webpack)/buildin/module.js 251 bytes {0} [built]
[0] 76ms -> [1] 3342ms -> factory:3317ms building:973ms = 7708ms
webpack: bundle is now VALID.

0
Comment actions Permalink

>the background of html content is grey, just like they are selected. Previous version is clear white.

nothing has changed, this is the default background color for HTML tags that is there for years. you can change it in Settings | Editor | Color & Fonts | Language Defaults | Markup | Tag

>Cannot figure out where promise, require, then defined

What file is open when you Ctrl+click on Promise?

>there is no error in console during compiling. Here is last few lines

these are lines from webpack build. And I'm asking for TypeScript compiler console contents (Typescript toolwindow, Console tab)

0
Comment actions Permalink

only refer to admin/ where the project is located

 

then:

require:



No typescript toolwindow found in tool window selection tab

 

0
Comment actions Permalink

Hmm... Please attach a screenshot of Settings (Preferences) | Languages & Frameworks | TypeScript

0
Comment actions Permalink

I use webpack bundle to compile ts files. yeah I did not enable the compiler. since I think it will add unused files in my project

0
Comment actions Permalink

I found the problem. 2016.2 incorrectly processed include/exclude order in tsconfig.json.

As a result, an exclude annotation will ban following include annotation. Then typings path will not be processed through the environment. I removed the exclude lines then solved.

0
Comment actions Permalink

Thanks for clearing it up! Reproduced, please follow https://youtrack.jetbrains.com/issue/WEB-22377 for updates

0

Please sign in to leave a comment.