prague-fluent
Advanced tools
Comparing version 0.17.6 to 0.17.7
@@ -30,3 +30,2 @@ import { Observable } from 'rxjs'; | ||
mapActionToRouter: (context: CONTEXT) => Partial<MapTemplateActionToRouter<TEMPLATES>>; | ||
constructor(mapActionToRouter: Partial<MapTemplateActionToRouter<TEMPLATES>>); | ||
constructor(mapActionToRouter: (context: CONTEXT) => Partial<MapTemplateActionToRouter<TEMPLATES>>); | ||
@@ -33,0 +32,0 @@ route<ACTION extends keyof TEMPLATES, ARGS extends TEMPLATES[ACTION]>(action: ACTION, args: ARGS, source?: SOURCE, score?: number): any; |
@@ -144,5 +144,3 @@ "use strict"; | ||
function Templates(mapActionToRouter) { | ||
this.mapActionToRouter = typeof mapActionToRouter === 'function' | ||
? mapActionToRouter | ||
: function () { return mapActionToRouter; }; | ||
this.mapActionToRouter = mapActionToRouter; | ||
} | ||
@@ -149,0 +147,0 @@ Templates.prototype.route = function (action, args) { |
{ | ||
"name": "prague-fluent", | ||
"version": "0.17.6", | ||
"version": "0.17.7", | ||
"description": "fluent API for Prague", | ||
@@ -5,0 +5,0 @@ "main": "dist/fluent.js", |
@@ -102,18 +102,5 @@ import { Observable } from 'rxjs'; | ||
export class Templates <TEMPLATES, CONTEXT = any, SOURCE = string> { | ||
mapActionToRouter: (context: CONTEXT) => Partial<MapTemplateActionToRouter<TEMPLATES>>; | ||
constructor( | ||
mapActionToRouter: Partial<MapTemplateActionToRouter<TEMPLATES>> | ||
); | ||
constructor( | ||
mapActionToRouter: (context: CONTEXT) => Partial<MapTemplateActionToRouter<TEMPLATES>> | ||
); | ||
constructor( | ||
mapActionToRouter: Partial<MapTemplateActionToRouter<TEMPLATES>> | ((context: CONTEXT) => Partial<MapTemplateActionToRouter<TEMPLATES>>) | ||
public mapActionToRouter: (context: CONTEXT) => Partial<MapTemplateActionToRouter<TEMPLATES>> | ||
) { | ||
this.mapActionToRouter = typeof mapActionToRouter === 'function' | ||
? mapActionToRouter | ||
: () => mapActionToRouter; | ||
} | ||
@@ -120,0 +107,0 @@ |
Sorry, the diff of this file is not supported yet
64560
1195