From e42641e991ed5f38a712e5d212eeb02e0aaf38ca Mon Sep 17 00:00:00 2001 From: Kravets <57632712+kravetsone@users.noreply.github.com> Date: Sun, 16 Jun 2024 14:22:01 +0300 Subject: [PATCH] chore: bump --- README.md | 17 +++++++++++++++++ package.json | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c6bf890..408cf37 100644 --- a/README.md +++ b/README.md @@ -134,8 +134,25 @@ const { data } = await app.test["some-path-param"].get({ console.log(data); ``` +`routes.ts` will be: + +```ts +// @filename: routes.ts + +import type { ElysiaWithBaseUrl } from "elysia-autoload"; +import type Route0 from "./routes/index"; +import type Route1 from "./routes/test/[some]/index"; + +declare global { + export type Routes = ElysiaWithBaseUrl<"/api", ReturnType> & + ElysiaWithBaseUrl<"/api/test/:some", ReturnType>; +} +``` + Example of app with types code-generation you can see in [example](https://github.com/kravetsone/elysia-autoload/tree/main/example) +**Currently, Eden types generation is broken!!** + ### Bun build usage You can use this plugin with `Bun.build`, thanks to [esbuild-plugin-autoload](https://github.com/kravetsone/esbuild-plugin-autoload)! diff --git a/package.json b/package.json index 80743b1..5363108 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "elysia-autoload", - "version": "1.0.0", + "version": "1.0.1", "author": "kravetsone", "type": "module", "types": "./dist/index.d.ts",