-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
From microsoft/TypeScript#28960
import * as React from 'react';
type DataAttributeKey = `data-${string}`;
interface HTMLAttributes extends React.HTMLAttributes<any> {
[dataAttribute: DataAttributeKey]: any;
}
function Component(props: { host: HTMLAttributes }) {
return <div {...props.host} />
}
<Component host={{
'data-testid': 'component',
'role': 'generic',
// @ts-expect-error
shouldError: 1
}} />Metadata
Metadata
Assignees
Labels
No labels