diff --git a/env-var.d.ts b/env-var.d.ts index e408cce..a010c43 100644 --- a/env-var.d.ts +++ b/env-var.d.ts @@ -47,6 +47,11 @@ type PublicAccessors = { */ asString: (input: string) => string; + /** + * Return the variable value as an Email. Throws an exception if value is not an Email. + */ + asEmailString: (input: string) => string; + /** * Attempt to parse the variable to a JSON Object or Array. Throws an exception if parsing fails. */ @@ -147,6 +152,11 @@ interface VariableAccessors { */ asString: () => AlternateType extends undefined ? undefined|string : string; + /** + * Return the variable value as an Email. Throws an exception if value is not an Email. + */ + asEmailString: () => AlternateType extends undefined ? undefined|string : string; + /** * Attempt to parse the variable to a JSON Object or Array. Throws an exception if parsing fails. */