Files
NativeScript/tns-core-modules/application-settings/application-settings-common.ts
Manol Donev 03cfc0cee3 chore(tslint): update tslint rules and fix errors (#5747)
* chore(tslint): fix tslint config & errors
* chore(tslint): enable double quotes, whitespace, and arrow-return-shorthand rules and fix errors
2018-04-26 18:36:32 +03:00

12 lines
363 B
TypeScript

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