angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Possible TSconfig issue in latest cli

Open anand-ma opened this issue 9 years ago • 3 comments

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'

anand-ma avatar Apr 25 '17 01:04 anand-ma

Possibly related with: http://stackoverflow.com/q/43417011/5706293

echonax avatar Apr 25 '17 06:04 echonax

Closing as answered by @echonax, cheers! That StackOverflow question seems to have a good answer.

filipesilva avatar May 05 '17 17:05 filipesilva

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.