documentation/test/fixture/params.output.md
Tom MacWright 631c6925d4 feat(core): Switch to Promises everywhere. Adopt Node v4 ES6 (#648)
* feat(core): Switch to Promises everywhere. Adopt Node v4 ES6

Big changes:

* Uses template strings where appropriate
* Config and argument parsing is unified and there is no such thing
  as formatterOptions anymore. All user-passed options go through
  mergeConfig.
* The node API surface changed (again): `buildSync` is removed,
  building operations return Promises.
* Now using Flow for internal type annotations.

More changes:

* Remove buildSync command
* feat(inference): Partially implement object shorthand support
* Refs #649
* Use Flow annotations to  enforce types
* Keep flow but switch to comment syntax
* Clarify types
* More flow improvements
* Turn server into class
* LinkerStack becomes class too
* Fix comment description type
* Run flow on lint
* Many more flow fixes
* More intense flow refactoring
* Simplify inference steps
* Update inference tests, flow errors down to 1
* Continue refining types
* Fix more flow issues
* Use 'use strict' everywhere
* Make 'ast' property configurable
* Fix many tests
* Fix more tests
* Fix more tests
* Fix augments
* Test Markdown meta support
* Improve test coverage
* Switch back from for of to for for speed
2017-01-27 16:14:19 -05:00

3.7 KiB

Table of Contents

addThem

This function returns the number one.

Parameters

  • b number the second param
  • a
  • c
  • $3 any
    • $3.d
    • $3.e
    • $3.f

fishesAndFoxes

This method has partially inferred params

Parameters

  • $0 any
    • $0.fishes String number of kinds of fish
    • $0.foxes

withDefault

This method has a type in the description and a default in the code

Parameters

Foo

This is foo's documentation

method

The method

Parameters

Address6

Represents an IPv6 address

This tests our support of optional parameters

Parameters

  • address string An IPv6 address string
  • groups number? How many octets to parse (optional, default 8)
  • third number? A third argument
  • foo Array? 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

  • options Object? optional options
    • options.data (Object | string) A GeoJSON data object or URL to it. The latter is preferable in case of large GeoJSON files.
    • options.maxzoom number? Maximum zoom to preserve detail at. (optional, default 14)
    • options.buffer number? Tile buffer on each side.
    • options.tolerance number? Simplification tolerance (higher means simpler).

myfunc

This tests our support for parameters with explicit types but with default values specified in code.

Parameters

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

  • address An IPv6 address string