[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) › instanceOf

```ts
function instanceOf<Constructor>(
  constructor: ValidateInstanceConstructor<Constructor>,
): InstanceOfType<Constructor>;
```

Defined in: [packages/common/src/Type.ts:3270](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Type.ts#L3270)

Instance [Type](https://evolu.dev/docs/api-reference/common/Type/interfaces/Type) for one constructor.

Membership uses the intrinsic prototype chain, so subclasses are accepted,
equivalent constructors from other realms are rejected, and custom
`Symbol.hasInstance` implementations are ignored.

Use [object](https://evolu.dev/docs/api-reference/common/Type/functions/object) instead when only the structure matters.

### Example

```ts

class User {
  readonly name: string;

  constructor(name: string) {
    this.name = name;
  }
}

const UserInstance = instanceOf(User);

assertTrue(UserInstance.is(new User("Ada")));
assertFalse(UserInstance.is({ name: "Ada" }));
```