error TS2304: Cannot find name 'load'.
taoqf opened this issue · 5 comments
when i run "grunt dist"
Running "ts:dist" (ts) task
Compiling...
Using tsc v1.8.9
src/loader.ts(164,33): error TS2304: Cannot find name 'load'.
src/loader.ts(164,63): error TS2304: Cannot find name 'Packages'.
src/loader.ts(957,4): error TS2304: Cannot find name 'load'.
src/loader.ts(1104,3): error TS2304: Cannot find name 'load'.
src/loader.ts(1106,12): error TS2304: Cannot find name 'Packages'.
src/loader.ts(1106,66): error TS2304: Cannot find name 'arguments'.
Confirmed.
@tomdye it is likely you have some interfaces that aren't being included in the scope of the dist
build (e.g. in tests
somewhere).
file nashorn.d.ts is exist in tests where load is defined as any.
i think the generated dts using "grunt dist" would not be use in nodejs becuase require will be conflict with nodejs.d.ts mostly.
by the way, can i use import * as Express from 'express';
instead of import * as Express from 'node!express';
which is the way dojo1.x goes.
i suggest use other name which is different from require like requirejs
by the way, can i use import * as Express from 'express'; instead of import * as Express from 'node!express'; which is the way dojo1.x goes.
Loading CommonJS formatted modules (versus UMD or AMD) should be transparent with this loader. So the answer is yes.
i suggest use other name which is different from require like requirejs
This would be a separate feature/enhancement. I opened #69 to consider that.
thanks.