aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/docs/doc/README.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/docs/doc/README.md b/doc/docs/doc/README.md
index 3c910fd..faafd0c 100755
--- a/doc/docs/doc/README.md
+++ b/doc/docs/doc/README.md
@@ -760,6 +760,34 @@ export class Something
760</pre> 760</pre>
761</YueDisplay> 761</YueDisplay>
762 762
763Doing named export with destructuring.
764
765```moonscript
766export :loadstring, to_lua: tolua = yue
767export {itemA: {:fieldA = 'default'}} = tb
768```
769<YueDisplay>
770<pre>
771export :loadstring, to_lua: tolua = yue
772export {itemA: {:fieldA = 'default'}} = tb
773</pre>
774</YueDisplay>
775
776Export named items from module without creating local variables.
777
778```moonscript
779export.itemA = tb
780export.<index> = items
781export["a-b-c"] = 123
782```
783<YueDisplay>
784<pre>
785export.itemA = tb
786export.<index> = items
787export["a-b-c"] = 123
788</pre>
789</YueDisplay>
790
763* **Unnamed Export** 791* **Unnamed Export**
764Unnamed export will add the target item into the array part of the exported table. 792Unnamed export will add the target item into the array part of the exported table.
765 793