import { includeField } from '../query.js';
import { registerQuery } from '../registerQuery.js';
export const subscribe = (q, onData, onError) => {
    if (!q.def.include.stringFields.size && !q.def.references.size) {
        includeField(q.def, '*');
    }
    registerQuery(q);
    return q.db.hooks.subscribe(q, onData, onError);
};
export * from './types.js';
//# sourceMappingURL=index.js.map