[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › Types

TypeScript utility types.

## Functions

| Function                                                                      | Description                                                                                                                                            |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [instance](https://evolu.dev/docs/api-reference/common/Types/functions/instance)           | Creates the runtime identity property required by [Instance](https://evolu.dev/docs/api-reference/common/Types/interfaces/Instance).                                |
| [isInstance](https://evolu.dev/docs/api-reference/common/Types/functions/isInstance)       | Creates a realm-neutral predicate for one [Instance](https://evolu.dev/docs/api-reference/common/Types/interfaces/Instance) name.                                   |
| [isPromiseLike](https://evolu.dev/docs/api-reference/common/Types/functions/isPromiseLike) | Type guard to check if a value is a [PromiseLike](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables). |

## Interfaces

| Interface                                                                          | Description                                                |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [Instance](https://evolu.dev/docs/api-reference/common/Types/interfaces/Instance)               | Realm-neutral runtime identity for a TypeScript interface. |
| [ValueWithLength](https://evolu.dev/docs/api-reference/common/Types/interfaces/ValueWithLength) | A value with a numeric length.                             |

## Type Aliases

| Type Alias                                                                                       | Description                                                                          |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| [Awaitable](https://evolu.dev/docs/api-reference/common/Types/type-aliases/Awaitable)                         | A value that can be awaited.                                                         |
| [Callback](https://evolu.dev/docs/api-reference/common/Types/type-aliases/Callback)                           | A function that receives a value and returns nothing.                                |
| [CallbackWithTeardown](https://evolu.dev/docs/api-reference/common/Types/type-aliases/CallbackWithTeardown)   | A function that receives a value and optionally returns a teardown function.         |
| [CompileTimeError](https://evolu.dev/docs/api-reference/common/Types/type-aliases/CompileTimeError)           | Creates a readable compiler-facing error message.                                    |
| [DistributiveOmit](https://evolu.dev/docs/api-reference/common/Types/type-aliases/DistributiveOmit)           | Removes keys from each member of a union.                                            |
| [IsSameType](https://evolu.dev/docs/api-reference/common/Types/type-aliases/IsSameType)                       | Returns whether two types are identical according to TypeScript.                     |
| [IsUnion](https://evolu.dev/docs/api-reference/common/Types/type-aliases/IsUnion)                             | Returns whether a type is a union.                                                   |
| [KeysOfUnion](https://evolu.dev/docs/api-reference/common/Types/type-aliases/KeysOfUnion)                     | Returns every property key present in any member of a union.                         |
| [Literal](https://evolu.dev/docs/api-reference/common/Types/type-aliases/Literal)                             | String, number, bigint, boolean, undefined, null                                     |
| [NullablePartial](https://evolu.dev/docs/api-reference/common/Types/type-aliases/NullablePartial)             | Makes properties optional if they accept `null` as a value.                          |
| [ParameterIntersection](https://evolu.dev/docs/api-reference/common/Types/type-aliases/ParameterIntersection) | Intersects the parameter types of a union of unary functions.                        |
| [PartialProp](https://evolu.dev/docs/api-reference/common/Types/type-aliases/PartialProp)                     | Makes a specific property of an object optional while keeping others unchanged.      |
| [Predicate](https://evolu.dev/docs/api-reference/common/Types/type-aliases/Predicate)                         | Checks a condition on a value and returns a boolean.                                 |
| [PredicateWithIndex](https://evolu.dev/docs/api-reference/common/Types/type-aliases/PredicateWithIndex)       | Checks a condition on a value at a given index and returns a boolean.                |
| [Refinement](https://evolu.dev/docs/api-reference/common/Types/type-aliases/Refinement)                       | A type guard function that refines type `A` to a narrower type `B`.                  |
| [RefinementWithIndex](https://evolu.dev/docs/api-reference/common/Types/type-aliases/RefinementWithIndex)     | A type guard function that refines type `A` to a narrower type `B` at a given index. |
| [Simplify](https://evolu.dev/docs/api-reference/common/Types/type-aliases/Simplify)                           | Simplify an intersection type into a single mapped type.                             |
| [UnionToIntersection](https://evolu.dev/docs/api-reference/common/Types/type-aliases/UnionToIntersection)     | Converts a union to an intersection.                                                 |
| [WidenLiteral](https://evolu.dev/docs/api-reference/common/Types/type-aliases/WidenLiteral)                   | Infers a broader type from a specific literal value type.                            |
| [Writable](https://evolu.dev/docs/api-reference/common/Types/type-aliases/Writable)                           | Removes `readonly` modifier from all properties of a type.                           |