+
Skip to content

Conversation

AlexNisnevich
Copy link
Member

No description provided.

// If fallbackToClientID is true, falls back to the client ID if there is no
// username set, otherwise returns null.
getClientUsername = (clientID: m.ClientID, fallbackToClientID = true): string => (
getClientUsername = (clientID: m.ClientID, fallbackToClientID = true): string | null => (
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think about using some implementation of optional to clean up the typing?
like: https://www.npmjs.com/package/optional-js

Copy link
Member Author

Choose a reason for hiding this comment

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

Ooh, that's a good idea. I'll merge as-is for now since this would be a pretty major change, but I made a ticket – #733.

@AlexNisnevich AlexNisnevich merged commit 27c115f into master Jul 1, 2018
@AlexNisnevich AlexNisnevich deleted the an-ts-stuff branch July 1, 2018 06:54
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.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载