Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Missing method return type in typescript definition file

$
0
0

@cobolstinks wrote:

Hello,

I got this message from the angular2 compiler when trying to AOT compile my app:

npm : Error at C:/tfs-git-kdc/WebApp/mea/node_modules/gojs/release/go.d.ts:8503:9: 'updateResizeHandles', which lacks return-type annotation, implicitly has an 'any' return type.

It appears that ngc doesn't like the missing void return type on the updateResizeHandles function declaration. I've modified line number 8503 to this:

updateResizeHandles(elt: GraphObject, angle: number):void; // undocumented

and all is well with ngc now. However I'm getting errors trying to rollup my app. Getting these:

app\cpm\gojs\gojs-cpm.component.js (24:19) 'GraphObject' is not exported by 'node_modules\gojs\release\go.js'. See https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module

Do i have to modify the d.ts file to export these individual classes? Anyone on here have success AOT compiling an Angular2 app that imports GoJs?

Thanks!

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles