Theemo / @theemo/theme / validateTheemoPackage
Function: validateTheemoPackage()
ts
function validateTheemoPackage(pkg): ValidationResult;
Defined in: package.ts:70
Validates a package for being correct
Parameters
Parameter | Type | Description |
---|---|---|
pkg | TheemoPackage | the given package |
Returns
ValidationResult
the validation result
Example
Check for a valid package:
ts
const validation = validateTheemoPackage(myPkg);
if (validation.success) {
// proceed with valid package
} else {
console.log(validation.errors);
}