Skip to content

Commit c796a71

Browse files
committed
better document JS tagged templates
1 parent afa3e0c commit c796a71

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pages/docs/manual/latest/bind-to-js-function.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,9 @@ Currently 4 directives are supported: `null_to_opt`, `undefined_to_opt`, `nullab
426426

427427
**Since 11.1**
428428

429-
**Experimental** You can easily bind to JS tagged template functions.
430-
All you need to do is defining a binding to a function that has two arrays as arguments,
429+
**Experimental** You can easily bind to [JS tagged template functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates).
430+
Tag functions in JS expect as input an array of strings and variadic parameters for the arguments of the interpolation.
431+
To bind to those functions in rescript, write bindings that have two arrays as arguments,
431432
the first one being an array of strings and the second can be an array of anything.
432433
You add the `@taggedTemplate` annotation and you're good to go!
433434

0 commit comments

Comments
 (0)