Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add return type to createInitialState #460

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

progval
Copy link

@progval progval commented Mar 5, 2023

No description provided.

@progval progval requested a review from a team as a code owner March 5, 2023 08:10
@progval
Copy link
Author

progval commented Mar 5, 2023

Signed-off-by: Valentin Lorentz <progval plus git at progval dot net>

Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confusion on types

@@ -35,6 +35,12 @@ export interface MSC2346Content extends MappingInfo {
bridgebot: string;
}

export interface InitialEvent {
type: string,
content: Record<string, unknown>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this just MSC2346Content?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes sorry, I should have explained that. First, because callers need to cast it to a record of unknown anyway: https://github.com/matrix-org/matrix-appservice-irc/blob/3158cc521140ca6883e157ddb0bf01e96d455af4/src/provisioning/Provisioner.ts#L582

and also because I am working on adding support for MSC3968 and MSC3969, which will need genericity in the record type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants