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