UNPKG

872 BJavaScriptView Raw
1"use strict";
2// Copyright IBM Corp. 2017,2019. All Rights Reserved.
3// Node module: @loopback/repository
4// This file is licensed under the MIT License.
5// License text available at https://opensource.org/licenses/MIT
6Object.defineProperty(exports, "__esModule", { value: true });
7exports.AnyType = void 0;
8/* eslint-disable @typescript-eslint/no-explicit-any */
9/**
10 * Any type
11 */
12class AnyType {
13 constructor() {
14 this.name = 'any';
15 }
16 isInstance(value) {
17 return true;
18 }
19 isCoercible(value) {
20 return true;
21 }
22 defaultValue() {
23 return undefined;
24 }
25 coerce(value) {
26 return value;
27 }
28 serialize(value) {
29 if (value && typeof value.toJSON === 'function') {
30 return value.toJSON();
31 }
32 return value;
33 }
34}
35exports.AnyType = AnyType;
36//# sourceMappingURL=any.js.map
\No newline at end of file