aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-12-22 22:31:25 -0800
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-12-22 22:31:25 -0800
commit2188be219e9795bc7d3a5ec9e07e1ab9376108f0 (patch)
tree84d0ab38142c2d6768d237ba4a38337134d356d8
parenta34792ce1600449af3ee50be6cc63445da1ddad7 (diff)
downloadbun-2188be219e9795bc7d3a5ec9e07e1ab9376108f0.tar.gz
bun-2188be219e9795bc7d3a5ec9e07e1ab9376108f0.tar.zst
bun-2188be219e9795bc7d3a5ec9e07e1ab9376108f0.zip
[bun-framework-next] fix ts errors
-rw-r--r--packages/bun-framework-next/url-polyfill.js33
1 files changed, 31 insertions, 2 deletions
diff --git a/packages/bun-framework-next/url-polyfill.js b/packages/bun-framework-next/url-polyfill.js
index fd79686db..cd77ae35c 100644
--- a/packages/bun-framework-next/url-polyfill.js
+++ b/packages/bun-framework-next/url-polyfill.js
@@ -493,6 +493,35 @@ export class URL {
toString() {
return this.href;
}
+
+ // -- incorrect --
+ get password() {
+ return this._password;
+ }
+
+ set password(val) {
+ this._password = val;
+ }
+
+ get username() {
+ return this._username;
+ }
+
+ set username(val) {
+ this._username = val;
+ }
+ // -- incorrect --
+
+ toJSON() {
+ return this.href;
+ }
+
+ get searchParams() {
+ throw Error("searchParams() is not implemented");
+ // @ts-expect-error
+ return undefined;
+ }
+
get href() {
if (this._isInvalid) return this._url;
@@ -614,9 +643,9 @@ export class URL {
return this._scheme + "://" + host;
}
- createObjectURL(blob) {
+ static createObjectURL(blob) {
return "blob:not-implemented-yet";
}
- revokeObjectURL(blob) {}
+ static revokeObjectURL(blob) {}
}