mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
updated user preferences and application
This commit is contained in:
12
UserPreferences/user_preferences_common.ts
Normal file
12
UserPreferences/user_preferences_common.ts
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
export var checkKey = function(key: string) : void {
|
||||
if ("string" !== typeof key) {
|
||||
throw new Error("key: '" + key + "' must be a string");
|
||||
}
|
||||
}
|
||||
|
||||
export var ensureValidValue = function (value: any, valueType: string): void {
|
||||
if (valueType !== typeof value) {
|
||||
throw new Error("value: '" + value + "' must be a " + valueType);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user