export function aliasTagHandlerFactory(queryEngine, map) {
    return (selector) => {
        if (!selector.id) {
            throw new Error('Could not find alias: No id provided');
        }
        const s = map.get(selector.id);
        if (!s) {
            throw new Error(`Could not find alias: '${selector.id}' was not registered before`);
        }
        return queryEngine.query(s);
    };
}
//# sourceMappingURL=alias.js.map