fusionjs / fusion-plugin-rpc-redux-react

Migrated to https://github.com/fusionjs/fusionjs
MIT License
4 stars 17 forks source link

Fix Flow complaints #110

Closed AlexMSmithCA closed 6 years ago

AlexMSmithCA commented 6 years ago

Fixes the following complaints:

$ /Users/amsmith/Code/GitHub/fusion-plugin-rpc-redux-react/node_modules/.bin/flow
Launching Flow server for /Users/amsmith/Code/GitHub/fusion-plugin-rpc-redux-react
Spawned flow server (pid=25771)
Logs will go to /private/tmp/flow/zSUserszSamsmithzSCodezSGitHubzSfusion-plugin-rpc-redux-react.log
Monitor logs will go to /private/tmp/flow/zSUserszSamsmithzSCodezSGitHubzSfusion-plugin-rpc-redux-react.monitor_log
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/__tests__/index.node.js:56:32

Cannot call RPCRedux.from with mockCtx bound to ctx because:
 • Either property element is missing in object literal [1] but exists in object type [2].
 • Or property accept is missing in object literal [1] but exists in Context [3].

     src/__tests__/index.node.js
     53│
     54│   const RPCRedux = getService(appCreator, Plugin);
 [1] 55│   const mockCtx = {headers: {}, memoized: new Map()};
     56│   t.equal(typeof RPCRedux.from(mockCtx).request, 'function');
     57│   t.end();
     58│ });
     59│

     node_modules/fusion-core/src/types.js
 [3] 10│ type ExtendedKoaContext = KoaContext & {memoized: Map<Object, mixed>};
     11│
     12│ export type SanitizedHTMLWrapper = Object;
     13│
 [2] 14│ export type SSRContext = {
     15│   element: any,
     16│   template: {
     17│     htmlAttrs: Object,
     18│     title: string,
     19│     head: Array<SanitizedHTMLWrapper>,
     20│     body: Array<SanitizedHTMLWrapper>,
     21│   },
     22│ } & ExtendedKoaContext;

Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/__tests__/index.node.js:72:32

Cannot call RPCRedux.from with mockCtx bound to ctx because:
 • Either property element is missing in object literal [1] but exists in object type [2].
 • Or property accept is missing in object literal [1] but exists in Context [3].

     src/__tests__/index.node.js
     69│
     70│   const RPCRedux = getService(appCreator, mock);
 [1] 71│   const mockCtx = {headers: {}, memoized: new Map()};
     72│   t.equal(typeof RPCRedux.from(mockCtx).request, 'function');
     73│   t.end();
     74│ });
     75│

     node_modules/fusion-core/src/types.js
 [3] 10│ type ExtendedKoaContext = KoaContext & {memoized: Map<Object, mixed>};
     11│
     12│ export type SanitizedHTMLWrapper = Object;
     13│
 [2] 14│ export type SSRContext = {
     15│   element: any,
     16│   template: {
     17│     htmlAttrs: Object,
     18│     title: string,
     19│     head: Array<SanitizedHTMLWrapper>,
     20│     body: Array<SanitizedHTMLWrapper>,
     21│   },
     22│ } & ExtendedKoaContext;

Found 2 errors
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
codecov[bot] commented 6 years ago

Codecov Report

Merging #110 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #110   +/-   ##
=======================================
  Coverage   96.29%   96.29%           
=======================================
  Files           2        2           
  Lines          27       27           
  Branches        4        4           
=======================================
  Hits           26       26           
  Partials        1        1

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e16e0eb...62c7637. Read the comment docs.