Skip to content

Commit

Permalink
Fixes type error when using strict mode in TS
Browse files Browse the repository at this point in the history
Fixes the error:
    node_modules/directory-tree/index.d.ts:16:32 - error TS2344: Type 'TCustomResult' does not satisfy the constraint 'IObj'.
  • Loading branch information
Giacom committed Nov 16, 2022
1 parent 376ef98 commit 49b85a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Expand Up @@ -7,7 +7,7 @@ interface IObj {
declare function directoryTree<
TCustomFile extends IObj = IObj,
TCustomDir extends IObj = IObj,
TCustomResult = TCustomFile & TCustomDir
TCustomResult extends IObj = TCustomFile & TCustomDir
>(
path: string,
options?: directoryTree.DirectoryTreeOptions,
Expand Down

0 comments on commit 49b85a2

Please sign in to comment.