diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2024-09-06 19:52:59 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-06 12:52:59 +0200 |
commit | f0a3d206422af3177e0f36ed22802c1ccc6f7654 (patch) | |
tree | 57ad718cc47b7b98c0bbd869d6c070adee3bf30a /ext/fetch/22_body.js | |
parent | 8ef08f1d294dbe7e3771202084ecbede73ca28aa (diff) |
fix(runtime): use more null proto objects again (#25040)
proceed with #23921
This PR is a preparation for
https://github.com/denoland/deno_lint/pull/1307
---------
Signed-off-by: Kenta Moriuchi <moriken@kimamass.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
Diffstat (limited to 'ext/fetch/22_body.js')
-rw-r--r-- | ext/fetch/22_body.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/fetch/22_body.js b/ext/fetch/22_body.js index a8f5deac9..61a06b4af 100644 --- a/ext/fetch/22_body.js +++ b/ext/fetch/22_body.js @@ -263,6 +263,7 @@ function mixinBody(prototype, bodySymbol, mimeTypeSymbol) { /** @type {PropertyDescriptorMap} */ const mixin = { body: { + __proto__: null, /** * @returns {ReadableStream<Uint8Array> | null} */ @@ -278,6 +279,7 @@ function mixinBody(prototype, bodySymbol, mimeTypeSymbol) { enumerable: true, }, bodyUsed: { + __proto__: null, /** * @returns {boolean} */ @@ -292,6 +294,7 @@ function mixinBody(prototype, bodySymbol, mimeTypeSymbol) { enumerable: true, }, arrayBuffer: { + __proto__: null, /** @returns {Promise<ArrayBuffer>} */ value: function arrayBuffer() { return consumeBody(this, "ArrayBuffer"); @@ -301,6 +304,7 @@ function mixinBody(prototype, bodySymbol, mimeTypeSymbol) { enumerable: true, }, blob: { + __proto__: null, /** @returns {Promise<Blob>} */ value: function blob() { return consumeBody(this, "Blob"); @@ -310,6 +314,7 @@ function mixinBody(prototype, bodySymbol, mimeTypeSymbol) { enumerable: true, }, bytes: { + __proto__: null, /** @returns {Promise<Uint8Array>} */ value: function bytes() { return consumeBody(this, "bytes"); @@ -319,6 +324,7 @@ function mixinBody(prototype, bodySymbol, mimeTypeSymbol) { enumerable: true, }, formData: { + __proto__: null, /** @returns {Promise<FormData>} */ value: function formData() { return consumeBody(this, "FormData"); @@ -328,6 +334,7 @@ function mixinBody(prototype, bodySymbol, mimeTypeSymbol) { enumerable: true, }, json: { + __proto__: null, /** @returns {Promise<any>} */ value: function json() { return consumeBody(this, "JSON"); @@ -337,6 +344,7 @@ function mixinBody(prototype, bodySymbol, mimeTypeSymbol) { enumerable: true, }, text: { + __proto__: null, /** @returns {Promise<string>} */ value: function text() { return consumeBody(this, "text"); |