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 @new decorator.

The @new decorator is used whenever you need to bind to a JavaScript class constructor that requires the new keword for instantiation.

Example

ReScriptJS Output
type t

@new external create: unit => t = "Date"

let now = create()

References

  • Bind to a JS Object That's a Class

© 2025 The ReScript Project

About
  • Community
  • ReScript Association
Find us on