as-event-tracker
Version:
Logs events in the browser based on client interactions.
14 lines • 704 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateRequestType = void 0;
var lang_1 = require("../locale/lang");
function validateRequestType(eventType, requestType, expectedRequestType) {
if (requestType !== expectedRequestType) {
var msg = "".concat(lang_1.Validation.EventType, ": ").concat(eventType, " ").concat(lang_1.Validation.RequiresType, " ").concat(expectedRequestType, " ").concat(lang_1.Validation.RecievedType, " ").concat(requestType);
globalThis.CaptureState.logger.error(msg, eventType);
throw msg;
}
;
}
exports.validateRequestType = validateRequestType;
//# sourceMappingURL=requestType.js.map
;