TypeScript SDK Reference
api/client.gen.FunctionArg
An argument accepted by a function.
This is a specification for an argument at function definition time, not an argument passed at function call time.
Hierarchy
-
BaseClient
↳
FunctionArg
Constructors
constructor
new FunctionArg(parent?
, _id?
, _defaultPath?
, _defaultValue?
, _description?
, _name?
): FunctionArg
Constructor is used for internal usage only, do not create object from it.
Parameters
Name | Type |
---|---|
parent? | Object |
parent.ctx | Context |
parent.queryTree? | QueryTree [] |
_id? | FunctionArgID |
_defaultPath? | string |
_defaultValue? | JSON |
_description? | string |
_name? | string |
Returns
Overrides
BaseClient.constructor
Properties
_defaultPath
Private
Optional
Readonly
_defaultPath: string
= undefined
_defaultValue
Private
Optional
Readonly
_defaultValue: JSON
= undefined
_description
Private
Optional
Readonly
_description: string
= undefined
_id
Private
Optional
Readonly
_id: FunctionArgID
= undefined
_name
Private
Optional
Readonly
_name: string
= undefined
Methods
defaultPath
defaultPath(): Promise
<string
>
Only applies to arguments of type File or Directory. If the argument is not set, load it from the given path in the context directory
Returns
Promise
<string
>
defaultValue
defaultValue(): Promise
<JSON
>
A default value to use for this argument when not explicitly set by the caller, if any.
Returns
Promise
<JSON
>
description
description(): Promise
<string
>
A doc string for the argument, if any.
Returns
Promise
<string
>
id
id(): Promise
<FunctionArgID
>
A unique identifier for this FunctionArg.
Returns
Promise
<FunctionArgID
>
ignore
ignore(): Promise
<string
[]>
Only applies to arguments of type Directory. The ignore patterns are applied to the input directory, and matching entries are filtered out, in a cache-efficient manner.
Returns
Promise
<string
[]>
name
name(): Promise
<string
>
The name of the argument in lowerCamelCase format.
Returns
Promise
<string
>
typeDef
typeDef(): TypeDef
The type of the argument.