Skip to content

Commit

Permalink
docs: type names changed from wrapper to primitive (#31752)
Browse files Browse the repository at this point in the history
  • Loading branch information
miniak committed Nov 16, 2021
1 parent 246884c commit e6b1d95
Show file tree
Hide file tree
Showing 115 changed files with 1,685 additions and 1,685 deletions.
2 changes: 1 addition & 1 deletion docs/api/accelerator.md
Expand Up @@ -2,7 +2,7 @@

> Define keyboard shortcuts.
Accelerators are Strings that can contain multiple modifiers and a single key code,
Accelerators are strings that can contain multiple modifiers and a single key code,
combined by the `+` character, and are used to define keyboard shortcuts
throughout your application.

Expand Down
254 changes: 127 additions & 127 deletions docs/api/app.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions docs/api/auto-updater.md
Expand Up @@ -77,10 +77,10 @@ Emitted when there is no available update.
Returns:

* `event` Event
* `releaseNotes` String
* `releaseName` String
* `releaseNotes` string
* `releaseName` string
* `releaseDate` Date
* `updateURL` String
* `updateURL` string

Emitted when an update has been downloaded.

Expand All @@ -102,16 +102,16 @@ The `autoUpdater` object has the following methods:
### `autoUpdater.setFeedURL(options)`

* `options` Object
* `url` String
* `headers` Record<String, String> (optional) _macOS_ - HTTP request headers.
* `serverType` String (optional) _macOS_ - Can be `json` or `default`, see the [Squirrel.Mac][squirrel-mac]
* `url` string
* `headers` Record<string, string> (optional) _macOS_ - HTTP request headers.
* `serverType` string (optional) _macOS_ - Can be `json` or `default`, see the [Squirrel.Mac][squirrel-mac]
README for more information.

Sets the `url` and initialize the auto updater.

### `autoUpdater.getFeedURL()`

Returns `String` - The current update feed URL.
Returns `string` - The current update feed URL.

### `autoUpdater.checkForUpdates()`

Expand Down
10 changes: 5 additions & 5 deletions docs/api/browser-view.md
Expand Up @@ -45,13 +45,13 @@ Objects created with `new BrowserView` have the following instance methods:
#### `view.setAutoResize(options)` _Experimental_

* `options` Object
* `width` Boolean (optional) - If `true`, the view's width will grow and shrink together
* `width` boolean (optional) - If `true`, the view's width will grow and shrink together
with the window. `false` by default.
* `height` Boolean (optional) - If `true`, the view's height will grow and shrink
* `height` boolean (optional) - If `true`, the view's height will grow and shrink
together with the window. `false` by default.
* `horizontal` Boolean (optional) - If `true`, the view's x position and width will grow
* `horizontal` boolean (optional) - If `true`, the view's x position and width will grow
and shrink proportionally with the window. `false` by default.
* `vertical` Boolean (optional) - If `true`, the view's y position and height will grow
* `vertical` boolean (optional) - If `true`, the view's y position and height will grow
and shrink proportionally with the window. `false` by default.

#### `view.setBounds(bounds)` _Experimental_
Expand All @@ -68,5 +68,5 @@ The `bounds` of this BrowserView instance as `Object`.

#### `view.setBackgroundColor(color)` _Experimental_

* `color` String - Color in `#aarrggbb` or `#argb` form. The alpha channel is
* `color` string - Color in `#aarrggbb` or `#argb` form. The alpha channel is
optional.
6 changes: 3 additions & 3 deletions docs/api/browser-window-proxy.md
Expand Up @@ -22,7 +22,7 @@ Forcefully closes the child window without calling its unload event.

#### `win.eval(code)`

* `code` String
* `code` string

Evaluates the code in the child window.

Expand All @@ -37,7 +37,7 @@ Invokes the print dialog on the child window.
#### `win.postMessage(message, targetOrigin)`

* `message` any
* `targetOrigin` String
* `targetOrigin` string

Sends a message to the child window with the specified origin or `*` for no
origin preference.
Expand All @@ -51,4 +51,4 @@ The `BrowserWindowProxy` object has the following instance properties:

#### `win.closed`

A `Boolean` that is set to true after the child window gets closed.
A `boolean` that is set to true after the child window gets closed.
404 changes: 202 additions & 202 deletions docs/api/browser-window.md

Large diffs are not rendered by default.

72 changes: 36 additions & 36 deletions docs/api/client-request.md
Expand Up @@ -10,20 +10,20 @@ interface and is therefore an [EventEmitter][event-emitter].

### `new ClientRequest(options)`

* `options` (Object | String) - If `options` is a String, it is interpreted as
* `options` (Object | string) - If `options` is a string, it is interpreted as
the request URL. If it is an object, it is expected to fully specify an HTTP request via the
following properties:
* `method` String (optional) - The HTTP request method. Defaults to the GET
* `method` string (optional) - The HTTP request method. Defaults to the GET
method.
* `url` String (optional) - The request URL. Must be provided in the absolute
* `url` string (optional) - The request URL. Must be provided in the absolute
form with the protocol scheme specified as http or https.
* `session` Session (optional) - The [`Session`](session.md) instance with
which the request is associated.
* `partition` String (optional) - The name of the [`partition`](session.md)
* `partition` string (optional) - The name of the [`partition`](session.md)
with which the request is associated. Defaults to the empty string. The
`session` option supersedes `partition`. Thus if a `session` is explicitly
specified, `partition` is ignored.
* `credentials` String (optional) - Can be `include` or `omit`. Whether to
* `credentials` string (optional) - Can be `include` or `omit`. Whether to
send [credentials](https://fetch.spec.whatwg.org/#credentials) with this
request. If set to `include`, credentials from the session associated with
the request will be used. If set to `omit`, credentials will not be sent
Expand All @@ -33,22 +33,22 @@ following properties:
option of the same name. If this option is not specified, authentication
data from the session will be sent, and cookies will not be sent (unless
`useSessionCookies` is set).
* `useSessionCookies` Boolean (optional) - Whether to send cookies with this
* `useSessionCookies` boolean (optional) - Whether to send cookies with this
request from the provided session. If `credentials` is specified, this
option has no effect. Default is `false`.
* `protocol` String (optional) - Can be `http:` or `https:`. The protocol
* `protocol` string (optional) - Can be `http:` or `https:`. The protocol
scheme in the form 'scheme:'. Defaults to 'http:'.
* `host` String (optional) - The server host provided as a concatenation of
* `host` string (optional) - The server host provided as a concatenation of
the hostname and the port number 'hostname:port'.
* `hostname` String (optional) - The server host name.
* `hostname` string (optional) - The server host name.
* `port` Integer (optional) - The server's listening port number.
* `path` String (optional) - The path part of the request URL.
* `redirect` String (optional) - Can be `follow`, `error` or `manual`. The
* `path` string (optional) - The path part of the request URL.
* `redirect` string (optional) - Can be `follow`, `error` or `manual`. The
redirect mode for this request. When mode is `error`, any redirection will
be aborted. When mode is `manual` the redirection will be cancelled unless
[`request.followRedirect`](#requestfollowredirect) is invoked synchronously
during the [`redirect`](#event-redirect) event. Defaults to `follow`.
* `origin` String (optional) - The origin URL of the request.
* `origin` string (optional) - The origin URL of the request.

`options` properties such as `protocol`, `host`, `hostname`, `port` and `path`
strictly follow the Node.js model as described in the
Expand Down Expand Up @@ -79,21 +79,21 @@ Returns:
Returns:

* `authInfo` Object
* `isProxy` Boolean
* `scheme` String
* `host` String
* `isProxy` boolean
* `scheme` string
* `host` string
* `port` Integer
* `realm` String
* `realm` string
* `callback` Function
* `username` String (optional)
* `password` String (optional)
* `username` string (optional)
* `password` string (optional)

Emitted when an authenticating proxy is asking for user credentials.

The `callback` function is expected to be called back with user credentials:

* `username` String
* `password` String
* `username` string
* `password` string

```JavaScript
request.on('login', (authInfo, callback) => {
Expand Down Expand Up @@ -147,9 +147,9 @@ event indicates that no more events will be emitted on either the `request` or
Returns:

* `statusCode` Integer
* `method` String
* `redirectUrl` String
* `responseHeaders` Record<String, String[]>
* `method` string
* `redirectUrl` string
* `responseHeaders` Record<string, string[]>

Emitted when the server returns a redirect response (e.g. 301 Moved
Permanently). Calling [`request.followRedirect`](#requestfollowredirect) will
Expand All @@ -161,7 +161,7 @@ continue with the redirection. If this event is handled,

#### `request.chunkedEncoding`

A `Boolean` specifying whether the request will use HTTP chunked transfer encoding
A `boolean` specifying whether the request will use HTTP chunked transfer encoding
or not. Defaults to false. The property is readable and writable, however it can
be set only before the first write operation as the HTTP headers are not yet put
on the wire. Trying to set the `chunkedEncoding` property after the first write
Expand All @@ -175,12 +175,12 @@ internally buffered inside Electron process memory.

#### `request.setHeader(name, value)`

* `name` String - An extra HTTP header name.
* `value` String - An extra HTTP header value.
* `name` string - An extra HTTP header name.
* `value` string - An extra HTTP header value.

Adds an extra HTTP header. The header name will be issued as-is without
lowercasing. It can be called only before first write. Calling this method after
the first write will throw an error. If the passed value is not a `String`, its
the first write will throw an error. If the passed value is not a `string`, its
`toString()` method will be called to obtain the final value.

Certain headers are restricted from being set by apps. These headers are
Expand All @@ -199,22 +199,22 @@ Additionally, setting the `Connection` header to the value `upgrade` is also dis

#### `request.getHeader(name)`

* `name` String - Specify an extra header name.
* `name` string - Specify an extra header name.

Returns `String` - The value of a previously set extra header name.
Returns `string` - The value of a previously set extra header name.

#### `request.removeHeader(name)`

* `name` String - Specify an extra header name.
* `name` string - Specify an extra header name.

Removes a previously set extra header name. This method can be called only
before first write. Trying to call it after the first write will throw an error.

#### `request.write(chunk[, encoding][, callback])`

* `chunk` (String | Buffer) - A chunk of the request body's data. If it is a
* `chunk` (string | Buffer) - A chunk of the request body's data. If it is a
string, it is converted into a Buffer using the specified encoding.
* `encoding` String (optional) - Used to convert string chunks into Buffer
* `encoding` string (optional) - Used to convert string chunks into Buffer
objects. Defaults to 'utf-8'.
* `callback` Function (optional) - Called after the write operation ends.

Expand All @@ -230,8 +230,8 @@ it is not allowed to add or remove a custom header.

#### `request.end([chunk][, encoding][, callback])`

* `chunk` (String | Buffer) (optional)
* `encoding` String (optional)
* `chunk` (string | Buffer) (optional)
* `encoding` string (optional)
* `callback` Function (optional)

Sends the last chunk of the request data. Subsequent write or end operations
Expand All @@ -253,9 +253,9 @@ event.

Returns `Object`:

* `active` Boolean - Whether the request is currently active. If this is false
* `active` boolean - Whether the request is currently active. If this is false
no other properties will be set
* `started` Boolean - Whether the upload has started. If this is false both
* `started` boolean - Whether the upload has started. If this is false both
`current` and `total` will be set to 0.
* `current` Integer - The number of bytes that have been uploaded so far
* `total` Integer - The number of bytes that will be uploaded this request
Expand Down

0 comments on commit e6b1d95

Please sign in to comment.