UNPKG

@aequum/geojson-models

Version:

GeoJSON models for `class-validator` provided by aequum

32 lines (31 loc) 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Feature = void 0; const tslib_1 = require("tslib"); const class_validator_1 = require("class-validator"); const validators_1 = require("@aequum/validators"); class Feature { type; geometry; id; properties; } exports.Feature = Feature; tslib_1.__decorate([ (0, class_validator_1.IsEnum)(['Feature']), tslib_1.__metadata("design:type", String) ], Feature.prototype, "type", void 0); tslib_1.__decorate([ (0, class_validator_1.ValidateNested)(), tslib_1.__metadata("design:type", Object) ], Feature.prototype, "geometry", void 0); tslib_1.__decorate([ (0, class_validator_1.IsOptional)(), (0, validators_1.IsNumberOrString)(), tslib_1.__metadata("design:type", Object) ], Feature.prototype, "id", void 0); tslib_1.__decorate([ (0, class_validator_1.IsObject)(), (0, class_validator_1.IsOptional)(), tslib_1.__metadata("design:type", Object) ], Feature.prototype, "properties", void 0);