Ask questionsApplication state in Routers not typed properly

While using typescript and defining a state for the application like so:

const app = new Application<AppState>()

typings for ctx.state is not typed accordingly to AppState interface with this code

new Router().get('/', (ctx) => ctx.state)

Am I missing something or do the Router class need generic typings similar to Application?

While running the code the state is actually there, only the typings that are incorrect.


Answer questions kitsonk

I believe this is fixed in master now.


Related questions

No questions were found.
Github User Rank List