"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var State_1 = require("./State");
exports.wrapSessionMethod = function (method) { return function () {
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
    }
    if (State_1.session === undefined) {
        throw new Error("No session has been registered for compat modules");
    }
    var sessionMethod = State_1.session[method];
    return sessionMethod.apply(State_1.session, args);
}; };
