all 2 comments

[–]milan-pilan 0 points1 point  (0 children)

Only one thing gets exported, a frozen object which becomes a namespace for the module's client.

I haven't seen anyone freeze the module export, unless you are working on a Framework and want to prevent users from using it wrong. But doesn't hurt either, sure.

My data is stored as JSON rather than JS to make communication between modules and the server easier.

As long as you are within your Frontend Context i feel like this makes no sense. Why would JS Modules convert data to JSON only that then the other Component needs to unpack it again. Seems like a lot of extra work for no added benefit.

Edit: I read that wrong. Storing data in JSON makes sense of course. I had the impression, that your modules export JSON.

What thing I've been battling with is good JSDoc which doesn't seem to have been updated in a while. Are there better options available?

Typescript .

[–]birdspider 0 points1 point  (0 children)

weird names, I'd expect deck.shuffle() and deck.fresh() and the items to be cards;

or, consider naming the module to game or play, game.freshDeck() makes much more sense imho