CirclonGroup / angular-tree-component

A simple yet powerful tree component for Angular (>=2)
https://angular2-tree.readme.io/docs
MIT License
1.1k stars 492 forks source link

IDTypeDictionary type indexer causes ts lint compiler to fail #782

Closed hiwotamare closed 4 years ago

hiwotamare commented 4 years ago

Typescript is complaining because of the following type in the library; `export declare type IDTypeDictionary = {

     } | {
   [ id: number]: boolean;

};`

const fld: IDTypeDictionary = {}; fld[2] = false; // error TS7017: Element implicitly has an 'any' type because type 'IDTypeDictionary' has no index signature.

Suggested fix:

  1. Add number type indexer: export declare type IDTypeDictionary = { };
  2. Or alternatively use an interface: export declare interface IDTypeDictionary { }
adamkleingit commented 4 years ago

This was fixed and published, please use latest version