0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/tools/doc
K.C.Ashish Kumar 28d8614add
http: document that ClientRequest inherits from OutgoingMessage
http: fix extends for ClientRequest from Stream to http.OutgoingMessage

http: added page entry for http.OutgoingMessage

http: updated order of links

http: included entry for http.OutgoingMessage

http: removed unnecessary entry from md file

PR-URL: https://github.com/nodejs/node/pull/42642
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2022-04-07 17:48:43 +01:00
..
addon-verify.mjs tools: update doc generator dependencies 2021-09-18 16:32:44 +02:00
allhtml.mjs tools: use Set instead of { [key]: true } object 2022-01-24 11:46:47 +00:00
alljson.mjs tools: use Set instead of { [key]: true } object 2022-01-28 16:41:16 +00:00
apilinks.mjs tools: update doctool dependencies, migrate to ESM 2021-06-14 08:22:00 -07:00
common.mjs tools: update doctool dependencies, migrate to ESM 2021-06-14 08:22:00 -07:00
deprecationCodes.mjs tools: lint deprecation codes 2022-02-19 18:14:09 +01:00
deps.mjs tools: update doc generator dependencies 2021-09-18 16:32:44 +02:00
generate.mjs tools: update doc generator dependencies 2021-09-18 16:32:44 +02:00
html.mjs doc,tools: improve navigability of API docs 2022-02-24 12:00:42 +01:00
json.mjs tools,benchmark,lib,test: enable no-case-declarations lint rule 2022-01-05 07:42:19 -08:00
LICENSE
links-mapper.json doc: clarify module system selection 2022-01-17 11:36:19 +01:00
markdown.mjs tools: update doctool dependencies, migrate to ESM 2021-06-14 08:22:00 -07:00
package-lock.json tools: update doc to highlight.js@11.5.0 unified@10.1.2 2022-03-14 18:47:33 +00:00
package.json tools: update doc to highlight.js@11.5.0 unified@10.1.2 2022-03-14 18:47:33 +00:00
README.md tools: update doctool dependencies, migrate to ESM 2021-06-14 08:22:00 -07:00
stability.mjs tools: update doc generator dependencies 2021-09-18 16:32:44 +02:00
type-parser.mjs http: document that ClientRequest inherits from OutgoingMessage 2022-04-07 17:48:43 +01:00
versions.mjs tools: update doctool dependencies, migrate to ESM 2021-06-14 08:22:00 -07:00

Here's how the node docs work.

1:1 relationship from lib/<module>.js to doc/api/<module>.md.

Each type of heading has a description block.

# module

<!--introduced_in=v0.10.0-->

> Stability: 2 - Stable

A description and examples.

## module.property
<!-- YAML
added: v0.10.0
-->

* {type}

A description of the property.

## module.someFunction(x, y, [z=100])
<!-- YAML
added: v0.10.0
-->

* `x` {string} The description of the string.
* `y` {boolean} Should I stay or should I go?
* `z` {number} How many zebras to bring. **Default:** `100`.

A description of the function.

## module.someNewFunction(x)
<!-- YAML
added: REPLACEME
-->

* `x` {string} The description of the string.

This feature is not in a release yet.

## Event: 'blerg'
<!-- YAML
added: v0.10.0
-->

* `anArg` {type} A description of the listener argument.

Modules don't usually raise events on themselves. `cluster` is the
only exception.

## Class: SomeClass
<!-- YAML
added: v0.10.0
-->

A description of the class.

### SomeClass.classMethod(anArg)
<!-- YAML
added: v0.10.0
-->

* `anArg` {Object} Just an argument.
  * `field` {string} `anArg` can have this field.
  * `field2` {boolean} Another field. **Default:** `false`.
* Returns: {boolean} `true` if it worked.

A description of the method for humans.

### SomeClass.nextSibling()
<!-- YAML
added: v0.10.0
-->

* Returns: {SomeClass | null} The next `SomeClass` in line.

`SomeClass` must be registered in `tools/doc/type-parser.mjs`
to be properly parsed in `{type}` fields.

### SomeClass.someProperty
<!-- YAML
added: v0.10.0
-->

* {string}

The indication of what `someProperty` is.

### Event: 'grelb'
<!-- YAML
added: v0.10.0
-->

* `isBlerg` {boolean}

This event is emitted on instances of `SomeClass`, not on the module itself.
  • Classes have (description, Properties, Methods, Events).
  • Events have (list of listener arguments, description).
  • Functions have (list of arguments, returned value if defined, description).
  • Methods have (list of arguments, returned value if defined, description).
  • Modules have (description, Properties, Functions, Classes, Examples).
  • Properties have (type, description).