pencil-js/pencil.js

Broken type definitions

stefnotch opened this issue ยท 2 comments

Information

  • Your current navigator: Firefox 87
  • The package and version you used: pencil.js v2.1.0
  • NPM version: 7.0.15

Description

I installed this library using npm i pencil.js.
Then I imported some basic stuff

import { Scene, Triangle } from "pencil.js";

And then I tried using the triangle, however the Typescript definitions mostly didn't work. It seems like this is causing it
image

Hi,

This is the same cause as #92. However, this issue is more concerning since it breaks real life usage (not only examples).

If you're using a bundler (eg webpack), here's the current quickfix to avoid this:

import { Scene, Triangle } from "pencil.js/src";

I'm actively working to fix this problem as soon as possible.