mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-22 21:21:35 +01:00
Fix sdk client undefined (#13003)
* feat: remove undefined from `client$` * feat: add undefined to `userClient$` * feat: implement TS strict for SdkService
This commit is contained in:
parent
09748389e7
commit
c97e937333
@ -1,5 +1,3 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
import { BitwardenClient } from "@bitwarden/sdk-internal";
|
||||
@ -10,13 +8,13 @@ export abstract class SdkService {
|
||||
/**
|
||||
* Retrieve the version of the SDK.
|
||||
*/
|
||||
version$: Observable<string>;
|
||||
abstract version$: Observable<string>;
|
||||
|
||||
/**
|
||||
* Retrieve a client initialized without a user.
|
||||
* This client can only be used for operations that don't require a user context.
|
||||
*/
|
||||
client$: Observable<BitwardenClient | undefined>;
|
||||
abstract client$: Observable<BitwardenClient>;
|
||||
|
||||
/**
|
||||
* Retrieve a client initialized for a specific user.
|
||||
@ -29,5 +27,5 @@ export abstract class SdkService {
|
||||
*
|
||||
* @param userId
|
||||
*/
|
||||
abstract userClient$(userId: UserId): Observable<BitwardenClient>;
|
||||
abstract userClient$(userId: UserId): Observable<BitwardenClient | undefined>;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user