Function assertFp

  • Asserts that the value is a FarthestPoint. If not, an error is thrown.

    Parameters

    • value: unknown

      The value to check.

    Returns asserts value is FarthestPoint

    A void value that returns once the assertion completes.

    import { assertFp } from "@std/internal/diff";
    import { assertThrows } from "@std/assert";

    assertFp({ y: 0, id: 0 });
    assertThrows(() => assertFp({ id: 0 }));
    assertThrows(() => assertFp({ y: 0 }));
    assertThrows(() => assertFp(undefined));