Use Exclude rather than NonNullable

This commit is contained in:
Ben Ceglowski
2018-11-01 11:42:52 +00:00
parent 5bb82436dd
commit 0085a00dca
+2 -2
View File
@@ -12,7 +12,7 @@ type FontFamily =
| BaseCSSProperties['fontFamily']
| CSS.FontFace;
type Omit<T, K extends keyof T> = Pick<T, ({ [P in keyof T]: P } & { [P in K]: never } & { [x: string]: never, [x: number]: never })[keyof T]>;
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
type CSSProperties = Omit<BaseCSSProperties, 'fontFamily' | 'transition' | 'animationName' > & {
fontFamily?: FontFamily | FontFamily[];
@@ -21,7 +21,7 @@ type CSSProperties = Omit<BaseCSSProperties, 'fontFamily' | 'transition' | 'anim
// For pseudo selectors and media queries
interface OpenCSSProperties extends CSSProperties {
[k: string]: CSSProperties[NonNullable<keyof CSSProperties>] | CSSProperties;
[k: string]: CSSProperties[keyof CSSProperties] | CSSProperties;
}
/**