Open pdeva opened 9 years ago
Having similar problems when calling actions. Somehow the methods of ActionsClasses are not bound correctly. There would be the possibility to call actions via the constants Alt generates (e.g. MyActions.UPDATE_ACTION) but of course the typescript compiler is not happy with this.
I would love to hear from @goatslacker or @Shearerbeard about the state of Alt+Typescript. I'm getting the feeling the bindings are far from working...
I'm trying to free up some time to look into this today. What version of alt / TypeScript are you running? The definitions were created and tested under TS 1.5 beta and alt 0.16.x.
Sent from my iPhone
On Nov 18, 2015, at 2:08 AM, Shady notifications@github.com wrote:
Having similar problems when calling actions. Somehow the methods of ActionsClasses are not bound correctly. There would be the possibility to call actions via the constants Alt generates (e.g. MyActions.UPDATE_ACTION) but of course the typescript compiler is not happy with this.
I would love to hear from @goatslacker or @Shearerbeard about the state of Alt+Typescript. I'm getting the feeling the bindings are far from working...
— Reply to this email directly or view it on GitHub.
@Shearerbeard TS 1.6.2, Alt 0.17.8. I ran alt-tests.ts and I'm getting an error when trying to call actions. Something must have changed how Alt binds the actions
EDIT: Tried using TS 1.6.2 but Alt 0.16.10. Same error when executing the tests: Uncaught TypeError: Cannot read property 'split' of undefined
at the line return this.hello.split("");
. Meaning this
, which is a member of TestStore, is not bound correctly inside of alt.createActions
Could be related to https://github.com/goatslacker/alt/issues/630?
I am using the alt typescript definition file and running into issues with the
actions
field of theAltJS.ActionsClass
.Here is what my code looks like:
However, on this line:
I get this error:
Is there anything I am doing wrong?