summaryrefslogtreecommitdiffhomepage
path: root/assemblyscript.html.markdown
diff options
context:
space:
mode:
authorBoris Verkhovskiy <boris.verk@gmail.com>2024-04-19 14:49:25 -0700
committerBoris Verkhovskiy <boris.verk@gmail.com>2024-04-19 14:49:25 -0700
commitd66ea131e4afbb6932f0c4113aff510f56561e7f (patch)
treed0930fcaf492a03a9ca5afaed3674db06507fad6 /assemblyscript.html.markdown
parentf56f80dd803b24a5c7fdc96e97d855129563e671 (diff)
[assemblyscript/en] fix link and format
Diffstat (limited to 'assemblyscript.html.markdown')
-rw-r--r--assemblyscript.html.markdown21
1 files changed, 11 insertions, 10 deletions
diff --git a/assemblyscript.html.markdown b/assemblyscript.html.markdown
index 0bc4bf0d..1e258ea4 100644
--- a/assemblyscript.html.markdown
+++ b/assemblyscript.html.markdown
@@ -1,5 +1,5 @@
---
-language: Assemblyscript
+language: AssemblyScript
contributors:
- ["Philippe Vlérick", "https://github.com/pvlerick"]
- ["Steve Huguenin-Elie", "https://github.com/StEvUgnIn"]
@@ -13,7 +13,7 @@ __AssemblyScript__ compiles a variant of __TypeScript__ (basically JavaScript wi
This article will focus only on AssemblyScript extra syntax, as opposed to [TypeScript](/docs/typescript) and [JavaScript](/docs/javascript).
To test AssemblyScript's compiler, head to the
-[Playground](https://bit.ly/asplayground) where you will be able
+[Playground](https://www.assemblyscript.org/editor.html#IyFydW50aW1lPXN0dWIKLyoqIENhbGN1bGF0ZXMgdGhlIG4tdGggRmlib25hY2NpIG51bWJlci4gKi8KZXhwb3J0IGZ1bmN0aW9uIGZpYihuOiBpMzIpOiBpMzIgewogIHZhciBhID0gMCwgYiA9IDEKICBpZiAobiA+IDApIHsKICAgIHdoaWxlICgtLW4pIHsKICAgICAgbGV0IHQgPSBhICsgYgogICAgICBhID0gYgogICAgICBiID0gdAogICAgfQogICAgcmV0dXJuIGIKICB9CiAgcmV0dXJuIGEKfQoKIyFodG1sCjx0ZXh0YXJlYSBpZD0ib3V0cHV0IiBzdHlsZT0iaGVpZ2h0OiAxMDAlOyB3aWR0aDogMTAwJSIgcmVhZG9ubHk+PC90ZXh0YXJlYT4KPHNjcmlwdD4KbG9hZGVyLmluc3RhbnRpYXRlKG1vZHVsZV93YXNtLCB7IC8qIGltcG9ydHMgKi8gfSkKICAudGhlbigoeyBleHBvcnRzIH0pID0+IHsKICAgIGNvbnN0IG91dHB1dCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdvdXRwdXQnKQogICAgZm9yIChsZXQgaSA9IDA7IGkgPD0gMTA7ICsraSkgewogICAgICBvdXRwdXQudmFsdWUgKz0gYGZpYigke2l9KSA9ICR7ZXhwb3J0cy5maWIoaSl9XG5gCiAgICB9CiAgfSkKPC9zY3JpcHQ+Cg==) where you will be able
to type code, have auto completion and directly see the emitted WebAssembly.
```ts
@@ -144,11 +144,11 @@ export namespace Geometry {
let s1 = new Geometry.Square(5);
// Generics
-// AssemblyScript compiles generics to one concrete method or function per set
-// of unique contextual type arguments, also known as [monomorphisation].
-// Implications are that a module only includes and exports concrete functions
-// for sets of type arguments actually used and that concrete functions can be
-// shortcutted with [static type checks] at compile time, which turned out to
+// AssemblyScript compiles generics to one concrete method or function per set
+// of unique contextual type arguments, also known as [monomorphisation].
+// Implications are that a module only includes and exports concrete functions
+// for sets of type arguments actually used and that concrete functions can be
+// shortcutted with [static type checks] at compile time, which turned out to
// be quite useful.
// Classes
export class Tuple<T1, T2> {
@@ -196,6 +196,7 @@ let bytes3: u8[] = [0, 1, 2, 3, 4] // will infer as Array<u8>
```
## Further Reading
- * [AssemblyScript Official website] (https://www.assemblyscript.org/)
- * [AssemblyScript source documentation] https://github.com/AssemblyScript/website/tree/main/src)
- * [Source Code on GitHub] (https://github.com/AssemblyScript/assemblyscript)
+
+ * [AssemblyScript Official website](https://www.assemblyscript.org/)
+ * [AssemblyScript source documentation](https://github.com/AssemblyScript/website/tree/main/src)
+ * [Source Code on GitHub](https://github.com/AssemblyScript/assemblyscript)