@openmrs/esm-utils 5.6.1-pre.1851 → 5.6.1-pre.1852

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-utils",
3
- "version": "5.6.1-pre.1851",
3
+ "version": "5.6.1-pre.1852",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Helper utilities for OpenMRS",
6
6
  "browser": "dist/openmrs-esm-utils.js",
@@ -39,7 +39,7 @@
39
39
  "access": "public"
40
40
  },
41
41
  "devDependencies": {
42
- "@openmrs/esm-globals": "5.6.1-pre.1851",
42
+ "@openmrs/esm-globals": "5.6.1-pre.1852",
43
43
  "@types/semver": "^7.3.4",
44
44
  "dayjs": "^1.10.4",
45
45
  "rxjs": "^6.5.3"
@@ -10,7 +10,7 @@
10
10
  * default from the `useConfig`/`getConfig` mock. This function is useful if you
11
11
  * need to override some of the default values.
12
12
  */
13
- export function getDefaultsFromConfigSchema(schema) {
13
+ export function getDefaultsFromConfigSchema<T = Record<string, any>>(schema): T {
14
14
  let tmp = {};
15
15
  for (let k of Object.keys(schema)) {
16
16
  if (schema[k].hasOwnProperty('_default')) {
@@ -23,7 +23,7 @@ export function getDefaultsFromConfigSchema(schema) {
23
23
  tmp[k] = schema[k];
24
24
  }
25
25
  }
26
- return tmp;
26
+ return tmp as T;
27
27
  }
28
28
 
29
29
  function isOrdinaryObject(x) {