mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00

* chore(tslint): fix tslint config & errors * chore(tslint): enable double quotes, whitespace, and arrow-return-shorthand rules and fix errors
12 lines
363 B
TypeScript
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);
|
|
}
|
|
}
|