From d6aa9aeaac9321a2ee73fa32247f2d4591cdd53d Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Thu, 26 Aug 2021 08:41:55 -0400 Subject: [PATCH] Fix type --- packages/map2tree/src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/map2tree/src/index.ts b/packages/map2tree/src/index.ts index 4239fdb6..fa920ee7 100644 --- a/packages/map2tree/src/index.ts +++ b/packages/map2tree/src/index.ts @@ -44,7 +44,7 @@ function getNode(tree: Node, key: string): Node | null { export default function map2tree( // eslint-disable-next-line @typescript-eslint/ban-types - root: {}, + root: unknown, options: { key?: string; pushMethod?: 'push' | 'unshift' } = {}, tree: Node = { name: options.key || 'state', children: [] } // eslint-disable-next-line @typescript-eslint/ban-types @@ -66,7 +66,8 @@ export default function map2tree( root && (root as { toJS: () => {} }).toJS ? // eslint-disable-next-line @typescript-eslint/ban-types (root as { toJS: () => {} }).toJS() - : root, + : // eslint-disable-next-line @typescript-eslint/ban-types + (root as {}), // eslint-disable-next-line @typescript-eslint/ban-types (maybeImmutable: { toJS?: () => {} }, key) => { const value =