Skip to content

GoogleCastOptions type is not exported #1757

@velocitysystems

Description

@velocitysystems

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:

  1. 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"
      }
    }
  2. Use this tsconfig.json (both composite: true and vueCompilerOptions must be present):
    {
      "compilerOptions": {
        "composite": true,
        "types": ["vidstack/vue"]
      },
      "vueCompilerOptions": {
        "strictTemplates": true,
        "fallthroughAttributes": true
      }
    }
  3. 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>
  4. Run npx vue-tsc --noEmit
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions