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

TypeScript: if endpoint for passed route has required parameters, require a parameters object to be set #126

Open
gr2m opened this issue Apr 20, 2020 · 0 comments
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented typescript Relevant to TypeScript users only

Comments

@gr2m
Copy link
Contributor

gr2m commented Apr 20, 2020

Today, TypeScript does not complain about this

endpoint("GET /orgs/:org");

But it should, because the org parameter is required. If "GET /orgs/:org" is set, then TypeScript should complain that only one of two parameters is set and only chill once the code is

endpoint("GET /orgs/:org", {
  org: 'my-org'
});

I'll get to this myself eventually, but if anyone wants to give that a go, just comment and give it a go :)

@gr2m gr2m added the Status: Up for grabs Issues that are ready to be worked on by anyone label Apr 20, 2020
@gr2m gr2m added feature typescript Relevant to TypeScript users only labels May 4, 2020
@gr2m gr2m added Type: Bug Something isn't working as documented and removed feature labels Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented typescript Relevant to TypeScript users only
Projects
None yet
Development

No branches or pull requests

2 participants
@gr2m and others