domain-objects
Version:
A simple, convenient way to represent domain objects, leverage domain knowledge, and add runtime validation in your code base.
19 lines • 894 B
JavaScript
;
/**
* the `WithKeys*` family — narrows an instance type so the given keys / dot-paths are required.
*
* these are generic key-requirement operators with no domain dependency; the *caller* decides what the
* keys mean (here, `HasReadonly` feeds them the readonly keys).
*
* - WithKeysFlat: flat (non-dotted) keys
* - WithKeysDeep: deep (dot-path) keys
* - WithKeys: both flat and deep
*
* .todo = these are generic (no readonly dependency); eject them up into `type-fns`.
* tracked as a task against type-fns. collocated here (`HasReadonly.WithKeys`) until then,
* since `HasReadonly` is currently their only consumer.
*
* the generic dot-path utilities (`PathHead`, `PathTail`, `RequiredAtPaths`) live here for the same reason.
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=HasReadonly.WithKeys.type.js.map