-
Notifications
You must be signed in to change notification settings - Fork 0
Arg
Anton edited this page Aug 9, 2019
·
24 revisions
An argument can be specified in a number of ways:
- In the body of the
constructor
orinterface
elements in XML:<types> <constructor name="Example"> <arg boolean name="wiki">Whether compiling a Wiki page.</arg> </constructor> </types>
- In the body of a function of a type:
<types> <type name="Example"> <fn name="getData"> <arg string name="source">The source from which to extract.</arg> Requests the data from the server. </fn> <function name="transform"> <arg type="?string" name="">The input.</arg> Transforms given string. </function> <static name="upload"> <arg opt type="string" name="dest">Where to upload.</arg> Uploads data to the server. </static> </type> </types>
- In the body of a method:
<types> <method async desc="workHard" desc="Spawns a worker process."> <arg number name="hours">How long to work for.</arg> </method> </types>
Arg
: An argument of a constructor or method.
Name | Type & Description | Initial |
---|---|---|
name | ?string | null |
The name of the type. | ||
type | string | `` |
The type of the argument. | ||
optional | boolean | false |
Whether the argument is optional. | ||
description | string | `` |
Description of the argument. |
© Art Deco 2020 | Tech Nation Visa Sucks |
---|