@odata2ts/converter-common
Version:
Luxon based odata2ts compatible converters for date and time related OData types
23 lines • 637 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.int64ToBigIntConverter = void 0;
exports.int64ToBigIntConverter = {
id: "int64ToBigIntConverter",
from: "Edm.Int64",
to: "bigint",
convertFrom: function (value) {
if (typeof value !== "string") {
return value;
}
try {
return BigInt(value);
}
catch (exception) {
return undefined;
}
},
convertTo: function (value) {
return typeof value === "bigint" ? value.toString() : value;
},
};
//# sourceMappingURL=Int64ToBigIntConverter.js.map