anirudhjain75
6/17/2019 - 9:02 AM

Flow errors

Flow errors

Anirudhs-MacBook-Pro:alias cynide$ yarn run flow .
yarn run v1.15.2
$ /Users/cynide/Documents/Projects/musicbrainz-server/node_modules/.bin/flow .
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ root/static/scripts/common/utility/displayLinkAttribute.js:31:16

Cannot call l with object literal bound to the second parameter because string [1] is incompatible with T [2] in
property value.

     root/static/scripts/common/utility/displayLinkAttribute.js
      26│   if (type.free_text) {
      27│     const textValue = clean(attribute.text_value);
      28│     if (textValue) {
      29│       value = l('{attribute}: {value}', {
      30│         attribute: value,
      31│         value: textValue,
      32│       });
      33│     }
      34│   }
      35│

     /private/tmp/flow/flowlib_5811481/core.js
 [1] 313│     replace(searchValue: string | RegExp, replaceValue: string | (substring: string, ...args: Array<any>) => string): string;

     root/static/scripts/common/i18n/expand2.js
 [2]  33│ export type VarArgsObject<+T> = {__proto__: any, +[string]: T};


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ root/static/scripts/common/utility/displayLinkAttribute.js:41:22

Cannot call l with object literal bound to the second parameter because string [1] is incompatible with T [2] in
property credited_as.

     root/static/scripts/common/utility/displayLinkAttribute.js
      36│   if (type.creditable) {
      37│     const credit = clean(attribute.credited_as);
      38│     if (credit) {
      39│       value = l('{attribute} [{credited_as}]', {
      40│         attribute: value,
      41│         credited_as: credit,
      42│       });
      43│     }
      44│   }
      45│

     /private/tmp/flow/flowlib_5811481/core.js
 [1] 313│     replace(searchValue: string | RegExp, replaceValue: string | (substring: string, ...args: Array<any>) => string): string;

     root/static/scripts/common/i18n/expand2.js
 [2]  33│ export type VarArgsObject<+T> = {__proto__: any, +[string]: T};


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ root/static/scripts/edit/utility/diffArtistCredits.js:50:5

Cannot call editDiff with oldArtistCredit bound to oldSide because ArtistCreditT [1] is incompatible with read-only
array type [2].

     root/static/scripts/edit/utility/diffArtistCredits.js
 [1] 46│   oldArtistCredit: ArtistCreditT,
     47│   newArtistCredit: ArtistCreditT,
     48│ ) {
     49│   const diffs = editDiff(
     50│     oldArtistCredit,
     51│     newArtistCredit,
     52│     cmpArtistCreditNames,
     53│   );

     root/static/scripts/edit/utility/editDiff.js
 [2] 53│   oldSide: $ReadOnlyArray<T>,


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ root/static/scripts/edit/utility/diffArtistCredits.js:51:5

Cannot call editDiff with newArtistCredit bound to newSide because ArtistCreditT [1] is incompatible with read-only
array type [2].

     root/static/scripts/edit/utility/diffArtistCredits.js
 [1] 47│   newArtistCredit: ArtistCreditT,
     48│ ) {
     49│   const diffs = editDiff(
     50│     oldArtistCredit,
     51│     newArtistCredit,
     52│     cmpArtistCreditNames,
     53│   );
     54│

     root/static/scripts/edit/utility/editDiff.js
 [2] 54│   newSide: $ReadOnlyArray<T>,



Found 4 errors
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.