Skip to content
Permalink
Browse files

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

* chore: upgrade ts generator for better type safety

* spec: fix tests
  • Loading branch information...
MarshallOfSound committed Nov 5, 2019
1 parent 6e5ac30 commit fcee7212ce19ad1841d9a24d69fea954d4609160
Showing with 10 additions and 12 deletions.
  1. +1 −3 docs/api/protocol.md
  2. +1 −1 docs/api/structures/protocol-response-upload-data.md
  3. +2 −2 package.json
  4. +2 −2 spec-main/api-protocol-spec.ts
  5. +4 −4 yarn.lock
@@ -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"

0 comments on commit fcee721

Please sign in to comment.
You can’t perform that action at this time.