({
actualValue,
expectedToNotBeValue,
errorMessage,
}: {
actualValue: T;
expectedToNotBeValue: T;
errorMessage: string;
})
| 32 | } |
| 33 | |
| 34 | export function assertIsNotValue<T>({ |
| 35 | actualValue, |
| 36 | expectedToNotBeValue, |
| 37 | errorMessage, |
| 38 | }: { |
| 39 | actualValue: T; |
| 40 | expectedToNotBeValue: T; |
| 41 | errorMessage: string; |
| 42 | }) { |
| 43 | if (actualValue === expectedToNotBeValue) { |
| 44 | return new TRPCError({ |
| 45 | code: 'PRECONDITION_FAILED', |
| 46 | message: errorMessage, |
| 47 | }); |
| 48 | } |
| 49 | return; |
| 50 | } |
| 51 | |
| 52 | export function isSuperUser(ctx: Context) { |
| 53 | if ( |
no outgoing calls
no test coverage detected