@substrate/api-sidecar
Version:
REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.
14 lines (13 loc) • 404 B
TypeScript
export type IOption<T> = T | null;
/**
* Check if a `IOption` is `T`.
*
* @param option api-sidecar TS option type, conceptually mimics Rust option
*/
export declare function isSome<T>(option: IOption<T>): option is T;
/**
* Check if a something is null. Meant to complement `isSome` for `IOption`.
*
* @param thing unknown value
*/
export declare function isNull(thing: unknown): thing is null;