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
the export keyword can be used to export constants, functions and classes from a module
the compiler desugars the export statements into a class declaration that gets returned from the module function
exporting let declarations is prohibited, as to not cause the possible misconception that any future updates to the variable will be reflected in the module instance
The default export is the binding that is used when no specific named bindings are imported
// liba.chexportconstfoo=100exportclassPerson{}exportdefaultclassFooBar{}// main.chimportlibaliba// class FooBarimportlibaasmylibmylib// class FooBarimport{foo,Person,FooBar}fromlibafoo// 100Person// class PersonFooBar// class FooBarliba// class FooBarimport{foo,Person,FooBar}fromlibaasmylibfoo// 100Person// class PersonFooBar// class FooBarliba// class FooBarmylib// class FooBar
The text was updated successfully, but these errors were encountered:
Exporting variables, functions, classes
export
keyword can be used to export constants, functions and classes from a modulelet
declarations is prohibited, as to not cause the possible misconception that any future updates to the variable will be reflected in the module instanceDefault export
The text was updated successfully, but these errors were encountered: