中文
← Errors

F_SYSTEM_EXPECTED_ARRAY_PARAM

Expected an array parameter

A decorator parameter such as path, SubOptions, Enum, DependsOn, or Exclusive is not an array.

Updated 2 weeks ago

Reproduction

Decorators that accept a list require an array even when the list has one item:

src/build.command.ts
import { SubOptions } from 'func'

@SubOptions({ name: 'verbose' } as any)
class BuildCommand {}

How to fix it

Wrap the supplied item in an array:

src/build.command.ts
@SubOptions([{ name: 'verbose' }])
class BuildCommand {}