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

# toInt32

Converts a number to an Int32.

## Declaration

```data
static Int32 toInt32();
```

## Parameters

- `value`: A number to convert or validate.

## Return Value

Return Value If the value passes validation, this function returns an Int32; otherwise it throws ValueNotInt32Error. A numeric value passes validation if it’s within signed 32-bit integer range.

## Discussion

Discussion In TypeScript, Int32 is a branded number type. In JavaScript, it’s a number. import { toInt32 } from "@apple/cktool.database";
