-
Notifications
You must be signed in to change notification settings - Fork 13
Modules
hazzard993 edited this page Nov 4, 2018
·
3 revisions
Import as
// source
import * as hello from "module";
-- transpiled
local hello = require("module")
module
can be a ts
or a d.ts
file.
Selective import
// source
import { a, b } from "module";
-- transpiled. unpacks what it receives
local module0 = require("module")
local a = module0.a
local b = module0.b
Note that if module
was implemented for Lua, it needs to return a table with the keys a
and b
.