我在nest.js中发现了一个小问题.
我有这个函数调用,第一个不起作用,第二个很好.问题出在ip
美元.我从很多地方调用这个函数.我的tsconfig将所有功能都打开了True,但没有提到这是一个问题.
为什么要这样?有人能解释一下吗?
async updateUser(
userId: string,
dto: myDto,
ip?: string,
isRegistration: boolean = false
): Promise<boolean> {}
async updateUser(
userId: string,
dto: myDto,
ip: string | null = null,
isRegistration: boolean = false
): Promise<boolean> {}