import {Injectable, InjectionAware} from '../../../di' import {Awaitable} from '../../../util' import {AbstractBuilder} from '../../builder/AbstractBuilder' /** * A closure that takes a query and applies some scope to it. */ export type ScopeClosure = (query: AbstractBuilder) => Awaitable /** * Base class for scopes that can be applied to queries. */ @Injectable() export abstract class Scope extends InjectionAware { abstract apply(query: AbstractBuilder): Awaitable }