ricokahler / next-plugin-preval

Pre-evaluate async functions during builds and import them like JSON
MIT License
255 stars 12 forks source link

Missing declare or export in index.d.ts #90

Closed Merri closed 2 years ago

Merri commented 2 years ago

We are removing "skipLibCheck": true in our tsconfig.json as it hides errors that we would like to see. However we encountered this type error:

node_modules/next-plugin-preval/dist/index.d.ts:2:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.

2 function preval<T>(value: T): Unwrap<T>;
  ~~~~~~~~

At the moment we're fixing this for ourselves by using patch-package.