type-fns
Version:
A set of types, type checks, and type guards for simpler, safer, and easier to read code.
18 lines (17 loc) • 598 B
TypeScript
import { NotNull } from './isNotNull';
import { IsDefined } from './isNotUndefined';
import { isPresentAssess as assess } from './isPresent.assess';
declare const assure: <T>(input: T) => NotNull<IsDefined<T>>;
interface IsPresentWithAssure {
<T>(t: T): t is NotNull<IsDefined<T>>;
assess: typeof assess;
assure: typeof assure;
}
/**
* checks whether the value is defined and is not null
*
* refs
* - https://github.com/microsoft/TypeScript/issues/16069#issuecomment-566222173
*/
declare const isPresentWithAssure: IsPresentWithAssure;
export { isPresentWithAssure as isPresent };