File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,12 @@ type student = {
45
45
age: int,
46
46
@bs.as("aria-label") ariaLabel: string,
47
47
}
48
+
49
+ @deprecated
50
+ let customDouble = foo => foo * 2
51
+
52
+ @deprecated("Use SomeOther.customTriple instead")
53
+ let customTriple = foo => foo * 3
48
54
```
49
55
``` js
50
56
```
@@ -55,6 +61,8 @@ type student = {
55
61
2 . ` @unboxed ` annotates the type definition.
56
62
3 . ` @bs.val ` annotates the ` external ` statement.
57
63
4 . ` @bs.as("aria-label") ` annotates the ` ariaLabel ` record field.
64
+ 5 . ` @deprecated ` annotates the ` customDouble ` expression. This shows a warning while compiling telling consumers to not rely on this method long-term.
65
+ 6 . ` @deprecated("Use SomeOther.customTriple instead") ` annotates the ` customTriple ` expression with a string to describe the reason for deprecation.
58
66
59
67
## Extension Point
60
68
You can’t perform that action at this time.
0 commit comments