mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Use Exclude rather than NonNullable
This commit is contained in:
Vendored
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user