Skip to content

Commit

Permalink
flow [nfc]: Use $FlowIgnore where we used to use `$FlowMigrationFud…
Browse files Browse the repository at this point in the history
…ge`.

As we said we'd do (in a recent commit that removed
`$FlowMigrationFudge`) as soon as `$FlowIgnore` became available.

Well, it's available now: the recent upgrade to Flow v0.128 brought
us facebook/flow@ba78ab9bf, which adds `$FlowIgnore` to the
standard/acceptable suppression syntax.
  • Loading branch information
chrisbobbe committed Mar 10, 2021
1 parent cf03b18 commit ccdd8f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/boot/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const migrations: {| [string]: (GlobalState) => GlobalState |} = {
...state,
accounts: state.accounts.map(a => ({
...a,
/* $FlowFixMe[prop-missing]: `a.realm` is a string until
/* $FlowIgnore[prop-missing]: `a.realm` is a string until
migration 15 */
realm: a.realm.replace(/\/+$/, ''),
})),
Expand Down Expand Up @@ -211,7 +211,7 @@ const migrations: {| [string]: (GlobalState) => GlobalState |} = {
...state,
accounts: state.accounts.map(a => ({
...a,
/* $FlowFixMe[incompatible-call]: `a.realm` will be a string
/* $FlowIgnore[incompatible-call]: `a.realm` will be a string
here */
realm: new URL(a.realm),
})),
Expand Down
6 changes: 3 additions & 3 deletions src/redux-persist-migrate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ export function createMigrationImpl(
throw new Error('createMigration: bad arguments');
}
if (action.type === REHYDRATE) {
// $FlowFixMe[prop-missing]
// $FlowFixMe[incompatible-exact]
/* $FlowFixMe[incompatible-type]
// $FlowIgnore[prop-missing]
// $FlowIgnore[incompatible-exact]
/* $FlowIgnore[incompatible-type]
this really is a lie -- and kind of central to migration */
const incomingState: State = action.payload;
const incomingVersion = parseInt(versionSelector(incomingState), 10);
Expand Down

0 comments on commit ccdd8f8

Please sign in to comment.