# allOf

Source: https://taxilang.org/docs/language/stdlib/allOf

**Full name:** `taxi.stdlib.allOf`

## Signature

```taxi
declare function allOf(values:Boolean...): Boolean
```

## Description

Returns `true` only if all provided boolean values are `true`. Equivalent to logical AND.

This function ensures that every condition in a set must be satisfied.

```taxi
// Check if a user can purchase a premium item
type CanPurchasePremium inherits Boolean by allOf(IsActive, HasSufficientFunds, IsVerified)
```

## Examples

This example demonstrates how to use `allOf()` to verify if a user meets all required criteria for premium access.

Schema:

```taxi
model Customer {
   name: String
   isActive: IsActive inherits Boolean
   hasSufficientFunds: HasSufficientFunds inherits Boolean
   isVerified: IsVerified inherits Boolean
}
type HasPremiumAccess inherits Boolean by allOf(IsActive, HasSufficientFunds, IsVerified)
```

Query:

```taxi
given {
   customer: Customer = {
      name: 'Bob',
      isActive: true,
      hasSufficientFunds: true,
      isVerified: true
   }
}
find {
   name: customer.name
   hasPremiumAccess: HasPremiumAccess
}
```

Result:

```json
{
  "name": "Bob",
  "hasPremiumAccess": true
}
```
