MCPcopy Create free account
hub / github.com/denoland/std / assertFp

Function assertFp

internal/diff.ts:73–84  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

71 * ```
72 */
73export function assertFp(value: unknown): asserts value is FarthestPoint {
74 if (
75 value == null ||
76 typeof value !== "object" ||
77 typeof (value as FarthestPoint)?.y !== "number" ||
78 typeof (value as FarthestPoint)?.id !== "number"
79 ) {
80 throw new Error(
81 `Unexpected value, expected 'FarthestPoint': received ${typeof value}`,
82 );
83 }
84}
85
86/**
87 * Creates an array of backtraced differences.

Callers 2

fnFunction · 0.90
diffFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected