You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support export assignment (export =) and handle importing with import x = require(...). This will make typing Lua modules much more versatile.
Take care to handle export merging, for example:
declare module "something"{functionsomething(): voidnamespacesomething{exportinterfaceAnimal{species: string}exportconstvalue=5// values are also allowed... which is bad.}export=something}
Export assignments that are merged with a namespace can be imported with the import * as syntax:
import*assomethingfrom"something";something()constx=something.value// Bad, values don't make sense here in the sense of Lua// We should throw an error when code tries to access a member from a merged namespace lety: something.Animal// Good, types are useful
import{Animal}from"something"// This syntax can be used to access the namespace portion only
importsomething= require("something")// This syntax can be used to access the function only// This is also the only way you can import it if there is no namespace being merged into the export.
The text was updated successfully, but these errors were encountered:
Support export assignment (
export =
) and handle importing withimport x = require(...)
. This will make typing Lua modules much more versatile.Take care to handle export merging, for example:
Export assignments that are merged with a namespace can be imported with the
import * as
syntax:The text was updated successfully, but these errors were encountered: