-
Notifications
You must be signed in to change notification settings - Fork 44
Description
Describe the bug
In projects where verbatimModuleSyntax is enabled typechecking throws an error. This is because your types are not .d.ts files, but a mix of both .ts and .d.ts. Ideally you'd just have a single file with all the necessary types, but considering you're writing them separately from the library code, simply renaming them all to .d.ts should work, too. You could also just change the imports from import { SomeTypeOrInterface } from './file' to import type { SomeTypeOrInterface } from './file'. But generally speaking distributing .ts files (not .d.ts, these are fine of course) on NPM is a bit odd, so just using definition files makes more sense.
I can contribute a PR if you accept them.
Steps to reproduce
- Embed the SDK in a TypeScript app
- Set
verbatimModuleSyntax: trueintsconfig.json - Import
monday-sdk-jsand use it anywhere - Run
tsc - You'll get a bunch of errors
Expected behavior
No errors when running tsc
Context and environment
Any import causes this issue
Additional information
N/A