How well can hapi apps leverage Typescript?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- backend
Research direction
Start by reviewing the repository's Hapi and TypeScript setup, then trace how registered server methods, app settings, plugin events, and route pre-processing methods are represented. The issue is asking for broad guidance on static typing and Hapi design rather than naming a file, test, or bounded documentation change; done would require an agreed scope and documented answers.
Written by the indexing model from the issue text.
Description
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!
- Dominant language
- TypeScript
- Stars
- 353
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dwyl/hapi-typescript-example
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
dwyl/hapi-typescript-example#4 · 4 comments ·
All issues in dwyl/hapi-typescript-example
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
supabase/agent-skills#611 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
polka-codes/test#345 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
GoogleChromeLabs/project-sesame#217 ·
Maintainers usually reply within 12 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
solana-foundation/solana-com#2202 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100