5htp 0.5.9-7 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/compiler/index.ts +23 -0
  2. package/package.json +1 -1
package/compiler/index.ts CHANGED
@@ -365,6 +365,29 @@ export default class ${appClassIdentifier} extends Application {
365
365
 
366
366
  declare type ${appClassIdentifier} = import("@/server/.generated/app").default;
367
367
 
368
+ declare module '@cli/app' {
369
+
370
+ type App = {
371
+
372
+ env: TEnvConfig;
373
+
374
+ use: (referenceName: string) => TServiceRef;
375
+
376
+ setup: <TServiceName extends keyof ${appClassIdentifier}>(...args: [
377
+ // { user: app.setup('Core/User') }
378
+ servicePath: string,
379
+ serviceConfig?: {}
380
+ ] | [
381
+ // app.setup('User', 'Core/User')
382
+ serviceName: TServiceName,
383
+ servicePath: string,
384
+ serviceConfig?: ${appClassIdentifier}[TServiceName]["config"]
385
+ ]) => TServiceSetup;
386
+ }
387
+ const app: App;
388
+ export = app;
389
+ }
390
+
368
391
  declare module "@app" {
369
392
 
370
393
  import { ApplicationContainer } from '@server/app/container';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "5htp",
3
3
  "description": "Convenient TypeScript framework designed for Performance and Productivity.",
4
- "version": "0.5.9-7",
4
+ "version": "0.6.0",
5
5
  "author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
6
6
  "repository": "git://github.com/gaetanlegac/5htp.git",
7
7
  "license": "MIT",