Skip to content

Commit 5f75be0

Browse files
committed
account types: Loosen identityOfAccount to take account-like AccountStatus
I thought the added $ReadOnly here would be unnecessary, since Identity is a read-only object type. I guess I was wrong; if I remove it, I get errors about specific properties on { ...Identity, ... } saying they are writable.
1 parent 0de2e7d commit 5f75be0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/account/accountMisc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const identitySlice = ({ realm, email }): Identity => ({ realm, email });
55

66
export const identityOfAuth: Auth => Identity = identitySlice;
77

8-
export const identityOfAccount: Account => Identity = identitySlice;
8+
export const identityOfAccount: ($ReadOnly<{ ...Identity, ... }>) => Identity = identitySlice;
99

1010
/** A string corresponding uniquely to an identity, for use in `Map`s. */
1111
export const keyOfIdentity = ({ realm, email }: Identity): string =>

0 commit comments

Comments
 (0)