[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:1606](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Type.ts#L1606)

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 {
  assertEqual,
  assertType,
  NonEmptyTrimmedString100,
  PositiveInt,
  object,
  optional,
  type InferType,
} from "@evolu/common";

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

const user = User.orThrow({ name: "Ada", age: 37 });

assertType<typeof User.Output, typeof user>();
assertEqual(user.name, "Ada");
```