(options: ProtocolOptionsDecorator<T>)
| 11 | * @class |
| 12 | */ |
| 13 | export function Protocol<T = any>(options: ProtocolOptionsDecorator<T>) { |
| 14 | return useDecorators( |
| 15 | Injectable({ |
| 16 | type: PROVIDER_TYPE_PROTOCOL |
| 17 | }), |
| 18 | StoreSet("protocol", options), |
| 19 | Configuration({ |
| 20 | passport: { |
| 21 | protocols: { |
| 22 | [options.name]: options |
| 23 | } |
| 24 | } |
| 25 | }) |
| 26 | ); |
| 27 | } |
| 28 | |
| 29 | export type ProtocolOptionsDecorator<T = any> = {name: string} & Partial<ProtocolOptions<T>>; |
no test coverage detected