@jill64/ts-cli
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -15,5 +15,5 @@ import { transform } from '@jill64/transform'; | ||
this.routes = routes; | ||
this.invoke = transform(routes, ([route, { handler }]) => [ | ||
this.invoke = transform(routes, ([route, { config, handler }]) => [ | ||
route, | ||
handler | ||
(param) => handler(param, config) | ||
]); | ||
@@ -31,3 +31,3 @@ } | ||
execute(param) { | ||
return this.handler(param); | ||
return this.handler(param, this.config); | ||
} | ||
@@ -34,0 +34,0 @@ lookup(args) { |
import { Config } from '../Config.js'; | ||
import { InvokeHandlerReturn } from './InvokeHandlerReturn.js'; | ||
import { InvokeParam } from './InvokeParam.js'; | ||
export type InvokeHandler<T extends Config> = (param: InvokeParam<T>) => InvokeHandlerReturn<T>; | ||
export type InvokeHandler<T extends Config> = (param: InvokeParam<T>, config?: T) => InvokeHandlerReturn<T>; |
{ | ||
"name": "@jill64/ts-cli", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "files": [ |
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
16143