Closed
Description
TypeScript Version: 3.1.0-dev.201xxxxx
Search Terms:
Code
import util from 'util'
class Test {
public test (s: string, callback: (error: Error | null, r: number) => void): void
public test (s: string, s1: string, callback: (error: Error | null, r: number) => void): void
public test (
...args: any[]
): void {
return
}
}
const t = new Test()
const func = util.promisify(t.test)
// const func: (arg1: string) => Promise<{}>
Expected behavior:
func
's type should be const func: (arg1: string) => Promise<number>
Actual behavior:
func
's type is const func: (arg1: string) => Promise<{}>
Promise<{}>
should be Promise<number>
Playground Link:
Related Issues: