chore: upgrade ts generator for better type safety (#20975)

* chore: upgrade ts generator for better type safety

* spec: fix tests
This commit is contained in:
Samuel Attard 2019-11-05 13:34:04 -08:00 коммит произвёл GitHub
Родитель 6e5ac301ce
Коммит fcee7212ce
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 10 добавлений и 12 удалений

Просмотреть файл

@ -389,9 +389,7 @@ which sends a `Buffer` as a response.
* `url` String
* `method` String (optional)
* `session` Session | null (optional)
* `uploadData` Object (optional)
* `contentType` String - MIME type of the content.
* `data` String - Content to be sent.
* `uploadData` [ProtocolResponseUploadData](structures/protocol-response-upload-data.md) (optional)
* `completion` Function (optional)
* `error` Error

Просмотреть файл

@ -1,4 +1,4 @@
# ProtocolResponseUploadData Object
* `contentType` String - MIME type of the content.
* `data` String - Content to be sent.
* `data` String | Buffer - Content to be sent.

Просмотреть файл

@ -5,7 +5,7 @@
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {
"@electron/docs-parser": "^0.4.2",
"@electron/typescript-definitions": "^8.6.1",
"@electron/typescript-definitions": "^8.6.4",
"@octokit/rest": "^16.3.2",
"@primer/octicons": "^9.1.1",
"@types/basic-auth": "^1.1.2",
@ -138,4 +138,4 @@
"@types/multiparty": "^0.0.32",
"@types/temp": "^0.8.34"
}
}
}

Просмотреть файл

@ -529,12 +529,12 @@ describe('protocol module', () => {
const port = (server.address() as AddressInfo).port
const url = `http://127.0.0.1:${port}`
await interceptHttpProtocol('http', (request, callback) => {
const data = {
const data: Electron.RedirectRequest = {
url: url,
method: 'POST',
uploadData: {
contentType: 'application/x-www-form-urlencoded',
bytes: request.uploadData[0].bytes
data: request.uploadData[0].bytes
},
session: null
}

Просмотреть файл

@ -40,10 +40,10 @@
ora "^3.4.0"
pretty-ms "^5.0.0"
"@electron/typescript-definitions@^8.6.1":
version "8.6.3"
resolved "https://registry.yarnpkg.com/@electron/typescript-definitions/-/typescript-definitions-8.6.3.tgz#6868d71bd56b6219150123969d1a6634629ef566"
integrity sha512-/PLUskJu2+W8BKkQQBQq2C0WFUyAeBaGEutt2sJkzzhkTWoVcKG4M36Me45+D0CiRqgAxTO9qR68O96+8vtIfg==
"@electron/typescript-definitions@^8.6.4":
version "8.6.4"
resolved "https://registry.yarnpkg.com/@electron/typescript-definitions/-/typescript-definitions-8.6.4.tgz#d4727c825afcebf6ff00a7d18416878288cac632"
integrity sha512-Fb4o56fikSE3id61U0MbPVBPcweVw8YwzO+JtT9aOorJR4baJZGmpsGxuaHeLSGv+D0Zd5XiWk13cEM/nv9fFw==
dependencies:
"@electron/docs-parser" "^0.4.1"
"@types/node" "^11.13.7"