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

```ts
const Int64FromInt64String: transform(
  "Int64FromInt64String",
  Int64String,
  Int64,
  {
    from: (value) => ok(globalThis.BigInt(value)),
    to: (value) => globalThis.String(value) as Int64String,
  },
);
```

Defined in: [packages/common/src/Type.ts:6261](https://github.com/evoluhq/evolu/blob/f0109fb501a593010e858e39248dde1200eeb2d7/packages/common/src/Type.ts#L6261)

Transforms an [Int64String](https://evolu.dev/docs/api-reference/common/Type/variables/Int64String) into an [Int64](https://evolu.dev/docs/api-reference/common/Type/variables/Int64).

This is useful at boundaries that expose signed 64-bit integers as decimal
text, including SQLite queries that cast INTEGER values to TEXT to avoid a
lossy JavaScript number conversion.

### Example

```ts

const result = Int64FromInt64String.fromUnknown("9223372036854775807");

assertOk(result, 9223372036854775807n);
assertEqual(Int64FromInt64String.to(result.value), "9223372036854775807");
```