aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/schemas
diff options
context:
space:
mode:
authorBrandon Millman <brandon@0xproject.com>2017-12-22 02:16:25 +0800
committerGitHub <noreply@github.com>2017-12-22 02:16:25 +0800
commitcb3582289ff94857d5956bbd71dbf68ee3f42ecf (patch)
tree62c94cba698834e33cf284c084c04e30766190e8 /packages/website/ts/schemas
parent734d220d6050ad7b9fa66e5e0695b848501eeff6 (diff)
parent2d53b7d9a499e4fb5791fe34cae5ef118bdfc0ce (diff)
downloaddexon-0x-contracts-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar.gz
dexon-0x-contracts-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.tar.zst
dexon-0x-contracts-cb3582289ff94857d5956bbd71dbf68ee3f42ecf.zip
Merge pull request #285 from 0xProject/fix/underscorePrivate
Add new underscore-privates rule to @0xproject/tslint-config and fix …
Diffstat (limited to 'packages/website/ts/schemas')
-rw-r--r--packages/website/ts/schemas/validator.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/website/ts/schemas/validator.ts b/packages/website/ts/schemas/validator.ts
index e8eb4aaf2..832b093e5 100644
--- a/packages/website/ts/schemas/validator.ts
+++ b/packages/website/ts/schemas/validator.ts
@@ -5,15 +5,15 @@ import {signatureDataSchema} from 'ts/schemas/signature_data_schema';
import {tokenSchema} from 'ts/schemas/token_schema';
export class SchemaValidator {
- private validator: Validator;
+ private _validator: Validator;
constructor() {
- this.validator = new Validator();
- this.validator.addSchema(signatureDataSchema as JSONSchema, signatureDataSchema.id);
- this.validator.addSchema(tokenSchema as JSONSchema, tokenSchema.id);
- this.validator.addSchema(orderTakerSchema as JSONSchema, orderTakerSchema.id);
- this.validator.addSchema(orderSchema as JSONSchema, orderSchema.id);
+ this._validator = new Validator();
+ this._validator.addSchema(signatureDataSchema as JSONSchema, signatureDataSchema.id);
+ this._validator.addSchema(tokenSchema as JSONSchema, tokenSchema.id);
+ this._validator.addSchema(orderTakerSchema as JSONSchema, orderTakerSchema.id);
+ this._validator.addSchema(orderSchema as JSONSchema, orderSchema.id);
}
public validate(instance: object, schema: Schema) {
- return this.validator.validate(instance, schema);
+ return this._validator.validate(instance, schema);
}
}