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
Since Nitro generates some types for the response of routes, it would be great if it could also generate types for the input.
As an example:
// routes/index.ts// This is just a normal eventhandlerexportdefaultdefineEventHandler(async(event)=>{const{ greet }=(awaitreadBody(event))satisfiesInput;return{hello: greet,};});// here comes the fun part:exporttypeInput={greet: string;};
Nitro already generates the types for the response from the event handler:
Describe the feature
Since Nitro generates some types for the response of routes, it would be great if it could also generate types for the input.
As an example:
Nitro already generates the types for the response from the event handler:
With the types for the input this could look something like this:
Additional information
The text was updated successfully, but these errors were encountered: