@opra/common
Version:
Opra common package
29 lines (28 loc) • 736 B
JavaScript
import { __decorate, __metadata } from "tslib";
import { toBoolean } from 'valgen';
import { DECODER, ENCODER } from '../../constants.js';
import { SimpleType } from '../simple-type.js';
let BooleanType = class BooleanType {
constructor(properties) {
if (properties)
Object.assign(this, properties);
}
[DECODER]() {
return toBoolean;
}
[ENCODER]() {
return toBoolean;
}
};
BooleanType = __decorate([
SimpleType({
name: 'boolean',
description: 'Simple true/false value',
nameMappings: {
js: 'boolean',
json: 'boolean',
},
}),
__metadata("design:paramtypes", [Object])
], BooleanType);
export { BooleanType };