There is the import syntax:
import * as foo from 'bar';
I similarly tried:
export * as foo from 'bar';
but that threw the errors:
ERROR in src/app/@theme/components/aComp/aComp.loader.ts(1,10): error TS1005: 'from' expected. src/app/@theme/components/aComp/aComp.loader.ts(1,13): error TS1005: ';' expected. src/app/@theme/components/aComp/aComp.loader.ts(1,17): error TS1005: ';' expected. src/app/@theme/components/aComp/aComp.loader.ts(1,22): error TS1005: ';' expected.
there is also the export syntax:
export { default as foo } from 'bar';
Is there a way to do this for *
as opposed to default
?
(FYI I'm trying to remove require
from the statement):
export const foo = require('bar');
the error below is thrown when ng serve
is run including the .ts
above:
ERROR in src/app/@theme/components/aComp/aComp.loader.ts(6,20): error TS2304: Cannot find name 'require'.