Skip to content

Commit

Permalink
Add return type to createInitialState
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed Mar 5, 2023
1 parent 0d43d99 commit cebbeee
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/bridge-info-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ export interface MSC2346Content extends MappingInfo {
bridgebot: string;
}

export interface InitialEvent {
type: string,
content: MSC2346Content,
state_key: string,
}

interface Opts<BridgeMappingInfo> {
/**
* The name of the bridge implementation, ideally in Java package naming format:
Expand Down Expand Up @@ -110,7 +116,7 @@ export class BridgeInfoStateSyncer<BridgeMappingInfo> {
}
}

public async createInitialState(roomId: string, bridgeMappingInfo: BridgeMappingInfo) {
public async createInitialState(roomId: string, bridgeMappingInfo: BridgeMappingInfo): Promise<InitialEvent> {
const mapping = await this.opts.getMapping(roomId, bridgeMappingInfo);
return {
type: BridgeInfoStateSyncer.EventType,
Expand Down

0 comments on commit cebbeee

Please sign in to comment.