UNPKG

2.03 kBJavaScriptView Raw
1"use strict";
2var __extends = (this && this.__extends) || (function () {
3 var extendStatics = function (d, b) {
4 extendStatics = Object.setPrototypeOf ||
5 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7 return extendStatics(d, b);
8 };
9 return function (d, b) {
10 if (typeof b !== "function" && b !== null)
11 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12 extendStatics(d, b);
13 function __() { this.constructor = d; }
14 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15 };
16})();
17Object.defineProperty(exports, "__esModule", { value: true });
18exports.isBooleanFilterFunction = exports.BooleanFilterFunction = void 0;
19var filter_function_base_1 = require("./filter-function-base");
20/**
21 * Representation of a filter function, that returns a value of type boolean.
22 */
23var BooleanFilterFunction = /** @class */ (function (_super) {
24 __extends(BooleanFilterFunction, _super);
25 /**
26 * Creates an instance of BooleanFilterFunction.
27 * @param functionName - Name of the function that returns a boolean value
28 * @param parameters - Representation of the parameters passed to the filter function
29 */
30 function BooleanFilterFunction(functionName, parameters) {
31 return _super.call(this, functionName, parameters, 'Edm.Boolean') || this;
32 }
33 return BooleanFilterFunction;
34}(filter_function_base_1.FilterFunction));
35exports.BooleanFilterFunction = BooleanFilterFunction;
36function isBooleanFilterFunction(filterable) {
37 return (typeof filterable['functionName'] !== 'undefined' &&
38 typeof filterable['parameters'] !== 'undefined' &&
39 filterable['edmType'] === 'Edm.Boolean');
40}
41exports.isBooleanFilterFunction = isBooleanFilterFunction;
42//# sourceMappingURL=boolean-filter-function.js.map
\No newline at end of file