---
title: toInt64
framework: CKTool JS
role: symbol
role_heading: Type Method
platforms: [cktool js 1.2.15+]
path: cktooljs/cktooldatabasemodule/toint64
---

# toInt64

Converts a number or numeric string to a Int64.

## Declaration

```data
static Int64 toInt64();
```

## Parameters

- `value`: A numeric or numeric string to convert or validate.

## Return Value

Return Value If the value passes validation, this function returns a Int64; otherwise it throws ValueNotInt64Error. A numeric value passes validation if it’s within signed 64-bit integer range. toInt64 can accept a numeric string that represents a number that requires more precision than can be achieved with a JavaScript number.

## Discussion

Discussion In TypeScript, Int64 is a branded BigNumber type. In JavaScript, it’s a BigNumber. BigNumber is from the bignumber.js package. import { toInt64 } from "@apple/cktool.database";
