DocsPlaygroundBlogCommunityPackages
  • Playground
  • Blog
  • Community
  • Packages
  • X
  • Bluesky
  • GitHub
  • Forum
Language ManualAPISyntax LookupReact

Syntax Lookup

Enter some language construct you want to know more about.
This is the identity extension point.

%identity is used with external to do an unsafe conversion of a value from one type to another type.

ReScriptJS Output
external convertToFloat: int => float = "%identity"
let age = 10
let gpa = 2.1 +. convertToFloat(age)

References

  • Type Escape Hatch

  • Dangerous Type Cast

  • Extension Point Attributes

© 2025 The ReScript Project

About
  • Community
  • ReScript Association
Find us on