Skip to content

Instantly share code, notes, and snippets.

@goodmind
Created July 9, 2019 01:38
Show Gist options
  • Save goodmind/4f66365f38cbd8cbd39e35c9932c2282 to your computer and use it in GitHub Desktop.
Save goodmind/4f66365f38cbd8cbd39e35c9932c2282 to your computer and use it in GitHub Desktop.
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ URLSearchParams.js:8:19
Cannot assign params.get(...) to b because null [1] is incompatible with string [2].
URLSearchParams.js
5│
6│ // get
7│ const a: null | string = params.get('foo'); // correct
[2] 8│ const b: string = params.get('foo'); // incorrect
9│
/private/tmp/flow/flowlib_2ed73f4f/bom.js
[1] 1024│ get(name: string): null | string;
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ URLSearchParams.js
Cannot assign params.get(...) to b because null [1] is incompatible with string [2].
URLSearchParams.js
│ // get
│ const a: null | string = params.get('foo'); // correct
[2] │ const b: string = params.get('foo'); // incorrect
/private/tmp/flow/flowlib_2ed73f4f/bom.js
[1] │ get(name: string): null | string;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment