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

```ts
function id<Table>(table: Table): TableId<Table>;
```

Defined in: [packages/common/src/Type.ts:1872](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Type.ts#L1872)

Creates a branded [Id](https://evolu.dev/docs/api-reference/common/Type/variables/Id) Type for a table's primary key.

The table name becomes an additional brand for type safety.

### Example

```ts
const TodoId = id("Todo");
// string & Brand<"Id"> & Brand<"Todo">
type TodoId = typeof TodoId.Type;
```