authz: fix PermissionCondition type parameter

`unknown` doesn't satisfy the (recently added) `extends unknown[]`
constraint. In these two cases, we can remove the parameter entirely and
rely instead on the default of `unknown[]`.

Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
Mike Lewis
2021-11-11 13:54:29 +00:00
parent a82709c38f
commit 4083fcdb5e
2 changed files with 2 additions and 2 deletions
@@ -31,7 +31,7 @@ import { conditionFor } from './conditionFor';
export type ApplyConditionsRequest = {
resourceRef: string;
resourceType: string;
conditions: PermissionCriteria<PermissionCondition<unknown>>;
conditions: PermissionCriteria<PermissionCondition>;
};
type Condition<TRule> = TRule extends PermissionRule<any, any, infer TParams>
+1 -1
View File
@@ -48,7 +48,7 @@ export type ConditionalPolicyResult = {
conditions: {
pluginId: string;
resourceType: string;
conditions: PermissionCriteria<PermissionCondition<unknown>>;
conditions: PermissionCriteria<PermissionCondition>;
};
};