mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Improved Validations for ARC Wizards (#12945)
This commit is contained in:
@@ -40,6 +40,15 @@ export function setEnvironmentVariablesForInstallPaths(tools: ITool[], env: Node
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* returns true if input is undefined or empty
|
||||
*
|
||||
* @param input - input value to test
|
||||
*/
|
||||
export function isUndefinedOrEmpty(input: any): boolean {
|
||||
return input === undefined || (typeof input === 'string' && input.length === 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws an Error with given {@link message} unless {@link condition} is true.
|
||||
* This also tells the typescript compiler that the condition is 'truthy' in the remainder of the scope
|
||||
|
||||
Reference in New Issue
Block a user