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 external binding keyword.

external is used to bind ReScript code to external JS code, including bindings to global values, modules, functions and objects.

Example

ReScriptJS Output
@module("path")
external dirname: string => string = "dirname"

let root = dirname("/User/github")

References

  • External (Bind to Any JS Library)

  • Bind to JS Object

  • Bind to JS Function

  • Import From JavaScript

  • Bind to Global JS Values

© 2025 The ReScript Project

About
  • Community
  • ReScript Association
Find us on