---
title: toInt64()
framework: javascriptcore
role: symbol
role_heading: Instance Method
path: javascriptcore/jsvalue/toint64()
---

# toInt64()

## Declaration

```swift
func toInt64() -> Int64
```

## Discussion

Discussion Convert a JSValue to a int64_t. The JSValue is converted to an integer according to the rules specified by the JavaScript language. If the value is a BigInt, then the value is truncated to an int64_t.
