@jill64/ts-cli
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -11,4 +11,5 @@ import { Config } from './types/Config.js'; | ||
private readonly routes; | ||
readonly invoke: { [K in keyof RT]: InvokeHandler<RT[K]["config"]>; }; | ||
private readonly _invoke; | ||
constructor(config: RC, handler: RH, routes?: RT); | ||
get invoke(): { [K in keyof RT]: InvokeHandler<RT[K]["config"]>; }; | ||
add<T extends string, C extends Config, H extends InvokeHandler<C>>(route: T, config: C, handler: H): App<RC, RH, RT & Record<T, { | ||
@@ -15,0 +16,0 @@ config: C; |
@@ -7,3 +7,3 @@ import { transform } from '@jill64/transform'; | ||
routes; | ||
invoke; | ||
_invoke; | ||
constructor(config, handler, routes = {}) { | ||
@@ -16,3 +16,3 @@ this.config = config; | ||
this.routes = routes; | ||
this.invoke = transform(routes, ([route, { config, handler }]) => [ | ||
this._invoke = transform(routes, ([route, { config, handler }]) => [ | ||
route, | ||
@@ -22,2 +22,5 @@ (param) => handler(param, config) | ||
} | ||
get invoke() { | ||
return this._invoke; | ||
} | ||
add(route, config, handler) { | ||
@@ -24,0 +27,0 @@ return new App(this.config, this.handler, { |
{ | ||
"name": "@jill64/ts-cli", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"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
17448
337