mobx-keystone-mindreframer
Version:
A MobX powered state management solution based on data trees with first class support for Typescript, snapshots, patches and much more
24 lines (23 loc) • 571 B
TypeScript
/**
* @ignore
*
* A primitive value.
*/
export declare type PrimitiveValue = undefined | null | boolean | number | string | bigint;
/**
* @ignore
*
* Checks if a value is optional (undefined, any or unknown).
*
* Examples:
* - string = false
* - undefined = true
* - string | undefined = true
* - string & undefined = false, but we don't care
* - any = true
* - unknown = true
* - null = false
* - string | null = false
* - string & null = false
*/
export declare type IsOptionalValue<C, TV, FV> = undefined extends C ? TV : FV;