javascript - Angular 2 definition file -
i have custom gantt library, based on d3. it's written in normal javascript. want add angular 2 app. allready installed d3 via npm , added type file gantt chart node_modules following error message:
__webpack_imported_module_4_d3__.gantt not function i think it's because of wrong usage of export , definition file. have no idea how solve it.
node_modules/d3/index.js:
export {version} "./build/package"; export * "d3-array"; . . . export * "d3-gantt"; node_modules/d3-gantt/index.js:
export default gantt; function gantt() { // lot of code return gantt } node_modules/@types/d3/index.d.ts:
export namespace d3; export * 'd3-array'; . . . export * 'd3-gantt'; node_modules/@types/d3-gantt/index.d.ts:
export function gantt(): any; src/app/appcomponent.ts
buildgantt(){ ... import * d3 'd3' d3.gantt().tasktypes(tasknames).taskstatus(taskstatus).selector('#d3chart') //here error ... }
Comments
Post a Comment