An optional org specified by username or alias Will default to the default org if one is not specified. Will not throw if the specified org and default do not exist

import { Flags } from '@salesforce/sf-plugins-core';
public static flags = {
// setting length or prefix
'target-org': Flags.optionalOrg(),
// adding properties
'flag2': Flags.optionalOrg({
required: true,
description: 'flag2 description',
}),
}
  • Parameters

    • options: CustomOptions & {} & Partial<OptionFlag<Org, CustomOptions>>

    Returns OptionFlag<Org, CustomOptions>

  • Parameters

    • options: CustomOptions & {} & Partial<OptionFlag<undefined | Org[], CustomOptions>>

    Returns OptionFlag<undefined | Org[], CustomOptions>

  • Parameters

    • options: CustomOptions & {} & Partial<OptionFlag<undefined | Org, CustomOptions>>

    Returns OptionFlag<undefined | Org, CustomOptions>

  • Parameters

    • options: CustomOptions & {} & (({ required: true; } | { default: FlagDefault<Org | undefined, CustomOptions>; }) & Partial<OptionFlag<Org, CustomOptions>>)

    Returns OptionFlag<Org, CustomOptions>

  • Parameters

    • options: CustomOptions & {} & (({ required: true; } | { default: FlagDefault<Org[] | undefined, CustomOptions>; }) & Partial<OptionFlag<Org[], CustomOptions>>)

    Returns OptionFlag<Org[], CustomOptions>

  • Parameters

    • options: CustomOptions & {} & (({ required: true; } | { default: FlagDefault<Org | undefined, CustomOptions>; }) & Partial<OptionFlag<Org, CustomOptions>>)

    Returns OptionFlag<Org, CustomOptions>

  • Parameters

    • options: CustomOptions & {} & Partial<OptionFlag<undefined | Org, CustomOptions>>

    Returns OptionFlag<undefined | Org, CustomOptions>

  • Parameters

    • options: CustomOptions & {} & Partial<OptionFlag<Org, CustomOptions>>

    Returns OptionFlag<Org, CustomOptions>

  • Parameters

    • Optionaloptions: CustomOptions & {} & Partial<OptionFlag<Org, CustomOptions>>

    Returns OptionFlag<Org, CustomOptions>

  • Parameters

    • options: CustomOptions & {} & Partial<OptionFlag<Org[], CustomOptions>>

    Returns OptionFlag<Org[], CustomOptions>