UNPKG

@msgpack/msgpack

Version:

MessagePack for JavaScript/ECMA-262

9 lines (8 loc) 350 B
export declare type SplitTypes<T, U> = U extends T ? (Exclude<T, U> extends never ? T : Exclude<T, U>) : T; export declare type SplitUndefined<T> = SplitTypes<T, undefined>; export declare type ContextOf<ContextType> = ContextType extends undefined ? {} : { /** * Custom user-defined data, read/writable */ context: ContextType; };