vue-i18n icon indicating copy to clipboard operation
vue-i18n copied to clipboard

Invalid Translation Component Typing Error

Open lostncg opened this issue 3 years ago • 0 comments
trafficstars

Reporting a bug?

Problem: Using the Translation component correctly, but the linter warns the typing error for this component.

image

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[];
  };
};

image

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

lostncg avatar Oct 14 '22 13:10 lostncg