Use arrow function for module consumption in template
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 13 Apr 2021 11:32:33 +0000 (13:32 +0200)
committerGitHub <noreply@github.com>
Tue, 13 Apr 2021 11:32:33 +0000 (13:32 +0200)
Co-authored-by: Matthias Schmidt <gravatronics@live.com>
docs/javascript/typescript.md

index e65c55c37fd246b22058512ee69103adfff3dae5..804046883026cd51281aca31141939120b133bca 100644 (file)
@@ -166,7 +166,7 @@ Within templates it can be consumed as follows.
 
 ```html
 <script data-relocate="true">
-  require(["Example"], function (Example) {
+  require(["Example"], (Example) => {
     Example.run(); // Alerts the contents of the `wcf.foo.bar` phrase.
   });
 </script>