Syntax Lookup

Enter some language construct you want to know more about.

@taggedTemplate

The removed decorator for binding JavaScript tag functions; use taggedTemplate instead.

Since 11.1

The @taggedTemplate decorator was removed in v13. Bind JavaScript tag functions with the built-in taggedTemplate<'param, 'output> type instead.

Example

ReScriptJS Output
// see https://bun.sh/docs/runtime/shell
type result = {exitCode: int}
@module("bun")
external sh: taggedTemplate<string, promise<result>> = "$"

let filename = "index.res"
let result = await sh`ls ${filename}`

References