Closed athemsa closed 4 years ago
Lance is written in es6, and transpiled to es5 javascript. Take a look at package.json, the script "build" creates an es5 directory using the command babel src --out-dir es5
. And the actual files imported by nodejs and browsers are those found in the es5 subdirectory.
This makes it complicated to use typescript. I'm not sure how you generated the typescript file, but I suspect you may need to add the missing properties and methods manually.
Thank you for your answer, i will try to use es6 then ^^'
Handled in #132
Hi, me and my team have an ambitious project and we would like to know if it is possible to use typescript with lance-gg ?
We tried, but we have unrecognized methods or property ...
with your example Spaaace :
ERROR in F:\game prog\proj lance\src\common\SpaaaceGameEngine.ts(9,14) TS2339: Property 'physicsEngine' does not exist on type 'SpaaaceGameEngine'.
Property 'on' does not exist on type 'SpaaaceGameEngine'.
If you have an idea thanks for your help ^^'