h3 icon indicating copy to clipboard operation
h3 copied to clipboard

Remove warning for `defineEventHandler`

Open pi0 opened this issue 1 year ago • 1 comments

For historical reasons, we were used to automatically convert legacy express middleware to h3 handlers and when we changed that, we started to add a warning.

Most of the advanced features of h3 including type inference, object syntax, and middleware are only possible with this wrapper only and i think we probably always advice for it in all docs too.

But.. it often causes DX issues when we want simply draft a handler (app.use(() => 'ok')) or try something or make an internal utility that is already typed.

I am thinking to remove the warning (while keep always using in docs).

/cc @danielroe do you have any concerns specifically re legacy reasons to keep?

pi0 avatar Jan 26 '24 17:01 pi0