-
Couldn't load subscription status.
- Fork 39
Use TS strict mode #52
Conversation
Pull Request Test Coverage Report for Build 246
💛 - Coveralls |
packages/abi/src/encoder/encoder.ts
Outdated
|
|
||
| static encodeToken (token: Token, index = 0): Mediate { | ||
| if (!isInstanceOf(token, Token)) { | ||
| static encodeToken (token?: Token, index = 0): Mediate { |
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.
is there a reason we're using the token?: Token syntax to define an optional parameter here, and we're using the ParamType[] | undefined syntax in the other file?
also out of curiosity, why are we setting the first parameter of encode and encodeToken as optional if they really are required?
packages/contracts/src/badgereg.ts
Outdated
| resultIcon = null; | ||
| } | ||
|
|
||
| return { title, icon }; |
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.
did you mean to return { title, icon: resultIcon } here?
packages/abi/src/encoder/encoder.ts
Outdated
|
|
||
| class Encoder { | ||
| static encode (tokens: Token[]) { | ||
| static encode (tokens?: Token[]) { |
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.
also here
|
👍 |
Use strict mode in tsconfig.
This PR is easier read commit by commit.