Skip to content

Commit

Permalink
chore: bump
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed Jun 16, 2024
1 parent 5a0ec34 commit e42641e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof Route0>> &
ElysiaWithBaseUrl<"/api/test/:some", ReturnType<typeof Route1>>;
}
```

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)!
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elysia-autoload",
"version": "1.0.0",
"version": "1.0.1",
"author": "kravetsone",
"type": "module",
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit e42641e

Please sign in to comment.