mihneadb / node-directory-tree

Convert a directory tree to a JS object.
MIT License
523 stars 106 forks source link

dirTree attributes and Typescript #98

Closed cdupetit closed 3 years ago

cdupetit commented 3 years ago

Hello @mihneadb,

The typings says:

attributes ? : (keyof Stats)[];

So when you provide ["size", "type", "extension"], TS yells because he doesn't know about "type" and "extension" because they are not part of Stats declaration. Please fix. Thanks in advance. Cyril

Originally posted by @MichalLytek in https://github.com/mihneadb/node-directory-tree/issues/97#issuecomment-931501632

mihneadb commented 3 years ago

Hi, thanks for reporting. Fixed in https://github.com/mihneadb/node-directory-tree/commit/639b2c8d3b185936828b0b82e51feb433e24ceaa, published 3.0.1.