vue-i18n
vue-i18n copied to clipboard
Invalid Translation Component Typing Error
trafficstars
Reporting a bug?
Problem: Using the Translation component correctly, but the linter warns the typing error for this component.

Expected behavior
Show the component typings correctly
export declare const Translation: new () => {
$props: {
keypath: string;
plural?: number | string;
tag?: keyof HTMLElementTagNameMap;
locale?:string;
scope?: "parent" | "global";
i18n?: I18n; // this line could be wrong
};
$slots: {
[x: string]: (arg: {
Component: VNode;
}) => VNode[];
};
};

Reproduction
Reproducible repo: vitejs-vite-zv2s54.zip
System Info
System:
OS: macOS 12.5
CPU: (10) x64 Apple M1 Pro
Memory: 18.43 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.20.0 - ~/.nvm/versions/node/v14.20.0/bin/node
npm: 8.15.0 - ~/.nvm/versions/node/v14.20.0/bin/npm
Browsers:
Chrome: 106.0.5249.119
Safari: 15.6
Screenshot
No response
Additional context
No response
Validations
- [x] Read the Contributing Guidelines
- [X] Read the Documentation
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion
- [X] The provided reproduction is a minimal reproducible example of the bug.