1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | Object.defineProperty(exports, "__esModule", { value: true });
|
7 | exports.BooleanType = void 0;
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | class BooleanType {
|
13 | constructor() {
|
14 | this.name = 'boolean';
|
15 | }
|
16 | isInstance(value) {
|
17 | return value == null || typeof value === 'boolean';
|
18 | }
|
19 | defaultValue() {
|
20 | return false;
|
21 | }
|
22 | isCoercible(value) {
|
23 | return true;
|
24 | }
|
25 | coerce(value) {
|
26 | return value == null ? value : Boolean(value);
|
27 | }
|
28 | serialize(value) {
|
29 | return value;
|
30 | }
|
31 | }
|
32 | exports.BooleanType = BooleanType;
|
33 |
|
\ | No newline at end of file |