Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Checking Endpoint Varibles #99

Open
SellersEvan opened this issue Apr 23, 2024 · 0 comments
Open

Type Checking Endpoint Varibles #99

SellersEvan opened this issue Apr 23, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@SellersEvan
Copy link
Member

Is your feature request related to a problem? Please describe.
It is possible that a developer doesn't use the correct Request type in an endpoint. We should verify if they are using the request parameter of an endpoint that it's the SherpaJS request object.

Describe the solution you'd like
Check the parameters of the exported functions. If they are using the request parameter, should verify that the Request object corresponds to an import from from Sherpa JS Core.

export function GET(request:Request, context:unknown) {
    return Response.JSON({ 
        request: request,
        context: context
    });
}

Describe alternatives you've considered
N/A

Additional context
N/A

@SellersEvan SellersEvan added the enhancement New feature or request label Apr 23, 2024
@SellersEvan SellersEvan added this to the 1.4.0 - QoL milestone May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant