/** * Pixel size of an image or video */ export interface Size { /** * Width (in pixels) */ w: number; /** * Height (in pixels) */ h: number; } /** * A color hex code without `#` * @example * '55ff00' */ export declare type HexCode = string; /** * Conditional post type.\ * `T` Conditional\ * Returns `A` if `T` is true\ * Returns `B` if `T` is false\ * Returns `A|B` if T is neither true or false\ * @example * class Foo { * bar: If * isReady(): this is Foo { * } * } */ export declare type If = T extends true ? A : T extends false ? B : A | B; /** * UNIX Epoch in seconds * ? For better accuracy, convert to milliseconds */ export declare type EpochSec = number; /** * UNIX Epoch in milliseconds */ export declare type EpochMs = number; /** * @example * interface Foo { * bar: 'baz', * spam: 'eggs', * waldo: 'fred' * } * * type BarOrSpamOrWaldo = ValueOf // Expect 'baz'|'eggs'|'fred' * type Bar = ValueOf // Expect 'baz' * type BarOrSpam = ValueOf // Expect 'baz'|'eggs' * */ export declare type ValueOf = T[K]; /** * Like {@link Pick}, but each key is made required * @example * interface Foo { * bar?: string * spam?: number * } * * type FooBar = Has; // Expect { bar: string } * type FooBarOrSpam = Has; // Expect { bar: string; spam: number } */ export declare type Has = { [P in K]-?: T[P]; }; export declare type Primitive = string | number | boolean | null; export declare type JSONValue = Primitive | JSONObject | JSONValue[]; /** * Represents a raw JSON Object */ export interface JSONObject { [key: string]: JSONValue; [index: number]: never; } //# sourceMappingURL=util.d.ts.map