-
Notifications
You must be signed in to change notification settings - Fork 203
Description
Current Behavior:
GoogleCastOptions is used as the type for the googleCast property on the public MediaPlayerProps interface, but it is not exported from the vidstack package. Since TypeScript cannot "name" the type in declaration output, it throws TS4023:
error TS4023: Exported variable '__VLS_export' has or is using name
'GoogleCastOptions' from external module ".../vidstack/types/vidstack-tX8MEPiY" but cannot be named.
Expected Behavior:
GoogleCastOptions should be exported from the vidstack package alongside the other public types since it is referenced in the public MediaPlayerProps interface. No errors should occur when vidstack/vue types are imported.
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(bothcomposite: trueandvueCompilerOptionsmust be present):{ "compilerOptions": { "composite": true, "types": ["vidstack/vue"] }, "vueCompilerOptions": { "strictTemplates": true, "fallthroughAttributes": 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 TS4023 error referencing
GoogleCastOptions
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
- Node: 24
Anything Else?
GoogleCastOptions is defined in src/providers/google-cast/types.ts and imported in src/core/api/player-props.ts, but the Google Cast section in src/exports/providers.ts only exports the loader, provider, and events — not the types. HLS and DASH both export their types files (export type * from '.../<provider>/types'), so the fix is to add the same line for Google Cast.