Skip to content

Commit 02ea64f

Browse files
authored
fix missing typeof (#630)
1 parent 74f4bb7 commit 02ea64f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/contributing/code-style/enums.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const CipherType = Object.freeze({
3737
} as const);
3838

3939
// derive the enum-like type from the raw data
40-
export type CipherType = CipherType[keyof typeof CipherType];
40+
export type CipherType = (typeof CipherType)[keyof typeof CipherType];
4141
```
4242

4343
And use it like so:
@@ -93,7 +93,7 @@ export const CredentialType = Object.freeze({
9393
} as const);
9494

9595
// derive the enum-like type from the raw data
96-
export type CredentialType = CredentialType[keyof typeof CredentialType];
96+
export type CredentialType = (typeof CredentialType)[keyof typeof CredentialType];
9797
```
9898

9999
:::note[Enum-likes are structural types!]

0 commit comments

Comments
 (0)