Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript: no type for defaultFlamegraphTooltip #186

Open
nickgirardo opened this issue Sep 12, 2021 · 0 comments
Open

TypeScript: no type for defaultFlamegraphTooltip #186

nickgirardo opened this issue Sep 12, 2021 · 0 comments
Labels

Comments

@nickgirardo
Copy link
Contributor

Describe the bug
The function defaultFlamegraphTooltip is exported from your distribution index, however no type is present in your index.d.ts.

Without a type exported, a Typescript compiler does not think the function exists and will refuse to compile.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new typescript file
  2. Import defaultFlamegraphTooltip from your library (import { defaultFlamegraphTooltip } from 'd3-flame-graph';)
  3. See error TS2305: Module '"d3-flame-graph"' has no exported member 'defaultFlamegraphTooltip'.

Expected behavior
If types were set this would compile with no issue. The function is correctly exported, so if I prepend the line above with //@ts-ignore I can continue without issue. This is, however, obviously not ideal.

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Firefox
  • Version: 90.0

Additional context
For this issue my desktop information might not be too relevant. My Typescript version is "4.4.2"

@nickgirardo nickgirardo changed the title Typescript: no type for defaultFlamegraphTooltip TypeScript: no type for defaultFlamegraphTooltip Sep 12, 2021
@spiermar spiermar added the bug label Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants