@@ -22,31 +22,25 @@ export interface ClientOnlyFn<TArgs extends Array<any>, TClient>
2222}
2323
2424type AnyFn = ( ...args : Array < any > ) => any
25- export interface ServerOnlyFnWithType < TArgs extends Array < any > , TReturnType >
26- extends IsomorphicFn < TArgs , TReturnType > {
25+ export interface ClientImplRequired < TArgs extends Array < any > , TReturnType > {
2726 client : (
2827 clientImpl : ( ...args : TArgs ) => TReturnType ,
2928 ) => IsomorphicFn < TArgs , TReturnType , TReturnType >
3029}
3130
32- export interface ClientOnlyFnWithType < TArgs extends Array < any > , TReturnType >
33- extends IsomorphicFn < TArgs , TReturnType , TReturnType > {
31+ export interface ServerImplRequired < TArgs extends Array < any > , TReturnType > {
3432 server : (
3533 serverImpl : ( ...args : TArgs ) => TReturnType ,
3634 ) => IsomorphicFn < TArgs , TReturnType , TReturnType >
3735}
3836
3937export interface IsomorphicFnWithType < TArgs extends Array < any > , TReturnType > {
40- server : ( serverImpl : ( ...args : TArgs ) => TReturnType ) => {
41- client : (
42- clientImpl : ( ...args : TArgs ) => TReturnType ,
43- ) => IsomorphicFn < TArgs , TReturnType , TReturnType >
44- }
45- client : ( clientImpl : ( ...args : TArgs ) => TReturnType ) => {
46- server : (
47- serverImpl : ( ...args : TArgs ) => TReturnType ,
48- ) => IsomorphicFn < TArgs , TReturnType , TReturnType >
49- }
38+ server : (
39+ serverImpl : ( ...args : TArgs ) => TReturnType ,
40+ ) => ClientImplRequired < TArgs , TReturnType >
41+ client : (
42+ clientImpl : ( ...args : TArgs ) => TReturnType ,
43+ ) => ServerImplRequired < TArgs , TReturnType >
5044}
5145
5246export interface IsomorphicFnBase extends IsomorphicFn {
0 commit comments