Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS2339: Property 'slice' does not exist on type 'U[keyof U]' #1215

Open
2 tasks done
lewebsimple opened this issue Aug 16, 2023 · 0 comments
Open
2 tasks done

TS2339: Property 'slice' does not exist on type 'U[keyof U]' #1215

lewebsimple opened this issue Aug 16, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@lewebsimple
Copy link

lewebsimple commented Aug 16, 2023

Checks

Version

v0.6.12

Description

I get the TS error mentioned in the title when building for production in a Nuxt 3 project using @splidejs/vue-splide:

node_modules/.pnpm/@[email protected]/node_modules/@splidejs/vue-splide/src/js/utils/merge/merge.ts:39:29 - error TS2339: Property 'slice' does not exist on type 'U[keyof U]'.

39       merged[ key ] = value.slice();
                               ~~~~~

It works in development mode.

Reproduction Link

No response

Steps to Reproduce

  1. pnpx nuxi init test-splide
  2. pnpm add @splidejs/vue-splide
  3. Add the following in plugins/splide.ts:
import "@splidejs/vue-splide/css";
import VueSplide from "@splidejs/vue-splide";
export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(VueSplide);
});
  1. Add the <Splide> component in app.vue
  2. Set typescript: { typeCheck; 'build' } in nuxt.config.ts
  3. pnpm build

Expected Behaviour

It should build without errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant