MaxLeiter / sortablejs-vue3

A thin wrapper around Sortable.js for Vue 3
https://sortablejs-vue3.maxleiter.com
MIT License
364 stars 20 forks source link

Build : error TS7056: The inferred type of this node exceeds the maximum length #72

Closed messenjer closed 1 year ago

messenjer commented 1 year ago

Hello

Hi, I get this error when I try to build the library, do you get it too?

pnpm run build

> sortablejs-vue3@1.2.7 build sortablejs-vue3
> vite build && vue-tsc --emitDeclarationOnly --project tsconfig.dist.json && mv dist/lib dist/types && rm -rf dist/favicon.ico

vite v4.0.4 building for production...
✓ 4 modules transformed.
dist/sortablejs-vue3.es.js  3.53 kB │ gzip: 1.16 kB
dist/sortablejs-vue3.umd.js  2.00 kB │ gzip: 0.99 kB
src/components/Sortable.vue:6:1 - error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.

  6 type SortableOptionsProp = Omit<
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7   SortableOptions | AutoScrollOptions,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
134 });
    ~~~
135 </script>

Found 1 error in src/components/Sortable.vue:6

Regards

Mathieu

MaxLeiter commented 1 year ago

Thanks for reporting, I can confirm the same thing, but have no idea why it started occurring. None of the types used are particularly complex, afaik.

messenjer commented 1 year ago

The build error appears with this commit: https://github.com/MaxLeiter/sortablejs-vue3/commit/133a8c4d541c5ec2c0b2020150d1e9e4c3f021f9