зеркало из https://github.com/electron/electron.git
docs: type the promises in our docs (#14715)
This commit is contained in:
Родитель
6b50dc8745
Коммит
5541cab1ba
|
@ -460,7 +460,7 @@ Returns `Boolean` - `true` if Electron has finished initializing, `false` otherw
|
|||
|
||||
### `app.whenReady()`
|
||||
|
||||
Returns `Promise` - fulfilled when Electron is initialized.
|
||||
Returns `Promise<void>` - fulfilled when Electron is initialized.
|
||||
May be used as a convenient alternative to checking `app.isReady()`
|
||||
and subscribing to the `ready` event if the app is not ready yet.
|
||||
|
||||
|
|
|
@ -838,7 +838,7 @@ Injects CSS into the current web page.
|
|||
* `callback` Function (optional) - Called after script has been executed.
|
||||
* `result` Any
|
||||
|
||||
Returns `Promise` - A promise that resolves with the result of the executed code
|
||||
Returns `Promise<any>` - A promise that resolves with the result of the executed code
|
||||
or is rejected if the result of the code is a rejected promise.
|
||||
|
||||
Evaluates `code` in page.
|
||||
|
@ -1501,7 +1501,7 @@ be compared to the `frameProcessId` passed by frame specific navigation events
|
|||
|
||||
* `filePath` String - Path to the output file.
|
||||
|
||||
Returns `Promise` - Indicates whether the snapshot has been created successfully.
|
||||
Returns `Promise<void>` - Indicates whether the snapshot has been created successfully.
|
||||
|
||||
Takes a V8 heap snapshot and saves it to `filePath`.
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ Inserts `text` to the focused element.
|
|||
* `callback` Function (optional) - Called after script has been executed.
|
||||
* `result` Any
|
||||
|
||||
Returns `Promise` - A promise that resolves with the result of the executed code
|
||||
Returns `Promise<any>` - A promise that resolves with the result of the executed code
|
||||
or is rejected if the result of the code is a rejected promise.
|
||||
|
||||
Evaluates `code` in page.
|
||||
|
|
|
@ -1146,25 +1146,25 @@
|
|||
}
|
||||
},
|
||||
"buffer-alloc": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.1.0.tgz",
|
||||
"integrity": "sha1-BVFNM78WVtNUDGhPZbEgLpDsowM=",
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
|
||||
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-alloc-unsafe": "^0.1.0",
|
||||
"buffer-fill": "^0.1.0"
|
||||
"buffer-alloc-unsafe": "^1.1.0",
|
||||
"buffer-fill": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"buffer-alloc-unsafe": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-0.1.1.tgz",
|
||||
"integrity": "sha1-/+H2dVHdBVc33iUzN7/oU9+rGmo=",
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
|
||||
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==",
|
||||
"dev": true
|
||||
},
|
||||
"buffer-fill": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-0.1.1.tgz",
|
||||
"integrity": "sha512-YgBMBzdRLEfgxJIGu2wrvI2E03tMCFU1p7d1KhB4BOoMN0VxmTFjSyN5JtKt9z8Z9JajMHruI6SE25W96wNv7Q==",
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
|
||||
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=",
|
||||
"dev": true
|
||||
},
|
||||
"buffer-from": {
|
||||
|
@ -1282,9 +1282,9 @@
|
|||
}
|
||||
},
|
||||
"capture-stack-trace": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz",
|
||||
"integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=",
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz",
|
||||
"integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==",
|
||||
"dev": true
|
||||
},
|
||||
"caseless": {
|
||||
|
@ -1463,7 +1463,7 @@
|
|||
"circular-json": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz",
|
||||
"integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==",
|
||||
"integrity": "sha1-gVyZ6oT2gJUp0vRXkb34JxE1LWY=",
|
||||
"dev": true
|
||||
},
|
||||
"clang-format": {
|
||||
|
@ -1800,7 +1800,7 @@
|
|||
"dot-prop": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
|
||||
"integrity": "sha1-HxngwuGqDjJ5fEl5nyg3rGr2nFc=",
|
||||
"integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-obj": "^1.0.0"
|
||||
|
@ -2139,9 +2139,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"cssom": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz",
|
||||
"integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=",
|
||||
"version": "0.3.4",
|
||||
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.4.tgz",
|
||||
"integrity": "sha512-+7prCSORpXNeR4/fUP3rL+TzqtiFfhMvTd7uEqMdgPvLPt4+uzFUeufx5RHjGTACCargg/DiEt/moMQmvnfkog==",
|
||||
"dev": true
|
||||
},
|
||||
"cssstyle": {
|
||||
|
@ -2828,9 +2828,9 @@
|
|||
}
|
||||
},
|
||||
"electron-docs-linter": {
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/electron-docs-linter/-/electron-docs-linter-2.3.4.tgz",
|
||||
"integrity": "sha512-omAdcSUPTzeIUzyMwA3W54mcw09AEy2THUQCDgDV0dAQA2urV5VpEaB3ts66aVQmw8j6AxK/CBAfBcYy5ZW0bw==",
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/electron-docs-linter/-/electron-docs-linter-2.4.0.tgz",
|
||||
"integrity": "sha512-WvxXsk6kl4x0nrQOqMYAXsMMbSouSwa8VeNd+Bps9HM7QXuNNNVPFB1UEdykq06HWS60lUt4VUiAjQjAJJpcSg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cheerio": "^0.22.0",
|
||||
|
@ -2860,21 +2860,29 @@
|
|||
}
|
||||
},
|
||||
"electron-typescript-definitions": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/electron-typescript-definitions/-/electron-typescript-definitions-2.0.1.tgz",
|
||||
"integrity": "sha512-H1DD4g+Usrddyb5VK94Ofxn2gQUSUfj8gHRYcZKbkIe5CTWQ+Gl/kc/qRQ+QL+oH/8B8MHM6UJoxNfbcCrzIgQ==",
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/electron-typescript-definitions/-/electron-typescript-definitions-2.1.1.tgz",
|
||||
"integrity": "sha512-vrEhi3hhPzUEDLwPGOqScYBLefNKH5r9odp3dy/lqE0nhAmUHBkrwnU5jVga3A2pJW22wzCCB1kwkEoPV7Rq4w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "^7.0.18",
|
||||
"colors": "^1.1.2",
|
||||
"debug": "^2.6.3",
|
||||
"electron-docs": "^2.0.0",
|
||||
"electron-docs-linter": "^2.3.4",
|
||||
"lodash": "^4.16.1",
|
||||
"electron-docs-linter": "^2.4.0",
|
||||
"lodash": "^4.17.11",
|
||||
"mkdirp": "^0.5.1",
|
||||
"rimraf": "^2.5.4",
|
||||
"tslint": "^4.5.1",
|
||||
"typescript": "^2.2.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": {
|
||||
"version": "4.17.11",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
|
||||
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"elliptic": {
|
||||
|
@ -4052,7 +4060,7 @@
|
|||
"find-root": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",
|
||||
"integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==",
|
||||
"integrity": "sha1-q8/Iunb3CMQql7PWhbfpRQv7nOQ=",
|
||||
"dev": true
|
||||
},
|
||||
"find-up": {
|
||||
|
@ -5066,7 +5074,7 @@
|
|||
"gunzip-maybe": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/gunzip-maybe/-/gunzip-maybe-1.4.1.tgz",
|
||||
"integrity": "sha1-Occu2J0bSbpwjhh3ZQBIiQKlICc=",
|
||||
"integrity": "sha512-qtutIKMthNJJgeHQS7kZ9FqDq59/Wn0G2HYCRNjpup7yKfVI6/eqwpmroyZGFoCYaG+sW6psNVb4zoLADHpp2g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"browserify-zlib": "^0.1.4",
|
||||
|
@ -8184,9 +8192,9 @@
|
|||
}
|
||||
},
|
||||
"pumpify": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.0.tgz",
|
||||
"integrity": "sha512-UWi0klDoq8xtVzlMRgENV9F7iCTZExaJQSQL187UXsxpk9NnrKGqTqqUNYAKGOzucSOxs2+jUnRNI+rLviPhJg==",
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz",
|
||||
"integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"duplexify": "^3.6.0",
|
||||
|
@ -9406,7 +9414,7 @@
|
|||
"sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
"integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=",
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
|
@ -9886,7 +9894,7 @@
|
|||
"split": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz",
|
||||
"integrity": "sha1-YFvZvjA6pZ+zX5Ip++oN3snqB9k=",
|
||||
"integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"through": "2"
|
||||
|
@ -9904,7 +9912,7 @@
|
|||
"split2": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz",
|
||||
"integrity": "sha1-GGsldbz4PoW30YRldWI47k7kJJM=",
|
||||
"integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"through2": "^2.0.2"
|
||||
|
@ -10872,9 +10880,9 @@
|
|||
}
|
||||
},
|
||||
"tar-fs": {
|
||||
"version": "1.16.2",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.2.tgz",
|
||||
"integrity": "sha512-LdknWjPEiZC1nOBwhv0JBzfJBGPJar08dZg2rwZe0ZTLQoRGEzgrl7vF3qUEkCHpI/wN9e7RyCuDhMsJUCLPPQ==",
|
||||
"version": "1.16.3",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz",
|
||||
"integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chownr": "^1.0.1",
|
||||
|
@ -10896,16 +10904,16 @@
|
|||
}
|
||||
},
|
||||
"tar-stream": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.0.tgz",
|
||||
"integrity": "sha512-lh2iAPG/BHNmN6WB9Ybdynk9rEJ5GD/dy4zscHmVlwa1dq2tpE+BH78i5vjYwYVWEaOXGBjzxr89aVACF17Cpw==",
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz",
|
||||
"integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bl": "^1.0.0",
|
||||
"buffer-alloc": "^1.1.0",
|
||||
"end-of-stream": "^1.0.0",
|
||||
"fs-constants": "^1.0.0",
|
||||
"readable-stream": "^2.0.0",
|
||||
"readable-stream": "^2.3.0",
|
||||
"to-buffer": "^1.1.0",
|
||||
"xtend": "^4.0.0"
|
||||
},
|
||||
|
@ -10988,9 +10996,9 @@
|
|||
}
|
||||
},
|
||||
"text-extensions": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.7.0.tgz",
|
||||
"integrity": "sha1-+qq6JiXtdG1WiiPk0KrNm/CKizk=",
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.8.0.tgz",
|
||||
"integrity": "sha512-mVzjRxuWnDKs/qH1rbOJEVHLlSX9kty9lpi7lMvLgU9S74mQ8/Ozg9UPcKxShh0qG2NZ+NyPOPpcZU4C1Eld9A==",
|
||||
"dev": true
|
||||
},
|
||||
"text-table": {
|
||||
|
@ -11163,12 +11171,13 @@
|
|||
}
|
||||
},
|
||||
"tough-cookie": {
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
|
||||
"integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
|
||||
"integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"psl": "^1.1.24",
|
||||
"punycode": "^1.4.1"
|
||||
}
|
||||
},
|
||||
|
@ -11254,7 +11263,7 @@
|
|||
},
|
||||
"minimist": {
|
||||
"version": "0.0.10",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
|
||||
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
|
||||
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -12090,7 +12099,7 @@
|
|||
"write-file-atomic": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz",
|
||||
"integrity": "sha1-H/YVdcLipOjlENb6TiQ8zhg5mas=",
|
||||
"integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.11",
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
"dotenv-safe": "^4.0.4",
|
||||
"dugite": "^1.45.0",
|
||||
"electabul": "~0.0.4",
|
||||
"electron-docs-linter": "^2.3.4",
|
||||
"electron-typescript-definitions": "^2.0.1",
|
||||
"electron-docs-linter": "^2.4.0",
|
||||
"electron-typescript-definitions": "^2.1.1",
|
||||
"eslint": "^5.6.0",
|
||||
"eslint-config-standard": "^12.0.0",
|
||||
"eslint-plugin-mocha": "^5.2.0",
|
||||
|
|
Загрузка…
Ссылка в новой задаче