-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
More typescript linting #3310
More typescript linting #3310
Conversation
…chguy/tslint # Conflicts: # .eslintrc.cjs # src/autodiscovery.ts # src/crypto/RoomList.ts # src/crypto/crypto.ts # src/models/MSC3089TreeSpace.ts # src/secret-storage.ts
Signed-off-by: Michael Telatynski <[email protected]>
Signed-off-by: Michael Telatynski <[email protected]>
Signed-off-by: Michael Telatynski <[email protected]>
public getUserId(): string { | ||
return this.userId; | ||
} | ||
public getSafeUserId(): string { | ||
return this.userId; | ||
} |
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.
Why do we need the save version of this of getUserId already returns a non optional?
What is the difference?
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.
const localMember = this.room.getMember(this.client.getUserId()!)!; | ||
const localMember = this.room.getMember(this.client.getSafeUserId()); |
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.
Here it seems to be fine to just remove the exclamation mark but keep the getUserId
method?
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.
No, as getUserId
has return type string | null
in reality, the test stub is misleading
…chguy/tslint # Conflicts: # src/sync.ts
These linters identified a few incorrect types
This change is marked as an internal change (Task), so will not be included in the changelog.