Skip to content

Commit

Permalink
fix: allow null for EnvDisplay
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Sep 16, 2021
1 parent 60341dc commit 0868d3f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,18 @@ export type JsonObject = {
* Key Value
* --- -------------------
* Url https://example.com
*
* If no environment matches the provided targetEnv, then return null in the data field.
*
* @example
* { data: null }
*/
export namespace EnvDisplay {
type Keys<T> = Record<keyof T, string>;

export type HookMeta<T extends JsonObject> = {
options: { targetEnv: string };
return: { data: T; keys?: Keys<T> };
return: { data: T | null; keys?: Keys<T> };
};
}

Expand Down

0 comments on commit 0868d3f

Please sign in to comment.