TimDaub / simple-caldav

caldav in JavaScript; made easy.
20 stars 3 forks source link

missing types #36

Open strukturart opened 2 years ago

strukturart commented 2 years ago

I'm trying to use the library but it seems a decleration is missing

const { SimpleCalDAV } = require("simple-caldav");

const URI = "webcal://my-fake-url";
const icloud = new SimpleCalDAV(URI);

const main = async () => {
  await dav.listEvents();
};

main();

Error

Could not find a declaration file for module 'simple-caldav'. '/xxx/greg/node_modules/simple-caldav/src/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/simple-caldav` if it exists or add a new declaration (.d.ts) file containing `declare module 'simple-caldav';`ts(7016)