Skip to content

Commit

Permalink
Add Configuration Path and Configuration Loader Callback type aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
aedart committed Oct 3, 2024
1 parent 241f920 commit ff05e1e
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions packages/contracts/src/config/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
/**
* Configuration Items
*
* A general type for describing a key-value store containing configuration items
* for an application or component.
* A key-value store containing configuration items for an application or component.
*/
export type Items = Record<PropertyKey, any>; /* eslint-disable-line @typescript-eslint/no-explicit-any */
export type Items = Record<PropertyKey, any>; /* eslint-disable-line @typescript-eslint/no-explicit-any */

/**
* A [module-name](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import#modulename) from
* where configuration {@link Items} are to be loaded from.
*/
export type ConfigurationPath = string;

/**
* Callback that is responsible for loading configuration {@link Items}.
*/
export type ConfigurationLoaderCallback = () => Promise<Items>;

0 comments on commit ff05e1e

Please sign in to comment.