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

```ts
type InferType<T> = T["Output"];
```

Defined in: [packages/common/src/Type.ts:1287](https://github.com/evoluhq/evolu/blob/a18269a1b822c670b507c6a9b73b23eed32551fe/packages/common/src/Type.ts#L1287)

Extracts the Output of a [Type](https://evolu.dev/docs/api-reference/common/Type/interfaces/Type).

Use it to declare a named object Type Output as an interface. TypeScript then
preserves the interface name in tooltips and error messages instead of
expanding all of its properties.

### Example

```ts
import {
  NonEmptyTrimmedString100,
  PositiveInt,
  object,
  optional,
  type InferType,
} from "@evolu/common";

const User = object({
  name: NonEmptyTrimmedString100,
  age: optional(PositiveInt),
});
interface User extends InferType<typeof User> {}
```