svelte-notifications icon indicating copy to clipboard operation
svelte-notifications copied to clipboard

Does it support typescript?

Open shaozi opened this issue 2 years ago • 3 comments

I use typescript with Sveltekit and it gives run time error:

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: .../node_modules/@beyonk/svelte-notifications/index.js
require() of ES modules is not supported.

shaozi avatar Jul 13 '21 16:07 shaozi

I get this error even in JS, not TS.

metayii avatar Aug 12 '21 04:08 metayii

This is a vite thing. You probably need to install it in devDeps, or not devDeps. whatever works.

antony avatar Aug 19 '21 14:08 antony

I find it works with Typescript, but VSCode doesn't like the options parameter.

notifier.danger('Error saving: ' + error, { persist: true });

VSCode underlines { persist: true} because I haven't supplied a number for the duration.

I wish there was more control over positioning/styling. I may have to fork this.

v79 avatar Feb 17 '23 13:02 v79