Update to typescript 3.6.3#19190
Conversation
| ) | ||
| } | ||
|
|
||
| yield* Saga.callRPCs( |
There was a problem hiding this comment.
i simplified / removed some utils from Saga. This was to help us with a flow issue but isn't necessary
| const fileName = yield* downloadAttachment('', message) | ||
| try { | ||
| yield* Saga.callPromise(showShareActionSheetFromFile, fileName, message.fileType) | ||
| yield showShareActionSheetFromFile(fileName) |
There was a problem hiding this comment.
note: TS caught the extra param here now
| if (pathItem.type === Types.PathType.File) { | ||
| const mimeType = yield* _loadMimeType(path) | ||
| pathItem = pathItem.set('mimeType', mimeType) | ||
| pathItem = pathItem.set('mimeType', mimeType || null) |
There was a problem hiding this comment.
correctly infers this can be undefined, which pathItem doesn't want
| .reduce(Constants.reduceRPCItemToPeopleItem, I.List()) | ||
|
|
||
| if (debugTodo) { | ||
| const allTodos: Array<RPCTypes.HomeScreenTodoType> = Object.values(RPCTypes.HomeScreenTodoType) |
There was a problem hiding this comment.
values is actually a mix of the numbers and the strings, so we need to be more explicit
|
Ts should have the fix in 363 microsoft/TypeScript#33168 |
|
@keybase/react-hackers this updates TS to 3.6 which will allow us to better type generators (etc). this is blocked on a perf regression w/ incremental builds which has been fixed but not deployed but our code can be reviewed in the meantime |
| import * as Router2Constants from '../constants/router2' | ||
| import HiddenString from '../util/hidden-string' | ||
| import logger from '../logger' | ||
| import _logger from '../logger' |
There was a problem hiding this comment.
this is because i have eslint warning us on variable shadowing. honestly most cases of _logger should likely go away and use the better saga logger instead
| ): I.List<Types.Ordinal> => { | ||
| if (direction === 'prepend') { | ||
| const oldStart = ordinals.size ? Types.ordinalToNumber(ordinals.first()) : firstOrdinal | ||
| const oldStart = ordinals.size ? Types.ordinalToNumber(ordinals.first() as Types.Ordinal) : firstOrdinal |
There was a problem hiding this comment.
is this working around a bug or ignoring the fact that ordinals could be empty?
There was a problem hiding this comment.
TS doesn't understand that checking size means first() is non null
|
@keybase/react-hackers bump. previously approved but did a small merge master / updated to 3.6.3 |
Updates TS