core.getpathdifference | Medplum

getPathDifference() function

Returns the difference between two paths which is often suitable to use as a key in a Record<string, InternalSchemaElement>

Signature:

export declare function getPathDifference(parentPath: string, path: string): string | undefined;

Parameters

Parameter Type Description
parentPath string The parent path that will be removed from path.
path string The element path that should be a child of parentPath.

Returns:

string | undefined