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 literal index #33

Closed tfs-tada closed 3 months ago

tfs-tada commented 3 months ago
type Props = { data: {[K in `data-${string}`]: string } & { age: number }}
const Component = (props: Props) => {
  return <div>{}</div>;
}
const user = { data: {"data-testid": "file", age: 10 }};
const a = <Component data={user.data} />;