@nomiclabs/buidler > OverriddenTaskDefinition

Class: OverriddenTaskDefinition

Allows you to override a previously defined task.

When overriding a task you can:

  • flag it as internal
  • set a new description
  • set a new action

Hierarchy

OverriddenTaskDefinition

Implements

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new OverriddenTaskDefinition(parentTaskDefinition: TaskDefinition, isInternal?: boolean): OverriddenTaskDefinition

Defined in internal/core/tasks/task-definitions.ts:526

Parameters:

Name Type Default value
parentTaskDefinition TaskDefinition -
Default value isInternal boolean false

Returns: OverriddenTaskDefinition


Properties

isInternal

● isInternal: boolean

Implementation of TaskDefinition.isInternal

Defined in internal/core/tasks/task-definitions.ts:530


parentTaskDefinition

● parentTaskDefinition: TaskDefinition

Defined in internal/core/tasks/task-definitions.ts:529


Accessors

action

get action(): function

Defined in internal/core/tasks/task-definitions.ts:574

Retrieves, if defined, the action of the overriden task, otherwise retrieves the action of the parent task.

Returns: function


description

get description(): undefined | string

Defined in internal/core/tasks/task-definitions.ts:562

Retrieves, if defined, the description of the overriden task, otherwise retrieves the description of the parent task.

Returns: undefined | string


name

get name(): string

Defined in internal/core/tasks/task-definitions.ts:554

Retrieves the parent task's name.

Returns: string


paramDefinitions

get paramDefinitions(): ParamDefinitionsMap

Defined in internal/core/tasks/task-definitions.ts:585

Retrieves the parent task's param definitions.

Returns: ParamDefinitionsMap


positionalParamDefinitions

get positionalParamDefinitions(): ParamDefinition<any>[]

Defined in internal/core/tasks/task-definitions.ts:592

Retrieves the parent task's positional param definitions.

Returns: ParamDefinition<any>[]


Methods

_throwNoParamsOverrideError

_throwNoParamsOverrideError(): never

Defined in internal/core/tasks/task-definitions.ts:678

Returns: never


addFlag

addFlag(name: string, description?: undefined | string): this

Implementation of TaskDefinition.addFlag

Defined in internal/core/tasks/task-definitions.ts:674

Overriden tasks can't add new parameters.

Parameters:

Name Type
name string
Optional description undefined | string

Returns: this


addOptionalParam

addOptionalParam<T>(name: string, description?: undefined | string, defaultValue?: T, type?: types.ArgumentType<T>): this

Implementation of TaskDefinition.addOptionalParam

Defined in internal/core/tasks/task-definitions.ts:612

Overriden tasks can't add new parameters.

Type parameters:

T

Parameters:

Name Type
name string
Optional description undefined | string
Optional defaultValue T
Optional type types.ArgumentType<T>

Returns: this


addOptionalPositionalParam

addOptionalPositionalParam<T>(name: string, description?: undefined | string, defaultValue?: T, type?: types.ArgumentType<T>): this

Implementation of TaskDefinition.addOptionalPositionalParam

Defined in internal/core/tasks/task-definitions.ts:637

Overriden tasks can't add new parameters.

Type parameters:

T

Parameters:

Name Type
name string
Optional description undefined | string
Optional defaultValue T
Optional type types.ArgumentType<T>

Returns: this


addOptionalVariadicPositionalParam

addOptionalVariadicPositionalParam<T>(name: string, description?: undefined | string, defaultValue?: T[], type?: types.ArgumentType<T>): this

Implementation of TaskDefinition.addOptionalVariadicPositionalParam

Defined in internal/core/tasks/task-definitions.ts:662

Overriden tasks can't add new parameters.

Type parameters:

T

Parameters:

Name Type
name string
Optional description undefined | string
Optional defaultValue T[]
Optional type types.ArgumentType<T>

Returns: this


addParam

addParam<T>(name: string, description?: undefined | string, defaultValue?: T, type?: types.ArgumentType<T>, isOptional?: undefined | false | true): this

Implementation of TaskDefinition.addParam

Defined in internal/core/tasks/task-definitions.ts:599

Overriden tasks can't add new parameters.

Type parameters:

T

Parameters:

Name Type
name string
Optional description undefined | string
Optional defaultValue T
Optional type types.ArgumentType<T>
Optional isOptional undefined | false | true

Returns: this


addPositionalParam

addPositionalParam<T>(name: string, description?: undefined | string, defaultValue?: T, type?: types.ArgumentType<T>, isOptional?: undefined | false | true): this

Implementation of TaskDefinition.addPositionalParam

Defined in internal/core/tasks/task-definitions.ts:624

Overriden tasks can't add new parameters.

Type parameters:

T

Parameters:

Name Type
name string
Optional description undefined | string
Optional defaultValue T
Optional type types.ArgumentType<T>
Optional isOptional undefined | false | true

Returns: this


addVariadicPositionalParam

addVariadicPositionalParam<T>(name: string, description?: undefined | string, defaultValue?: T[], type?: types.ArgumentType<T>, isOptional?: undefined | false | true): this

Implementation of TaskDefinition.addVariadicPositionalParam

Defined in internal/core/tasks/task-definitions.ts:649

Overriden tasks can't add new parameters.

Type parameters:

T

Parameters:

Name Type
name string
Optional description undefined | string
Optional defaultValue T[]
Optional type types.ArgumentType<T>
Optional isOptional undefined | false | true

Returns: this


setAction

setAction<ArgsT>(action: ActionType<ArgsT>): this

Implementation of TaskDefinition.setAction

Defined in internal/core/tasks/task-definitions.ts:545

Overrides the parent task's action.

Type parameters:

ArgsT : TaskArguments

Parameters:

Name Type Description
action ActionType<ArgsT> the action.

Returns: this


setDescription

setDescription(description: string): this

Implementation of TaskDefinition.setDescription

Defined in internal/core/tasks/task-definitions.ts:536

Parameters:

Name Type
description string

Returns: this