Tonejs / Midi

Convert MIDI into Tone.js-friendly JSON

Home Page:http://tonejs.github.io/Midi/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typescript typings not accessible?

TheJonRobinson opened this issue · comments

We have a Typescript project trying to use @tonejs/midi, but get typing errors for a number of types:

node_modules/@tonejs/midi/dist/Header.d.ts:1:26 - error TS7016: Could not find a declaration file for module 'midi-file'. '/Users/jonrobinson/dev/game-popstars/client/node_modules/midi-file/index.js' implicitly has an 'any' type.
  Try `npm install @types/midi-file` if it exists or add a new declaration (.d.ts) file containing `declare module 'midi-file';`

1 import { MidiData } from "midi-file";

It looks like the types are present in midi/src/midi-file.d.ts but the package.json refers to the dist folder for typings. An experimental copy of the midi-file.d.ts file to dist does indeed clear up the problem.

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.