boardgameio / boardgame.io

State Management and Multiplayer Networking for Turn-Based Games
https://boardgame.io
MIT License
10.02k stars 708 forks source link

Local(): Typescript error: "An argument for 'opts' was not provided." #729

Closed janKir closed 4 years ago

janKir commented 4 years ago

After upgrading boardgame.io from 0.39.9 to 0.39.12, I get this typescript error when calling Local() without arguments: local.d.ts(81, 31): An argument for 'opts' was not provided.

Looking into the source code, I guess that the opts just needs to be made optional. Also the function seems to check for undefined opts so nothing should break if the argument is not provided.

delucis commented 4 years ago

@janKir Thanks for spotting that — probably an oversight when I converted to Typescript. Would you be interested in putting together a PR to fix that?

janKir commented 4 years ago

@delucis sure I can do this!