UNPKG

964 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var common_1 = require("../common");
4var __1 = require("..");
5var timer = common_1.time.timer();
6var schema = __1.Schema.compile({
7 files: 'types/index.ts',
8 basePath: './src/example',
9 required: true,
10 strictNullChecks: true,
11});
12common_1.log.info('elapsed', timer.elapsed());
13common_1.log.info('-------------------------------------------\n');
14timer.reset();
15var foo = schema.forType('IFoo');
16common_1.log.info('foo:', foo);
17common_1.log.info('elapsed', timer.elapsed());
18common_1.log.info('-------------------------------------------\n');
19var isValid = foo.validate({ name: 'Bob', age: 31 });
20var isNotValid = foo.validate({ name: true });
21common_1.log.info('isValid:', isValid);
22common_1.log.info('isNotValid:', isNotValid);
23common_1.log.info('elapsed', timer.elapsed());
24common_1.log.info('-------------------------------------------\n');
25//# sourceMappingURL=tmp.js.map
\No newline at end of file