UNPKG

@xlink-network/xlink-sdk

Version:
18 lines (16 loc) 651 B
declare function isNotNull<T>(input: T | undefined | null): input is T; declare function checkNever(_x: never): undefined; type StringOnly<T> = Extract<T, string>; type NumberOnly<T> = Extract<T, number>; type OneOrMore<T> = readonly [T, ...T[]]; type CompactType<T> = { [P in keyof T]: T[P]; }; /** * WARNING: This is a hack do type exhaustiveness check */ declare function assertExclude<T, const E>(asserting: T, excluding: E): asserts asserting is Exclude<T, E>; declare namespace assertExclude { const i: <T>() => T; } export { type CompactType, type NumberOnly, type OneOrMore, type StringOnly, assertExclude, checkNever, isNotNull };