@@ -6,7 +6,53 @@ canonical: "/docs/manual/latest/interop-cheatsheet"
6
6
7
7
# Interop Cheatsheet
8
8
9
- <!-- TODO: this should be a glossary instead -->
9
+ This is a glossary with examples. All the features are described by later pages.
10
+
11
+ ## List of Decorators
12
+
13
+ <!-- Synced from https://github.com/rescript-lang/syntax/blob/123760c5a264da5288eeee5213ddd25eb86d62fe/src/res_printer.ml#L19-L51 -->
14
+
15
+ ### Attributes
16
+
17
+ - `@bs.as`: [here](attribute#usage), [here](bind-to-js-function#fixed-arguments), [here](bind-to-js-function#constrain-arguments-better) and [here](generate-converters-accessors#usage-3)
18
+ - [`@bs.deriving`](generate-converters-accessors#generate-functions--plain-values-for-variants)
19
+ - [`@bs.get`](bind-to-js-object#bind-using-special-bs-getters--setters)
20
+ - [`@bs.get_index`](bind-to-js-object#bind-using-special-bs-getters--setters)
21
+ <!-- - `@bs.ignore` -->
22
+ - [`@bs.inline`](inlining-constants)
23
+ - [`@bs.int`](bind-to-js-function#constrain-arguments-better)
24
+ <!-- - `@bs.meth` -->
25
+ - [`@bs.module`](import-from-export-to-js#import-a-javascript-modules-content)
26
+ - [`@bs.new`](bind-to-js-object#bind-to-a-js-object-thats-a-class)
27
+ - [`@bs.obj`](generate-converters-accessors#convert-external-into-js-object-creation-function)
28
+ - [`@bs.optional`](generate-converters-accessors#optional-labels)
29
+ - [`@bs.return`](bind-to-js-function#function-nullable-return-value-wrapping)
30
+ - `@bs.send`: [here](bind-to-js-function#object-method) and [here](pipe#js-method-chaining)
31
+ - [`@bs.scope`](bind-to-global-js-values#global-modules)
32
+ - [`@bs.set`](bind-to-js-object#bind-using-special-bs-getters--setters)
33
+ - [`@bs.set_index`](bind-to-js-object#bind-using-special-bs-getters--setters)
34
+ - [`@bs.variadic`](bind-to-js-function#variadic-function-arguments)
35
+ - [`@bs.string`](bind-to-js-function#constrain-arguments-better)
36
+ - [`@bs.this`](bind-to-js-function#modeling-this-based-callbacks)
37
+ - [`@bs.uncurry`](bind-to-js-function#extra-solution)
38
+ - [`@bs.unwrap`](bind-to-js-function#trick-2-polymorphic-variant--bsunwrap)
39
+ - [`@bs.val`](bind-to-global-js-values#global-modules)
40
+
41
+ - [`@deprecated`](attribute#usage)
42
+ - [`genType`](https://github.com/reason-association/genType)
43
+ - [`@JSX`](jsx)
44
+ - `@react.component`: [here](/docs/react/latest/introduction) and [here](https://github.com/reasonml/reason-react)
45
+ - [`@warning`](attribute#usage)
46
+ - [`@unboxed`](unboxed)
47
+
48
+ ### Extension Points
49
+
50
+ - [`%debugger`](embed-raw-javascript#debugger)
51
+ - [`%external`](bind-to-global-js-values#special-global-values)
52
+ <!-- - `%node` -->
53
+ <!-- - `%obj` -->
54
+ - [`%raw`](embed-raw-javascript#paste-raw-js-code)
55
+ - [`%re`](primitive-types#regular-expression)
10
56
11
57
## Raw JS
12
58
@@ -199,25 +245,3 @@ var gpa = 2.1 + 10;
199
245
```
200
246
201
247
</CodeTab >
202
-
203
- ## List of ` @bs ` Decorators
204
-
205
- - ` @bs.as `
206
- - ` @bs.get `
207
- - ` @bs.get_index `
208
- - ` @bs.inline `
209
- - ` @bs.int `
210
- - ` @bs.meth `
211
- - ` @bs.module `
212
- - ` @bs.new `
213
- - ` @bs.return `
214
- - ` @bs.scope `
215
- - ` @bs.send `
216
- - ` @bs.set `
217
- - ` @bs.set_index `
218
- - ` @bs.string `
219
- - ` @bs.this `
220
- - ` @bs.uncurry `
221
- - ` @bs.unwrap `
222
- - ` @bs.val `
223
- - ` @bs.variadic `
0 commit comments