Created
February 10, 2023 23:10
-
-
Save Alexisvt/6b35a8e0ed144ba8b7dc5aa8fd671544 to your computer and use it in GitHub Desktop.
Interface to support data-* attributes in props due to a design decision in TypeScript.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface DataAttributes { | |
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |
[n: `data-${string}`]: any | |
} | |
// more info about it: | |
// https://github.com/microsoft/TypeScript/issues/47211 | |
// https://github.com/microsoft/TypeScript/issues/28960 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment