Open ThePlenkov opened 1 year ago
Create env.d.ts file at the root of your project and put something like this into there
declare module 'object-treeify' {
export type Node = Tree | boolean | string | number | null | undefined;
export type Tree = {
[key: string]: Node;
};
export type Options = {
joined?: boolean;
spacerNoNeighbour?: string;
spacerNeighbour?: string;
keyNoNeighbour:? string;
keyNeighbour:? string;
separator:? string;
renderFn?: (node: Node) => boolean | undefined;
sortFn?: ((a: string, b: string) => number) | null;
breakCircularWith?: string | null;
};
function F(tree: Tree, options?: Options): string;
export = F;
}
Hi!
For such a code:
I have an error:
Is there any module which has types?
Thanks!