VSCode 报错:类型不匹配

类型“(: Argv<never, never, [number, number, …string[]], {}>, min: number, max: number) => number”的参数不能赋给类型“Action<never, never, [number, number, …string[]], {}>”的参数。
不能将类型“number”分配给类型“void | Fragment | Promise<void | Fragment>”。ts(2345)
function(
: Argv<never, never, [number, number, …string], {}>, min: number, max: number): number

TS版本:5.3.2

2 个赞
1 个赞

The error message did tell you that you should return a Fragment, which in Koishi refers to string or Message Element.

1 个赞