File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
1414limitations under the License.
1515*/
1616
17- import { EitherAnd } from "matrix-events-sdk/lib/types" ;
18-
1917import { IContent , IEvent } from "../models/event" ;
2018import { Preset , Visibility } from "./partials" ;
2119import { IEventWithRoomId , SearchKey } from "./search" ;
@@ -86,7 +84,10 @@ export interface IFutureTimeout {
8684 future_timeout : number ;
8785}
8886
89- export type ISendFutureRequestOpts = EitherAnd < IFutureGroupId , IFutureTimeout > ;
87+ export type ISendTimeoutFutureRequestOpts = IFutureTimeout & Partial < IFutureGroupId > ;
88+ export type ISendActionFutureRequestOpts = IFutureGroupId ;
89+
90+ export type ISendFutureRequestOpts = ISendTimeoutFutureRequestOpts | ISendActionFutureRequestOpts ;
9091
9192export interface IFutureTokens {
9293 send_token : string ;
@@ -100,7 +101,7 @@ export interface ITimeoutFutureTokens extends IFutureTokens {
100101export type ISendActionFutureResponse = IFutureGroupId & IFutureTokens ;
101102export type ISendTimeoutFutureResponse = IFutureGroupId & ITimeoutFutureTokens ;
102103
103- export type ISendFutureResponse < F extends ISendFutureRequestOpts > = F extends IFutureTimeout
104+ export type ISendFutureResponse < F extends ISendFutureRequestOpts > = F extends ISendTimeoutFutureRequestOpts
104105 ? ISendTimeoutFutureResponse
105106 : ISendActionFutureResponse ;
106107
You can’t perform that action at this time.
0 commit comments