Skip to content

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

Open
@gr2m

Description

@gr2m

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Up for grabsIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documentedtypescriptRelevant to TypeScript users only

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions