Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created June 17, 2016 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/fe6b34bb53f683d89a5789f6566bcfa8 to your computer and use it in GitHub Desktop.
Save tmcw/fe6b34bb53f683d89a5789f6566bcfa8 to your computer and use it in GitHub Desktop.

addThem

This function returns the number one.

Parameters

  • Parameter Description

  • a

  • b

    number

    the second param

  • c

  • $3

    Object

fishesAndFoxes

This method has partially inferred params

Parameters

  • Parameter Description

  • $0

    Object

withDefault

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

Parameters

  • Parameter Description

  • x

    [number](default 2)

Foo

This is foo's documentation

method

The method

Parameters

  • Parameter Description

  • x

    number

    Param to method

Address6

Represents an IPv6 address

This tests our support of optional parameters

Parameters

  • Parameter Description

  • 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

  • Parameter Description

  • options

    [Object]

    optional options

myfunc

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

Parameters

  • Parameter Description

  • x

    [number](default 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

  • Parameter Description

  • address

    An IPv6 address string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment