Rebasely Beta: data may be purged

justintypescript-ultra-strict Public

TypeScript · 13 lines · 338 B · at 2e2b18f

export class PathError extends Error {  constructor(    public readonly kind: "invalid_path",    public readonly path: string,  ) {    super(`${kind}: ${path}`);  }}/** Returns undefined when the value is absent. Throws PathError for an invalid path. */export function getPath(obj: unknown, path: string): unknown {  // TODO}