@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:482

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:486


parentTaskDefinition

● parentTaskDefinition: TaskDefinition

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


Accessors

action

get action(): function

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

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:518

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:510

Retrieves the parent task's name.

Returns: string


paramDefinitions

get paramDefinitions(): ParamDefinitionsMap

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

Retrieves the parent task's param definitions.

Returns: ParamDefinitionsMap


positionalParamDefinitions

get positionalParamDefinitions(): ParamDefinition<any>[]

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

Retrieves the parent task's positional param definitions.

Returns: ParamDefinition<any>[]


Methods

_throwNoParamsOverrideError

_throwNoParamsOverrideError(): never

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

Returns: never


addFlag

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

Implementation of TaskDefinition.addFlag

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

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:568

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:593

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:618

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:555

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:580

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:605

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:501

Overrides the parent task's action.

Type parameters:

ArgsT

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:492

Parameters:

Name Type
description string

Returns: this