* Add test for memberof normalization: @memberof Foo#, @memberof Foo.prototype
* Add memberof normalization for @memberof Foo#, @memberof Foo.prototype
* Add test to infer membership of properties defined inside constructor
* Added inference of membership for properties defined inside constructor
* Fix Membership spelling, switch let for var to keep node compat broad
* Change memberof normalization to use RegExp
This infers the type from Flow type annotations for variable
declarations and class properties.
This also moves the logic for setting the `type` for typedefs
to the same type inferrer.
Also infer the type for statements like:
```js
const x = 42;
```
same as:
```js
const x: number = 42;
```
* Adds test support for flow difference
* New support for FunctionTypeAnnotation
* New support for ObjectTypeAnnotation
* New support for MixedTypeAnnotation
* Add the type property to typedef comments
When using Flow type aliases we didn't add the `type` property
to the JSDoc comment for the inferred `typedef`.
Fixes#516
* Rename files and update test expectations
When inferring the membership of a class that is an unnamed default
export we hit a null pointer exception.
```js
export default class {
/** */
member() {}
}
```
Inferring the name for the class above fails
Fixes#506
* Fix issue where exported declarations did not set the kind
For cases like:
```js
/** */ export class C {}
/** */ export function f {}
/** */ export const k = 42;
```
the kind did not get set properly.
Towards #484
* Infer kind for export default too
Towards #484
If a binding name is provided we should use that in the documentation.
For example:
```js
// test.js
/** */
export default function find() {}
```
Should use the name `find` and not `test`.
Fixes#504
* Add a flag to document all exported bindings
This adds a boolean flag called `document-exported` (defaults to false)
that effectively adds an empty comment to all exported bindings that do
not already have a JSDoc comment. It also does the same for the
members of exported classes and objects.
```js
export class C {
method() {}
}
```
Both `C` and `C#method` are now part of the generated documentation.
Related to #424
* Fix lint error
* Rebase and use options pragma in test file
* Create extractor type as a generalized comment/export getter
* Document exported extractor
This adds a command line flag called `--infer-private` which is a
string (defaults to `^_`) which is used as a regexp for inferring
if a name is private or not.
For example:
```js
/** C */
class C {
/** I'm public */
m() {}
/** I'm private */
_p() {}
}
```
Fixes#436
This makes sure that we get the name and params from exported
functions/classes/vars.
For export default the name is inferred from the file name.
Towards #424
* Source-sorting by default
Many changes
* Uses a new version of module-deps that exposes a sort key
we use to sort documentation.
* Adds inference for methods in objects
* Groups events into a separate comment property
* Add jsdoc property. Refs https://github.com/documentationjs/documentation/pull/388#issuecomment-215791547
* Namespaces and paths
* More powerful paths: paths now include name, kind, and scope
* comments now include a 'namespace' property with a formatted namespace
* Fix tests
* Re-ignore fonts
* Nix sourceKey from output
* Pin dependency versions
* Fix module-deps-sortable ref
* Update tests for right deps
* Set the `kind` property of the comment, not a property named by the kind.
* Set the `type` property as appropriate for these shorthands.
* Parse @callback as shorthand for @typedef {Function}