authorized-rules
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -17,3 +17,3 @@ export declare type JwtToken = { | ||
export declare const authorize: <T1 = void, T2 = void, T3 = void, T4 = void>(jwtToken: string, executionRule: Rule<T1 | T2 | T3 | T4>) => Promise<(T1 | T2 | T3 | T4)[]>; | ||
export declare const and: <T extends {}>(rules: Rule<T>[]) => Rule<T>; | ||
export declare const or: <T extends {}>(rules: Rule<T>[]) => Rule<T>; | ||
export declare const and: <T extends void | {}>(rules: Rule<T>[]) => Rule<T>; | ||
export declare const or: <T extends void | {}>(rules: Rule<T>[]) => Rule<T>; |
{ | ||
"name": "authorized-rules", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -41,3 +41,3 @@ import jwtDecoder from 'jwt-decode'; | ||
export const and = <T extends {}>(rules: Rule<T>[]): Rule<T> => async (token: JwtToken) => { | ||
export const and = <T extends {} | void>(rules: Rule<T>[]): Rule<T> => async (token: JwtToken) => { | ||
let data: T[] = []; | ||
@@ -54,3 +54,3 @@ for (const rule of rules) { | ||
export const or = <T extends {}>(rules: Rule<T>[]): Rule<T> => async (token: JwtToken) => { | ||
export const or = <T extends {} | void>(rules: Rule<T>[]): Rule<T> => async (token: JwtToken) => { | ||
let data: T[] = []; | ||
@@ -57,0 +57,0 @@ for (const rule of rules) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16676