Augmenting ComponentCustomOptions
with a function causes TS2769
when using augmention #13009
Open
Description
Version
2.7.14
Reproduction link
Steps to reproduce
- Augment the
ComponentCustomOptions
interface with a new optional member function. Example:funcOption?: (...) => ...
. - Use the new member function in
defineComponent
. ExampledefineComponent({ name: 'CompName', funcOption: (...) => ... })
. - Run a build with type-checking. Example:
npm run build
withvite
andvue-tsc
installed and setup.
Using the repro link:
- Clone the repo
- Run
npm ci
- Run
npm run build
What is expected?
That the build would succeed without error.
What is actually happening?
A TS2769
error results when built. It seems TypeScript is attempting to use the functional component overload rather than one of the normal overloads.
Metadata
Assignees
Labels
No labels