This extends findTarget and the membership interference steps, treating ObjectProperty within var-assigned objects the same as we did for ObjectMethods. It also adds tests that specifically test findTarget directly. Fixes https://github.com/documentationjs/documentation/issues/649 and fixes https://github.com/documentationjs/documentation/issues/678
3.9 KiB
Table of Contents
addThem
This function returns the number one.
Parameters
bnumber the second paramac$3any$3.d$3.e$3.f
fishesAndFoxes
This method has partially inferred params
Parameters
$0any$0.fishesString number of kinds of fish$0.foxes
withDefault
This method has a type in the description and a default in the code
Parameters
xnumber?= 2
Foo
This is foo's documentation
method
The method
Parameters
xnumber Param to method
TraditionalObject
Traditional object
traditionalMethod
This method should acquire the param x
Parameters
x
Address6
Represents an IPv6 address
This tests our support of optional parameters
Parameters
addressstring An IPv6 address stringgroupsnumber? How many octets to parse (optional, default8)thirdnumber? A third argumentfooArray? to properly be parsed (optional, default[1])
Examples
var address = new Address6('2001::/32');
GeoJSONSource
Create a GeoJSON data source instance given an options object
This tests our support of nested parameters
Parameters
optionsObject? optional optionsoptions.data(Object | string) A GeoJSON data object or URL to it. The latter is preferable in case of large GeoJSON files.options.maxzoomnumber? Maximum zoom to preserve detail at. (optional, default14)options.buffernumber? Tile buffer on each side.options.tolerancenumber? Simplification tolerance (higher means simpler).
myfunc
This tests our support for parameters with explicit types but with default values specified in code.
Parameters
xnumber?= 123 an argument
Returns number some
foo
This tests our support of JSDoc param tags without type information, or any type information we could infer from annotations.
Parameters
addressAn IPv6 address string