Command.importAs

import the option flag as new flag from parent command, so that this new flag can be pased as the the option flag of parent command. this member function aims at avoidind flag conflict between the command and its parent command, after using passThrough on parent command. the parent command must exist and parent command must have used passThrough and the flag must be the flag of one of the parent command's option or negate option. remeber that when parsing the new flag, the option's new flag is prior to the negate option ones. when parsing command line option flags, imported flag is prior to exported one, and the export one is prior to the ordinary pass-through option flag. isNegate decide whether import negate option or non-negate one, default: false

class Command
importAs
(
bool isNegate = false
)
(
string flag
,
string[] aliasFlags...
)

Parameters

flag string

the flag(or name) of one of the parent command's option or negate option

aliasFlags string[]

the new flags

Return Value

Type: Self

Self for chain call

Meta