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

add support for function overloads (?) #4

Open
danielroe opened this issue Mar 29, 2021 · 1 comment
Open

add support for function overloads (?) #4

danielroe opened this issue Mar 29, 2021 · 1 comment
Labels

Comments

@danielroe
Copy link
Member

e.g.:

/**
 * @param path - The value provided
 */
export function someFunction (path: string): string

/**
 * @param factory - sample start
 * @param subpath - sub value
 */
export function someFunction (factory: () => any, subpath: string): string
export function someFunction (param1: string | (() => any), param2?: string): string {
  // implementation
}
@pi0
Copy link
Member

pi0 commented Mar 29, 2021

We can (and should) support for overloads but it is beyond function only. Reference might also need overloads (like serverMiddleware can be arrray or object). For this we need an schema. I'm adding pending label to this issue since particularly function overloading is not a requirement now.

@pi0 pi0 added the pending label Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants