File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -134,8 +134,25 @@ const { data } = await app.test["some-path-param"].get({
134134console .log (data );
135135```
136136
137+ ` routes.ts ` will be:
138+
139+ ``` ts
140+ // @filename: routes.ts
141+
142+ import type { ElysiaWithBaseUrl } from " elysia-autoload" ;
143+ import type Route0 from " ./routes/index" ;
144+ import type Route1 from " ./routes/test/[some]/index" ;
145+
146+ declare global {
147+ export type Routes = ElysiaWithBaseUrl <" /api" , ReturnType <typeof Route0 >> &
148+ ElysiaWithBaseUrl <" /api/test/:some" , ReturnType <typeof Route1 >>;
149+ }
150+ ```
151+
137152Example of app with types code-generation you can see in [ example] ( https://github.com/kravetsone/elysia-autoload/tree/main/example )
138153
154+ ** Currently, Eden types generation is broken!!**
155+
139156### Bun build usage
140157
141158You can use this plugin with ` Bun.build ` , thanks to [ esbuild-plugin-autoload] ( https://github.com/kravetsone/esbuild-plugin-autoload ) !
Original file line number Diff line number Diff line change 11{
22 "name" : " elysia-autoload" ,
3- "version" : " 1.0.0 " ,
3+ "version" : " 1.0.1 " ,
44 "author" : " kravetsone" ,
55 "type" : " module" ,
66 "types" : " ./dist/index.d.ts" ,
You can’t perform that action at this time.
0 commit comments