Possible TSconfig issue in latest cli
Bug Report or Feature Request (mark with an x)
- [X ] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.0.0 node: 6.10.2 os: win32 x64
3.10.10 - npm
Repro steps.
let userName: HTMLCollectionOf<HTMLElement> = <HTMLCollectionOf<HTMLElement>>document.getElementsByClassName('userName');
for (let i = 0; i < 2; i++) {
userName[i].style.display = 'none';
}
The log given by the failure.
Property 'style' does not exist on type 'Element'.
Desired functionality.
Mention any other details that might be useful.
tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2016",
"dom"
]
}
}
tsconfig.app.json
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "es2015",
"baseUrl": ".",
"types": []
},
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}
Property 'style' does not exist on type 'Element'
Possibly related with: http://stackoverflow.com/q/43417011/5706293
Closing as answered by @echonax, cheers! That StackOverflow question seems to have a good answer.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.