Files
NativeScript/nativescript-core/application-settings/application-settings-common.ts
Nathan Walker 6336eac4b5 chore: cleanup
2020-07-11 11:03:37 -07:00

12 lines
333 B
TypeScript

export function checkKey(key: string): void {
if (typeof key !== 'string') {
throw new Error("key: '" + key + "' must be a string");
}
}
export function ensureValidValue(value: any, valueType: string): void {
if (typeof value !== valueType) {
throw new Error("value: '" + value + "' must be a " + valueType);
}
}