Remove default exports
[arvados-workbench2.git] / src / common / api / url-builder.ts
index e5786a239d5868cf43f0e868c976ae8f0e21a5fa..0587c837371dbe0ef242885f0bce6a4a5c2e9c4b 100644 (file)
@@ -2,25 +2,25 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-export default class UrlBuilder {
-       private url: string = "";
-       private query: string = "";
+export class UrlBuilder {
+    private readonly url: string = "";
+    private query: string = "";
 
-       constructor(host: string) {
-               this.url = host;
-       }
+    constructor(host: string) {
+        this.url = host;
+    }
 
-       public addParam(param: string, value: string) {
-               if (this.query.length === 0) {
-                       this.query += "?";
-               } else {
-                       this.query += "&";
-               }
-               this.query += `${param}=${value}`;
-               return this;
-       }
+    public addParam(param: string, value: string) {
+        if (this.query.length === 0) {
+            this.query += "?";
+        } else {
+            this.query += "&";
+        }
+        this.query += `${param}=${value}`;
+        return this;
+    }
 
-       public get() {
-               return this.url + this.query;
-       }
+    public get() {
+        return this.url + this.query;
+    }
 }