Skip to content

DependsOnMethod is not assignable to the Routing type #2465

Closed as not planned
@LufyCZ

Description

@LufyCZ

Description

DependsOnMethod is not assignable to the Routing type. At runtime, this is completely valid, so it's purely a type issue.

export const plans: Routing = new DependsOnMethod({
  get: getPlansEndpoint,
})

Workaround

Adding a .nest({}) fixes the issue.

export const plans: Routing = new DependsOnMethod({
  get: getPlansEndpoint,
}).nest({})

Reproduction

https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbzgEQKZlQOwCYGcDymAsqjABYTYA0cMAnhnAEoQCuMwmA5nAL5wAzKBBBwA5KgAeYKKly4AtAC9KCgIZhgYgFDapkWHADGETLngCIEAFzM2HbnAC8cTKgDuKdFjyES5SgAKBF4ASl19aHgTM3gAIzUoWxZ2Th4XN080DBwCYlIKbGCwgDo3c2LQoA

Metadata

Metadata

Assignees

No one assigned

    Labels

    not an issueIrreproducible or unrelated

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions