@sprucelabs/schema 28.2.1 → 28.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export default function assertOptions<Options, Key extends Paths<Options> = Paths<Options>>(options: Options, toCheck: Key[], friendlyMessage?: string): Options & ForceRequired<Options, Key>;
|
|
1
|
+
export default function assertOptions<Options extends Record<string, any>, Path extends Paths<Options> = Paths<Options>>(options: Options, toCheck: Path[], friendlyMessage?: string): Options & Required<Pick<Options, Path>>;
|
|
3
2
|
declare type Join<K, P> = K extends string | number ? P extends string | number ? `${K}${'' extends P ? '' : '.'}${P}` : never : never;
|
|
4
3
|
declare type Prev = [
|
|
5
4
|
never,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export default function assertOptions<Options, Key extends Paths<Options> = Paths<Options>>(options: Options, toCheck: Key[], friendlyMessage?: string): Options & ForceRequired<Options, Key>;
|
|
1
|
+
export default function assertOptions<Options extends Record<string, any>, Path extends Paths<Options> = Paths<Options>>(options: Options, toCheck: Path[], friendlyMessage?: string): Options & Required<Pick<Options, Path>>;
|
|
3
2
|
declare type Join<K, P> = K extends string | number ? P extends string | number ? `${K}${'' extends P ? '' : '.'}${P}` : never : never;
|
|
4
3
|
declare type Prev = [
|
|
5
4
|
never,
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const just_safe_get_1 = __importDefault(require("just-safe-get"));
|
|
7
7
|
const SpruceError_1 = __importDefault(require("../errors/SpruceError"));
|
|
8
|
-
//@ts-ignore
|
|
9
8
|
function assertOptions(options, toCheck, friendlyMessage) {
|
|
10
9
|
const missing = [];
|
|
11
10
|
for (const check of toCheck) {
|