We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 923a73e commit 93517edCopy full SHA for 93517ed
src/utils.ts
@@ -1,7 +1,7 @@
1
import type { StyledOptions } from '@mui/styled-engine';
2
3
-export function excludeProp<T extends string>(
4
- list: readonly T[]
+export function excludeProp<T extends string | AnyObject, L = T extends string ? T : keyof T>(
+ list: readonly L[]
5
): NonNullable<StyledOptions['shouldForwardProp']> {
6
return (prop) => !(list as readonly string[]).includes(prop);
7
}
0 commit comments