中文
← Errors

F_SYSTEM_EXPECTED_ARRAY_PARAM

Expected an array parameter

A list parameter such as aliases, Enum, DependsOn, or Exclusive is not an array.

Updated

Reproduction

Decorator properties that accept a list, including aliases, require an array even when the list has one item:

src/build.command.ts
import { Enum, Value } from 'func'

class BuildCommand {
  @Enum('production' as any)
  @Value()
  target: string = 'development'
}

How to fix it

Wrap the supplied item in an array:

src/build.command.ts
class BuildCommand {
  @Enum(['production'])
  @Value()
  target: string = 'development'
}