cocopon / tweakpane

:control_knobs: Compact GUI for fine-tuning parameters and monitoring value changes
https://tweakpane.github.io/docs/
MIT License
3.52k stars 87 forks source link

Are types broken? #432

Closed fenomas closed 1 year ago

fenomas commented 1 year ago

Having just installed the newest version (3.1.0), I'm getting typescript warnings for all APIs in this library. For example:

import { Pane } from 'tweakpane'
var pane = new Pane()
pane.addFolder()   // tsc warning: Property 'addFolder' does not exist on type 'Pane'.

And poking around dist/types, the files there seem to include only a small subset of the actual API. E.g. /dist/types/pane/pane.d.ts contains only 2-3 public methods.

cocopon commented 1 year ago

Have you installed the core package?

https://cocopon.github.io/tweakpane/getting-started/

image
fenomas commented 1 year ago

Ahhh thank you - I'm migrating from v1.x, and I didn't notice the import had changed!

brandon-lb commented 1 year ago

Wonderful project. I was confused here too. I installed it by selecting the "npm package" button from the readme (to verify the npm package name before install) and noticed types were not working. Adding some install instructions on the readme and/or npm page might be helpful for some!

cocopon commented 8 months ago

Added some minor improvements to the docs (and it will be applied from the next release). Thank you for your feedback!