formatting
This commit is contained in:
parent
2d7a3853a9
commit
e35455435e
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
export namespace Checkable {
|
export namespace Checkable {
|
||||||
|
|
||||||
type Path = (number|string)[];
|
type Path = (number | string)[];
|
||||||
|
|
||||||
interface SchemaErrorConstructor {
|
interface SchemaErrorConstructor {
|
||||||
new (err: string): SchemaError;
|
new (err: string): SchemaError;
|
||||||
@ -220,7 +220,7 @@ export namespace Checkable {
|
|||||||
|
|
||||||
export function Number(target: Object, propertyKey: string | symbol): void {
|
export function Number(target: Object, propertyKey: string | symbol): void {
|
||||||
let chk = mkChk(target);
|
let chk = mkChk(target);
|
||||||
chk.props.push({propertyKey: propertyKey, checker: checkNumber});
|
chk.props.push({ propertyKey: propertyKey, checker: checkNumber });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -247,14 +247,14 @@ export namespace Checkable {
|
|||||||
|
|
||||||
export function String(target: Object, propertyKey: string | symbol): void {
|
export function String(target: Object, propertyKey: string | symbol): void {
|
||||||
let chk = mkChk(target);
|
let chk = mkChk(target);
|
||||||
chk.props.push({propertyKey: propertyKey, checker: checkString});
|
chk.props.push({ propertyKey: propertyKey, checker: checkString });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function mkChk(target: any) {
|
function mkChk(target: any) {
|
||||||
let chk = target[chkSym];
|
let chk = target[chkSym];
|
||||||
if (!chk) {
|
if (!chk) {
|
||||||
chk = {props: []};
|
chk = { props: [] };
|
||||||
target[chkSym] = chk;
|
target[chkSym] = chk;
|
||||||
}
|
}
|
||||||
return chk;
|
return chk;
|
||||||
|
Loading…
Reference in New Issue
Block a user