configate 0.1.4 → 0.1.5

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.
Files changed (2) hide show
  1. package/dist/common.d.ts +15 -0
  2. package/package.json +1 -1
package/dist/common.d.ts CHANGED
@@ -1,6 +1,21 @@
1
1
  export type DefaultConfig = Record<string, any>;
2
+ /**
3
+ * Environment type represents all allowed application environments
4
+ * string is also allowed to support custom environments
5
+ */
2
6
  export type Environment = 'development' | 'staging' | 'production' | 'test' | string;
7
+ /**
8
+ * FileExtension type represents all allowed file extensions of config files
9
+ */
3
10
  export type FileExtension = 'ts' | 'mts' | 'js' | 'mjs' | 'cjs' | 'json';
11
+ /**
12
+ * DeepPartial allows to make all properties of an object optional recursively
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * type PartialConfig = DeepPartial<YourConfigStructure>
17
+ * ```
18
+ */
4
19
  export type DeepPartial<T> = T extends object ? {
5
20
  [P in keyof T]?: DeepPartial<T[P]>;
6
21
  } : T | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "configate",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "description": "Configuration helper for TypeScript applications",
6
6
  "main": "dist/index.js",