Skip to content

ChapterTitleProps, MediaLayoutProps, and SpinnerProps types are not exported #1759

@velocitysystems

Description

@velocitysystems

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:

  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:
    {
      "compilerOptions": {
        "skipLibCheck": false,
        "types": ["vidstack/vue"]
      },
      "vueCompilerOptions": {
        "strictTemplates": 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 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 — missing export keyword in src/elements/define/chapter-title-element.ts:7 and not re-exported through src/exports/components.ts
  • MediaLayoutProps — exported locally in src/elements/define/layouts/layout-element.ts:15 but not re-exported through src/exports/components.ts
  • SpinnerProps — exported locally in src/elements/define/spinner-element.ts:9 but not re-exported through src/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.

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