tfs-tada / eslint-plugin-no-excess-property

ESLint plugin to prevent excess properties in TypeScript objects, ensuring strict adherence to type definitions.
https://www.npmjs.com/package/eslint-plugin-no-excess-property?activeTab=readme
MIT License
3 stars 0 forks source link

fix: template index #31

Open tfs-tada opened 5 months ago

tfs-tada commented 5 months ago

現在、テンプレートリテラルを使った mappedTypesは検知の対象外にしているが、対象にできると好ましい

type Props = { age: number } & { [name: `data-${string}`]: string };
const user = { "data-testid": "file", age: 20, id: "user_id" };
const app: Props = user; // error