-
Notifications
You must be signed in to change notification settings - Fork 203
Description
Current Behavior:
ChapterTitleProps, MediaLayoutProps, and SpinnerProps are imported by dist-npm/vue.d.ts from './index', but none of them are exported from index.d.ts. This silently breaks the entire declare module 'vue' augmentation — no vidstack custom elements receive types in Vue templates.
With skipLibCheck: false, TypeScript reports:
Module '"./index"' has no exported member 'ChapterTitleProps'.
Module '"./index"' has no exported member 'MediaLayoutProps'.
Module '"./index"' has no exported member 'SpinnerProps'.
With strictTemplates: true in vueCompilerOptions, every vidstack element also produces:
error TS2339: Property 'media-player' does not exist on type '{}'.
Expected Behavior:
ChapterTitleProps, MediaLayoutProps, and SpinnerProps should be exported from the package so that vue.d.ts can import them and the GlobalComponents augmentation works correctly.
Steps To Reproduce:
- Create a blank Vue + TypeScript project with the following dependencies:
{ "dependencies": { "vidstack": "1.12.13", "vue": "3.5.30" }, "devDependencies": { "typescript": "5.9.3", "vue-tsc": "3.2.5" } } - Use this
tsconfig.json:{ "compilerOptions": { "skipLibCheck": false, "types": ["vidstack/vue"] }, "vueCompilerOptions": { "strictTemplates": true } } - Create
src/App.vue:<template> <media-player :title="title" :src="src"> <media-provider /> </media-player> </template> <script lang="ts" setup> withDefaults( defineProps<{ title?: string; src?: string; }>(), { title: undefined, src: undefined, } ); </script>
- Run
npx vue-tsc --noEmit - See errors for missing exports and unrecognized element tags
Reproduction Link: How to create a repro?
Environment:
- Framework: Vue 3.5.30
- vue-tsc: 3.2.5
- TypeScript: 5.9.3
- vidstack: 1.12.13
Anything Else?
The root cause is that the maverick analyzer generates vue.d.ts by reflecting over registered custom elements and importing their props types from './index', without verifying that those types are actually reachable from the public barrel.
Specifically:
ChapterTitleProps— missingexportkeyword insrc/elements/define/chapter-title-element.ts:7and not re-exported throughsrc/exports/components.tsMediaLayoutProps— exported locally insrc/elements/define/layouts/layout-element.ts:15but not re-exported throughsrc/exports/components.tsSpinnerProps— exported locally insrc/elements/define/spinner-element.ts:9but not re-exported throughsrc/exports/components.ts
This issue went unnoticed because the default skipLibCheck: true hides errors in .d.ts files, silently dropping the augmentation instead of reporting the broken imports.