mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
[PM-25683] Migrate Cipher model and sub-models (#16974)
* Made domain classes ts-strict compliant and fixed spec files * Fixed domain base class and other test files * Added conditional utils and fixed small nits * removed comments * removd ts expect errors * Added removed counter * renamed test name * fixed tests
This commit is contained in:
@@ -14,15 +14,15 @@ export type DecryptedObject<
|
||||
|
||||
// extracts shared keys from the domain and view types
|
||||
type EncryptableKeys<D extends Domain, V extends View> = (keyof D &
|
||||
ConditionalKeys<D, EncString | null>) &
|
||||
(keyof V & ConditionalKeys<V, string | null>);
|
||||
ConditionalKeys<D, EncString | null | undefined>) &
|
||||
(keyof V & ConditionalKeys<V, string | null | undefined>);
|
||||
|
||||
type DomainEncryptableKeys<D extends Domain> = {
|
||||
[key in ConditionalKeys<D, EncString | null>]: EncString | null;
|
||||
[key in ConditionalKeys<D, EncString | null | undefined>]?: EncString | null | undefined;
|
||||
};
|
||||
|
||||
type ViewEncryptableKeys<V extends View> = {
|
||||
[key in ConditionalKeys<V, string | null>]: string | null;
|
||||
[key in ConditionalKeys<V, string | null | undefined>]?: string | null | undefined;
|
||||
};
|
||||
|
||||
// https://contributing.bitwarden.com/architecture/clients/data-model#domain
|
||||
|
||||
Reference in New Issue
Block a user