Skip to content

Commit e6b1d95

Browse files
authored
docs: type names changed from wrapper to primitive (electron#31752)
1 parent 246884c commit e6b1d95

File tree

115 files changed

+1685
-1685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+1685
-1685
lines changed

docs/api/accelerator.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

docs/api/app.md

+127-127
Large diffs are not rendered by default.

docs/api/auto-updater.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ Emitted when there is no available update.
7777
Returns:
7878

7979
* `event` Event
80-
* `releaseNotes` String
81-
* `releaseName` String
80+
* `releaseNotes` string
81+
* `releaseName` string
8282
* `releaseDate` Date
83-
* `updateURL` String
83+
* `updateURL` string
8484

8585
Emitted when an update has been downloaded.
8686

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

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

110110
Sets the `url` and initialize the auto updater.
111111

112112
### `autoUpdater.getFeedURL()`
113113

114-
Returns `String` - The current update feed URL.
114+
Returns `string` - The current update feed URL.
115115

116116
### `autoUpdater.checkForUpdates()`
117117

docs/api/browser-view.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ Objects created with `new BrowserView` have the following instance methods:
4545
#### `view.setAutoResize(options)` _Experimental_
4646

4747
* `options` Object
48-
* `width` Boolean (optional) - If `true`, the view's width will grow and shrink together
48+
* `width` boolean (optional) - If `true`, the view's width will grow and shrink together
4949
with the window. `false` by default.
50-
* `height` Boolean (optional) - If `true`, the view's height will grow and shrink
50+
* `height` boolean (optional) - If `true`, the view's height will grow and shrink
5151
together with the window. `false` by default.
52-
* `horizontal` Boolean (optional) - If `true`, the view's x position and width will grow
52+
* `horizontal` boolean (optional) - If `true`, the view's x position and width will grow
5353
and shrink proportionally with the window. `false` by default.
54-
* `vertical` Boolean (optional) - If `true`, the view's y position and height will grow
54+
* `vertical` boolean (optional) - If `true`, the view's y position and height will grow
5555
and shrink proportionally with the window. `false` by default.
5656

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

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

71-
* `color` String - Color in `#aarrggbb` or `#argb` form. The alpha channel is
71+
* `color` string - Color in `#aarrggbb` or `#argb` form. The alpha channel is
7272
optional.

docs/api/browser-window-proxy.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Forcefully closes the child window without calling its unload event.
2222

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

25-
* `code` String
25+
* `code` string
2626

2727
Evaluates the code in the child window.
2828

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

3939
* `message` any
40-
* `targetOrigin` String
40+
* `targetOrigin` string
4141

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

5252
#### `win.closed`
5353

54-
A `Boolean` that is set to true after the child window gets closed.
54+
A `boolean` that is set to true after the child window gets closed.

docs/api/browser-window.md

+202-202
Large diffs are not rendered by default.

docs/api/client-request.md

+36-36
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ interface and is therefore an [EventEmitter][event-emitter].
1010

1111
### `new ClientRequest(options)`
1212

13-
* `options` (Object | String) - If `options` is a String, it is interpreted as
13+
* `options` (Object | string) - If `options` is a string, it is interpreted as
1414
the request URL. If it is an object, it is expected to fully specify an HTTP request via the
1515
following properties:
16-
* `method` String (optional) - The HTTP request method. Defaults to the GET
16+
* `method` string (optional) - The HTTP request method. Defaults to the GET
1717
method.
18-
* `url` String (optional) - The request URL. Must be provided in the absolute
18+
* `url` string (optional) - The request URL. Must be provided in the absolute
1919
form with the protocol scheme specified as http or https.
2020
* `session` Session (optional) - The [`Session`](session.md) instance with
2121
which the request is associated.
22-
* `partition` String (optional) - The name of the [`partition`](session.md)
22+
* `partition` string (optional) - The name of the [`partition`](session.md)
2323
with which the request is associated. Defaults to the empty string. The
2424
`session` option supersedes `partition`. Thus if a `session` is explicitly
2525
specified, `partition` is ignored.
26-
* `credentials` String (optional) - Can be `include` or `omit`. Whether to
26+
* `credentials` string (optional) - Can be `include` or `omit`. Whether to
2727
send [credentials](https://fetch.spec.whatwg.org/#credentials) with this
2828
request. If set to `include`, credentials from the session associated with
2929
the request will be used. If set to `omit`, credentials will not be sent
@@ -33,22 +33,22 @@ following properties:
3333
option of the same name. If this option is not specified, authentication
3434
data from the session will be sent, and cookies will not be sent (unless
3535
`useSessionCookies` is set).
36-
* `useSessionCookies` Boolean (optional) - Whether to send cookies with this
36+
* `useSessionCookies` boolean (optional) - Whether to send cookies with this
3737
request from the provided session. If `credentials` is specified, this
3838
option has no effect. Default is `false`.
39-
* `protocol` String (optional) - Can be `http:` or `https:`. The protocol
39+
* `protocol` string (optional) - Can be `http:` or `https:`. The protocol
4040
scheme in the form 'scheme:'. Defaults to 'http:'.
41-
* `host` String (optional) - The server host provided as a concatenation of
41+
* `host` string (optional) - The server host provided as a concatenation of
4242
the hostname and the port number 'hostname:port'.
43-
* `hostname` String (optional) - The server host name.
43+
* `hostname` string (optional) - The server host name.
4444
* `port` Integer (optional) - The server's listening port number.
45-
* `path` String (optional) - The path part of the request URL.
46-
* `redirect` String (optional) - Can be `follow`, `error` or `manual`. The
45+
* `path` string (optional) - The path part of the request URL.
46+
* `redirect` string (optional) - Can be `follow`, `error` or `manual`. The
4747
redirect mode for this request. When mode is `error`, any redirection will
4848
be aborted. When mode is `manual` the redirection will be cancelled unless
4949
[`request.followRedirect`](#requestfollowredirect) is invoked synchronously
5050
during the [`redirect`](#event-redirect) event. Defaults to `follow`.
51-
* `origin` String (optional) - The origin URL of the request.
51+
* `origin` string (optional) - The origin URL of the request.
5252

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

8181
* `authInfo` Object
82-
* `isProxy` Boolean
83-
* `scheme` String
84-
* `host` String
82+
* `isProxy` boolean
83+
* `scheme` string
84+
* `host` string
8585
* `port` Integer
86-
* `realm` String
86+
* `realm` string
8787
* `callback` Function
88-
* `username` String (optional)
89-
* `password` String (optional)
88+
* `username` string (optional)
89+
* `password` string (optional)
9090

9191
Emitted when an authenticating proxy is asking for user credentials.
9292

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

95-
* `username` String
96-
* `password` String
95+
* `username` string
96+
* `password` string
9797

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

149149
* `statusCode` Integer
150-
* `method` String
151-
* `redirectUrl` String
152-
* `responseHeaders` Record<String, String[]>
150+
* `method` string
151+
* `redirectUrl` string
152+
* `responseHeaders` Record<string, string[]>
153153

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

162162
#### `request.chunkedEncoding`
163163

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

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

178-
* `name` String - An extra HTTP header name.
179-
* `value` String - An extra HTTP header value.
178+
* `name` string - An extra HTTP header name.
179+
* `value` string - An extra HTTP header value.
180180

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

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

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

202-
* `name` String - Specify an extra header name.
202+
* `name` string - Specify an extra header name.
203203

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

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

208-
* `name` String - Specify an extra header name.
208+
* `name` string - Specify an extra header name.
209209

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

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

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

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

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

233-
* `chunk` (String | Buffer) (optional)
234-
* `encoding` String (optional)
233+
* `chunk` (string | Buffer) (optional)
234+
* `encoding` string (optional)
235235
* `callback` Function (optional)
236236

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

254254
Returns `Object`:
255255

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

0 commit comments

Comments
 (0)