Tone.js icon indicating copy to clipboard operation
Tone.js copied to clipboard

Incorrect import causes typescript compilation issue

Open IARI opened this issue 2 years ago • 1 comments

Describe the bug

In https://github.com/Tonejs/Tone.js/blob/dev/Tone/core/type/Units.ts there is the import statement

import { Note } from "./NoteUnits";

This causes a TS compilation error error TS1484: 'Note' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

To Reproduce

Add tone.js as a dependency in a project with 'verbatimModuleSyntax' is enabled.

IARI avatar Nov 09 '23 02:11 IARI

It seems like Tone.js isn't quite ready for verbatimModuleSyntax, from what i'm understanding, in order to get it there, all of the type imports would need to be separated out from the rest of the imports

tambien avatar Feb 17 '25 23:02 tambien

You still having this issue? i'm not able to reproduce this anymore

tambien avatar Sep 01 '25 20:09 tambien

Please provide a way to reproduce the issue. Issues without a minimal (Tone.js-only) repro will be closed. A Tone.js-only repro helps ensure that the issue is not caused by another library.

github-actions[bot] avatar Sep 16 '25 02:09 github-actions[bot]