(t: T): (keyof T)[];
export type PromiseType = P extends Promise ? T : never;
/**
* Should be used in the `default:` case of a switch.
* Will cause a compilation-time type error if the switch is not exhaustive.
* See https://www.typescriptlang.org/docs/handbook/advanced-types.html
*
* @param x
* @param returnValue If provided, doesn't throw at runtime, but returns this value.
*
* @example
* type Type = "error" | "success" | "info" | "warning"
*
* const getIcon = (type: Type) => {
* switch (type) {
* case 'success':
* return 'ok';
* case 'error':
* return 'sad';
* case 'info':
* return 'info-sign';
* default:
* return assertNever(type); // Shows error, because 'warning' is not handled.
* }
* };
*/
export declare const assertNever: (x: never, returnValue?: any) => never;
/**
* Returns keys in a type T whose values matching type V.
*
* e.g. KeysOfType<{ foo: string; bar: number; baz: string }, string> -> "foo" | "baz"
*/
export type KeysOfType = {
[K in keyof T]-?: T[K] extends V ? K : never;
}[keyof T];