我有这个代码
@Where(
['owner', 'Manager', 'Email', 'productEmail', 'Region'],
(keys: string[], values: unknown) => {
const query = {};
keys.forEach((k: string) => {
}
)
Run Code Online (Sandbox Code Playgroud)
当我启用类型检查的严格规则时,它会抱怨
Argument of type '(keys: string[], values: unknown) => {}' is not assignable to parameter of type '(key: string | string[], values: unknown) => unknown'.
Types of parameters 'keys' and 'key' are incompatible.
Type 'string | string[]' is not assignable to type 'string[]'.
Type 'string' is not assignable to type 'string[]'.ts
Run Code Online (Sandbox Code Playgroud)
当我将按键类型更改为(keys: string | string[], values: …