code-chunks/angular2-logger

logger.ts has a non-typesafe number

Closed this issue · 4 comments

ERROR in ./~/angular2-logger/app/core/logger.ts
(62,39): error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'.

@jtesser

Do you mind sharing the ts config and the ts version you are using please?

Sure no problem
TypeScript is 2.0.2 https://github.com/dotCMS/dotJS/blob/master/package.json#L35

The config is
https://github.com/dotCMS/dotJS/blob/master/tsconfig.json
BUT I changed https://github.com/dotCMS/dotJS/blob/master/tsconfig.json#L10
If you set to false it will not work. Which means you code is not setting the type for a variable need to add :number
In the code it is generic

So what you are saying is that if you do:

"noImplicitAny": false

you don't get that error but if you do:

"noImplicitAny": true

you do get this error?

If so, that's totally working as expected.

However there's no reason why you should be compiling the logger's files, the distribution already includes the code compiled.

Closing since no more feedback was given.