Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How well can hapi apps leverage Typescript? #11

Open
jtlapp opened this issue Sep 14, 2017 · 0 comments
Open

How well can hapi apps leverage Typescript? #11

jtlapp opened this issue Sep 14, 2017 · 0 comments

Comments

@jtlapp
Copy link

jtlapp commented Sep 14, 2017

Hello. Thank you so much for doing this. I'm a long-time Java dev, and after creating my first Express server in vanilla JS, I vowed to never again do without static type checking.

I'm drawn to hapi for a number of reasons, but the more I read, the more worried I get that I wouldn't be able to leverage strong type checking.

How do you get static type checking in the following areas?

  • registered server methods
  • registered app settings
  • emitted plugin events
  • route pre-processing methods

It also seems to me that hapi goes out of its way to avoid the benefits of CommonJS, winging its own solutions that seem less optimal. There's no need for hapi's cross-plugin global namespaces. I don't see why module scoped variables have to go in internals, which is itself module-scoped.

I've only written demo hapi servers so far, am trying to decide whether to proceed. What can you tell me about the pros and cons of trying to get static type checking on top of hapi?

Thanks for any help you can provide!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant