-
Notifications
You must be signed in to change notification settings - Fork 358
Closed
Labels
lang: typescriptTypeScript-specific typing or tooling problems.TypeScript-specific typing or tooling problems.status: resolvedThe issue has been resolved or a fix is confirmed.The issue has been resolved or a fix is confirmed.type: supportSupport questions related to usage, configuration, or integration.Support questions related to usage, configuration, or integration.
Description
Description
When building a Vue 3 + TypeScript project with pnpm build, the SketchPicker component from vue-color causes TypeScript to throw the following error:
src/components/ColorPicker/ColorPicker.vue:314:1 - error TS2742: The inferred type of 'default' cannot be named without a reference to '../../../node_modules/vue-color/dist/types/composable/colorModel'. This is likely not portable. A type annotation is necessary.
314 export default (await import('vue')).defineComponent({
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
315 setup() {
~~~~~~~~~
...
322 __typeEl: {} as __VLS_TemplateResult['rootEl'],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
323 });
~~~Code
<template>
...
<SketchPicker ref="_ref" v-model="currentColor" @update:modelValue="handleColorChange" />
...
<template>
<script setup lang="ts">
import { SketchPicker } from 'vue-color'
...
</script>Environment
vue-color: 3.0.1
vue: 3.5.13
TypeScript: 5.8.0
Package manager: pnpm@10.8.0
Metadata
Metadata
Assignees
Labels
lang: typescriptTypeScript-specific typing or tooling problems.TypeScript-specific typing or tooling problems.status: resolvedThe issue has been resolved or a fix is confirmed.The issue has been resolved or a fix is confirmed.type: supportSupport questions related to usage, configuration, or integration.Support questions related to usage, configuration, or integration.