diff options
author | Florian Dold <florian@dold.me> | 2020-12-14 16:45:15 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2020-12-14 16:45:15 +0100 |
commit | f332d61fb68fbc394f31337ddeb7d1fc114772d0 (patch) | |
tree | eeb9e7dd527ab7efcaa7812f4440e8901185e9aa /packages/taler-wallet-core/src/util | |
parent | c4b44a51097e67a357b490adf407f1a6afb0d8ee (diff) | |
download | wallet-core-f332d61fb68fbc394f31337ddeb7d1fc114772d0.tar.xz |
formatting pass
Diffstat (limited to 'packages/taler-wallet-core/src/util')
-rw-r--r-- | packages/taler-wallet-core/src/util/RequestThrottler.ts | 6 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/util/helpers.ts | 2 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/util/http.ts | 9 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/util/query.ts | 9 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/util/retries.ts | 2 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/util/taleruri.ts | 2 |
6 files changed, 15 insertions, 15 deletions
diff --git a/packages/taler-wallet-core/src/util/RequestThrottler.ts b/packages/taler-wallet-core/src/util/RequestThrottler.ts index 8c9f304e0..0bdd7cab7 100644 --- a/packages/taler-wallet-core/src/util/RequestThrottler.ts +++ b/packages/taler-wallet-core/src/util/RequestThrottler.ts @@ -21,7 +21,11 @@ /** * Imports. */ -import { getTimestampNow, timestampDifference, timestampCmp } from "../util/time"; +import { + getTimestampNow, + timestampDifference, + timestampCmp, +} from "../util/time"; import { URL } from "./url"; import { Logger } from "./logging"; diff --git a/packages/taler-wallet-core/src/util/helpers.ts b/packages/taler-wallet-core/src/util/helpers.ts index 570df441d..3d8999ed5 100644 --- a/packages/taler-wallet-core/src/util/helpers.ts +++ b/packages/taler-wallet-core/src/util/helpers.ts @@ -149,4 +149,4 @@ export function strcmp(s1: string, s2: string): number { export function j2s(x: any): string { return JSON.stringify(x, undefined, 2); -}
\ No newline at end of file +} diff --git a/packages/taler-wallet-core/src/util/http.ts b/packages/taler-wallet-core/src/util/http.ts index 1ec9c2f50..4b0a8e75a 100644 --- a/packages/taler-wallet-core/src/util/http.ts +++ b/packages/taler-wallet-core/src/util/http.ts @@ -17,7 +17,7 @@ /** * Helpers for doing XMLHttpRequest-s that are based on ES6 promises. * Allows for easy mocking for test cases. - * + * * The API is inspired by the HTML5 fetch API. */ @@ -91,7 +91,7 @@ export class Headers { toJSON(): any { const m: Record<string, string> = {}; - this.headerMap.forEach((v, k) => m[k] = v); + this.headerMap.forEach((v, k) => (m[k] = v)); return m; } } @@ -120,10 +120,7 @@ export interface HttpRequestLibrary { /** * Make an HTTP POST request with a JSON body. */ - fetch( - url: string, - opt?: HttpRequestOptions, - ): Promise<HttpResponse>; + fetch(url: string, opt?: HttpRequestOptions): Promise<HttpResponse>; } type TalerErrorResponse = { diff --git a/packages/taler-wallet-core/src/util/query.ts b/packages/taler-wallet-core/src/util/query.ts index beb14cad0..e1a23b168 100644 --- a/packages/taler-wallet-core/src/util/query.ts +++ b/packages/taler-wallet-core/src/util/query.ts @@ -25,7 +25,6 @@ */ import { openPromise } from "./promiseUtils"; import { - IDBObjectStoreParameters, IDBRequest, IDBTransaction, IDBValidKey, @@ -574,7 +573,7 @@ export class Database { async get<N extends string, T>( store: Store<N, T>, - key: any, + key: IDBValidKey, ): Promise<T | undefined> { const tx = this.db.transaction([store.name], "readonly"); const req = tx.objectStore(store.name).get(key); @@ -585,7 +584,7 @@ export class Database { async getIndexed<Ind extends Index<string, string, any, any>>( index: InferIndex<Ind>, - key: any, + key: IDBValidKey, ): Promise<IndexRecord<Ind> | undefined> { const tx = this.db.transaction([index.storeName], "readonly"); const req = tx.objectStore(index.storeName).index(index.indexName).get(key); @@ -597,7 +596,7 @@ export class Database { async put<St extends Store<string, any>>( store: St, value: StoreContent<St>, - key?: any, + key?: IDBValidKey, ): Promise<any> { const tx = this.db.transaction([store.name], "readwrite"); const req = tx.objectStore(store.name).put(value, key); @@ -608,7 +607,7 @@ export class Database { async mutate<N extends string, T>( store: Store<N, T>, - key: any, + key: IDBValidKey, f: (x: T) => T | undefined, ): Promise<void> { const tx = this.db.transaction([store.name], "readwrite"); diff --git a/packages/taler-wallet-core/src/util/retries.ts b/packages/taler-wallet-core/src/util/retries.ts index f3a5e7d80..8be78cfc8 100644 --- a/packages/taler-wallet-core/src/util/retries.ts +++ b/packages/taler-wallet-core/src/util/retries.ts @@ -89,4 +89,4 @@ export function initRetryInfo( }; updateRetryInfoTimeout(info, p); return info; -}
\ No newline at end of file +} diff --git a/packages/taler-wallet-core/src/util/taleruri.ts b/packages/taler-wallet-core/src/util/taleruri.ts index ee055a32f..d8366fd0f 100644 --- a/packages/taler-wallet-core/src/util/taleruri.ts +++ b/packages/taler-wallet-core/src/util/taleruri.ts @@ -14,7 +14,7 @@ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ -import { canonicalizeBaseUrl } from './helpers'; +import { canonicalizeBaseUrl } from "./helpers"; import { URLSearchParams } from "./url"; export interface PayUriResult { |