Skip to content

Commit 489b397

Browse files
committed
fix(types): Avoid using ts-expect-error as it may fail for hosting apps
1 parent 3abb91f commit 489b397

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.changeset/friendly-parrots-nail.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/types/src/organizationMembership.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ export interface OrganizationMembershipResource extends ClerkResource {
4646
}
4747

4848
export type OrganizationCustomPermissionKey = 'permission' extends keyof ClerkAuthorization
49-
? // @ts-expect-error Typescript cannot infer the existence of the `permission` key even if we checking it above
49+
? // @ts-ignore Typescript cannot infer the existence of the `permission` key even if we checking it above
5050
ClerkAuthorization['permission']
5151
: Base['permission'];
5252

5353
export type OrganizationCustomRoleKey = 'role' extends keyof ClerkAuthorization
54-
? // @ts-expect-error Typescript cannot infer the existence of the `role` key even if we checking it above
54+
? // @ts-ignore Typescript cannot infer the existence of the `role` key even if we checking it above
5555
ClerkAuthorization['role']
5656
: Base['role'];
5757

@@ -62,7 +62,7 @@ export type OrganizationCustomRoleKey = 'role' extends keyof ClerkAuthorization
6262
* these types will no longer match a developer's custom logic.
6363
*/
6464
export type MembershipRole = 'role' extends keyof ClerkAuthorization
65-
? // @ts-expect-error Typescript cannot infer the existence of the `role` key even if we checking it above
65+
? // @ts-ignore Typescript cannot infer the existence of the `role` key even if we checking it above
6666
// Disabling eslint rule because the error causes the type to become any when accessing a property that does not exist
6767
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
6868
ClerkAuthorization['role'] | 'admin' | 'basic_member' | 'guest_member'
@@ -81,7 +81,7 @@ export type OrganizationSystemPermissionKey =
8181
* System permissions are only accessible from FAPI and client-side operations/utils
8282
*/
8383
export type OrganizationPermissionKey = 'permission' extends keyof ClerkAuthorization
84-
? // @ts-expect-error Typescript cannot infer the existence of the `permission` key even if we checking it above
84+
? // @ts-ignore Typescript cannot infer the existence of the `permission` key even if we checking it above
8585
// Disabling eslint rule because the error causes the type to become any when accessing a property that does not exist
8686
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
8787
ClerkAuthorization['permission'] | OrganizationSystemPermissionKey

0 commit comments

Comments
 (0)