UNPKG

@vitruvius-labs/ts-predicate

Version:
6 lines (5 loc) 489 B
import type { ObjectWithProperty } from "../definition/type/object-with-property.mjs"; import type { Test } from "../definition/type/test.mjs"; declare function assertProperty<O extends object, K extends string | symbol>(value: O, property: K): asserts value is ObjectWithProperty<O, K, unknown>; declare function assertProperty<O extends object, K extends string | symbol, T>(value: O, property: K, test: Test<T>): asserts value is ObjectWithProperty<O, K, T>; export { assertProperty };