@elysiajs/eden 0.2.0 → 0.2.1

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.
package/dist/types.d.ts CHANGED
@@ -3,8 +3,8 @@ import type { Elysia, SCHEMA, TypedRoute, IsPathParameter } from 'elysia';
3
3
  import type { EdenWS } from '.';
4
4
  declare type IsAny<T> = unknown extends T ? [T] extends [object] ? true : false : false;
5
5
  export declare type Eden<App extends Elysia<any>> = App['store'] extends {
6
- [key in typeof SCHEMA]: infer Schema extends Record<string, Record<string, TypedRoute>>;
7
- } ? IsAny<Elysia> extends true ? 'Please installed Elysia before using Eden' : UnionToIntersection<Schema> : never;
6
+ [key in typeof SCHEMA]: any;
7
+ } ? IsAny<Elysia> extends true ? 'Please installed Elysia before using Eden' : UnionToIntersection<CreateEden<App['store'][typeof SCHEMA]>> : never;
8
8
  export interface EdenCall {
9
9
  [x: string]: any;
10
10
  $fetch?: RequestInit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elysiajs/eden",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Fully type-safe Elysia client",
5
5
  "author": {
6
6
  "name": "saltyAom",
package/src/types.ts CHANGED
@@ -10,14 +10,11 @@ type IsAny<T> = unknown extends T
10
10
  : false
11
11
 
12
12
  export type Eden<App extends Elysia<any>> = App['store'] extends {
13
- [key in typeof SCHEMA]: infer Schema extends Record<
14
- string,
15
- Record<string, TypedRoute>
16
- >
13
+ [key in typeof SCHEMA]: any
17
14
  }
18
15
  ? IsAny<Elysia> extends true
19
16
  ? 'Please installed Elysia before using Eden'
20
- : UnionToIntersection<Schema>
17
+ : UnionToIntersection<CreateEden<App['store'][typeof SCHEMA]>>
21
18
  : never
22
19
 
23
20
  export interface EdenCall {