-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rm GenericShield and use TShield as typing
- Loading branch information
1 parent
83aae8b
commit 3b8a762
Showing
10 changed files
with
17 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { Shield } from "../abstracts"; | ||
import { RouteHandler } from "../handlers"; | ||
import { GenericShield } from "../generics"; | ||
import { TShield } from "../types"; | ||
|
||
export const shields = (...shields: Array<typeof Shield>): ClassDecorator => { | ||
return (target: any) => { | ||
const className = target.name; | ||
RouteHandler.addShields(shields as Array<typeof GenericShield>, className); | ||
RouteHandler.addShields(shields as Array<TShield>, className); | ||
}; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export * from './generic_shield'; | ||
export * from "./generic_wall"; | ||
export * from './generic_xml_parser'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
import { GenericShield } from "../generics"; | ||
import { WorkerInfo } from "../models"; | ||
import { TController } from "../types"; | ||
import { TController, TShield } from "../types"; | ||
|
||
export interface IRouteInfo { | ||
controller: TController; | ||
controllerName: string; | ||
path: string; | ||
// workerName => WorkerInfo | ||
workers: Map<string, WorkerInfo>; | ||
shields: Array<typeof GenericShield>; | ||
shields: Array<TShield>; | ||
values: any[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters