bkrem/react-d3-tree

Question: How do you import type `TreeProps`?

remarkablemark opened this issue · 3 comments

Are you reporting a bug, or opening a feature request?

TypeScript question

What is the actual behavior/output?

Importing type throws error:

Screen Shot 2023-02-05 at 5 25 03 PM

I ended up having to import the type with:

import { TreeProps } from 'react-d3-tree/lib/types/Tree/types'

What is the behavior/output you expect?

Importing type should work:

import type { TreeProps } from 'react-d3-tree'

Can you consistently reproduce the issue/create a reproduction case (e.g. on https://codesandbox.io)?

https://replit.com/@remarkablemark/react-d3-tree#src/CenteredTree.tsx

What version of react-d3-tree are you using?

3.5.0

If react-d3-tree crashed with a traceback, please paste the full traceback below.

N/A

@remarkablemark
try to import like this 🔽
import { TreeProps } from 'react-d3-tree/lib/Tree/types';

Thanks @Devamchaudhari!

Welcome @remarkablemark 😄