8000 Vue 3.3.3, defineProps/ defineEmits could not resolve default exported types · Issue #8355 · vuejs/core · GitHub
[go: up one dir, main page]

Skip to content
Vue 3.3.3, defineProps/ defineEmits could not resolve default exported types #8355
@tragid

Description

@tragid

Vue version

3.3.3

Link to minimal reproduction

https://github.com/tragid/vue-default-export-error

Steps to reproduce

  1. Create props interface file: TestComponentProps.ts
  2. Create default export from file
export default interface TestComponentProps {
  msg: string;
}
  1. import type within component TestComponent.vue
import type TestComponentProps from './TestComponentProps';

const props = defineProps<TestComponentProps>();
  1. Vue throws error on startup.
    [@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type

What is expected?

Vue can resolve defaultly imported types

What is actually happening?

Vue throws error on startup.
[@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type

System Info

No response

Any additional comments?

Everything works, if I create export from file with no default provided

export interface TestComponentProps {
  msg: string;
}
import type { TestComponentProps } from './TestComponentProps';

const props = defineProps<TestComponentProps>();

Metadata

Metadata

Assignees

No one assigned

    Labels

    has workaroundA workaround has been found to avoid the problem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0