-
Notifications
You must be signed in to change notification settings - Fork 72
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
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Valentin Lorentz <progval plus git at progval dot net> |
cebbeee
to
51c4df3
Compare
There was a problem hiding this 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>, |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
No description provided.