ecsyjs / ecsy

Entity Component System for javascript
https://ecsyjs.github.io/ecsy/
MIT License
1.11k stars 115 forks source link

Fix Typescript defs for entity get(.*)Component functions #245

Closed zeddic closed 4 years ago

zeddic commented 4 years ago

Currently the typings read that the functions themselves may not be present, but I believe the intent is for the return type to potentially be undefined if that component was never added to the entity.

pirelenito commented 4 years ago

Hi @zeddic , I created #244 two days ago with the same change 😊

zeddic commented 4 years ago

Thanks @pirelenito , I missed that! I'll close this pull request.