@vitruvius-labs/ts-predicate
Version:
TypeScript predicates library
6 lines (5 loc) • 546 B
text/typescript
import type { ObjectWithNullableProperty } from "../definition/type/object-with-nullable-property.mjs";
import type { Test } from "../definition/type/test.mjs";
declare function assertNullableProperty<O extends object, K extends string | symbol>(value: O, property: K): asserts value is ObjectWithNullableProperty<O, K, unknown>;
declare function assertNullableProperty<O extends object, K extends string | symbol, T>(value: O, property: K, test: Test<T>): asserts value is ObjectWithNullableProperty<O, K, T>;
export { assertNullableProperty };