* build: Use Flow syntax without comments. We're switching to Flow annotations - not Flow comments. This gives documentation.js the ability to self-document without JSDoc types and improves our compatibility with tools like prettier. Fixes #729. Fixes #709
3.6 KiB
destructure
This function destructures with defaults. It should not have any parameter descriptions.
Parameters
$0Object (optional, default{})$0.phoneNumbers(optional, default[])$0.emailAddresses(optional, default[])$0.params...any
destructure
Similar, but with an array
Parameters
$0Array$0.0$0.1$0.2
Examples
destructure([1, 2, 3])
multiply
This function returns the number one.
Parameters
Returns Number numberone
Sink
This is a sink
Parameters
staticProp
This is a property of the sink.
empty
Is it empty
aGetter
This is a getter method: it should be documented as a property.
hello
This method says hello
makeABasket
This method returns a basket. The type should not be linked.
Returns Basket a basket
makeASink
This method returns a sink. The type should be linked. It takes a number which should also be linked.
Returns Sink a sink
functionWithRest
This function takes rest params
Parameters
someParams...any
functionWithRestAndType
So does this one, with types
Parameters
someParams...number
foo
This is an async method
es6.input
This function returns the number one.
Returns Number numberone
veryImportantTransform
This tests our support of optional parameters in ES6
Parameters
foo(optional, default'bar')
iAmProtected
A protected function
iAmPublic
A public function
execute
This is re-exported
isArrayEqualWith
Regression check for #498
Parameters
array1Array<T>array2Array<T>compareFunctionfunction (a: T, b: T): boolean (optional, default(a:T,b:T):boolean=>a===b)
Returns boolean
paramWithMemberType
Regression check for #749
Parameters
aatype.property
Returns boolean