AdonisJS API
    Preparing search index...

    Type Alias BindingCondition<KnownBindings>

    BindingCondition: (
        resolver: ContainerResolver<KnownBindings>,
        runtimeValues?: any[],
        parent?: unknown,
    ) => boolean | Promise<boolean>

    Shape of a condition used by conditional bindings

    Type Parameters

    • KnownBindings extends Record<any, any>

      Known bindings record type

    Type Declaration

      • (
            resolver: ContainerResolver<KnownBindings>,
            runtimeValues?: any[],
            parent?: unknown,
        ): boolean | Promise<boolean>
      • Parameters

        • resolver: ContainerResolver<KnownBindings>

          Container resolver instance

        • OptionalruntimeValues: any[]

          Optional runtime values. They are only available when the binding is resolved directly via "make" or "call". Dependencies resolved for a class receive "undefined"

        • Optionalparent: unknown

          The class asking for this binding, or "null" when the binding is resolved directly via "make"

        Returns boolean | Promise<boolean>

        Whether the associated binding resolver should be used