<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CKToolJS",
  "identifier" : "/documentation/CKToolJS/CKToolDatabaseModule/toInt32",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "CKTool JS"
    ],
    "preciseIdentifier" : "clm/CKToolDatabaseModule/toInt32"
  },
  "title" : "toInt32"
}
-->

# toInt32

Converts a number to an `Int32`.

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

## Parameters

`value`

A number to convert or validate.

## 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

In TypeScript, `Int32` is a branded number type. In JavaScript, it’s a number.

```javascript
import { toInt32 } from "@apple/cktool.database";
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)