[typescript] Fix keyof for typescript@2.9#11669
Conversation
| * certain `classes`, on which one can also set a top-level `className` and inline | ||
| * `style`. | ||
| */ | ||
| export type StandardProps<C, ClassKey extends string, Removals extends keyof C = never> = Omit< |
There was a problem hiding this comment.
Why not just redefine Omit to allow using any valid key type?
export type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;There was a problem hiding this comment.
Yes. It is better. Thank you! 👍
|
Thanks! |
|
I am still having the same issue in |
|
@activebiz Thats right. Could you also provide your TS version, |
|
@mctep thanks If I revert the TS to 2.8.4 I get following: ` node_modules/@material-ui/core/ButtonBase/ButtonBase.d.ts
Thanks |
|
@activebiz Looks like that it is not the same issues. Which versions of |
|
Same as in issue #11671 here. |
|
@mctep, @activebiz see issue #11698 |
|
thanks @Ritorna. Now those errors are gone but got hundreds of new errors. Looks like something wrong with my tsconfig. would you mind sharing your tsconfig ? Here's mine |
|
@activebiz i guess it mainly depends on which modules you import :/ Here you are: Alternatively you may use |
|
Looks like it cannot correctly infer type def when export component with compose helper. It will works if you just It also doesn't work with other HOC such as redux |
* fix keyof for ts 2.9 * extends keyof any in omit


Fixes #11656