You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportinterfacePluginMiddleware<State=Record<string,unknown>>{/** A path in the format of a filename path without filetype */path: string;middleware: Middleware<State>;}exportinterfaceMiddleware<State=Record<string,unknown>>{handler: MiddlewareHandler<State>|MiddlewareHandler<State>[];}
This is a bit clunky for plugin creators, due to the following syntax:
exportinterfacePluginMiddleware<State=Record<string,unknown>>{/** A path in the format of a filename path without filetype */path: string;middleware?: Middleware<State>;handler?: MiddlewareHandler<State>|MiddlewareHandler<State>[];}
While this makes sense now, the downside of this is that if we ever want to add anything to Middleware, then just specifying a handler and path in plugins is no longer valid. Thoughts on this concern, or this suggestion in general? @bjesuiter
We currently have:
This is a bit clunky for plugin creators, due to the following syntax:
Ideally they should just specify the handler and path:
So this suggests a type like the following:
While this makes sense now, the downside of this is that if we ever want to add anything to
Middleware
, then just specifying a handler and path in plugins is no longer valid. Thoughts on this concern, or this suggestion in general? @bjesuiterfrom: #1545 (comment)
The text was updated successfully, but these errors were encountered: