Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow error: Cannot assign function to match because: #62

Closed
schumannd opened this issue Mar 12, 2019 · 3 comments
Closed

Flow error: Cannot assign function to match because: #62

schumannd opened this issue Mar 12, 2019 · 3 comments

Comments

@schumannd
Copy link

schumannd commented Mar 12, 2019

Full error:


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/simple-markdown/simple-markdown.js:465:39

Cannot assign function to match because:
 • property 0 is missing in object type [1] but exists in Capture [2] in the return value.
 • ... 1 more error.

     node_modules/simple-markdown/simple-markdown.js
 [2]  78│ ) => ?Capture;
        :
     462│
     463│ // Creates a match function for an inline scoped element from a regex
     464│ var inlineRegex = function(regex /* : RegExp */) {
     465│     var match /* : MatchFunction */ = function(source, state) {
     466│         if (state.inline) {
     467│             return regex.exec(source);
     468│         } else {
     469│             return null;
     470│         }
     471│     };
     472│     match.regex = regex;
     473│     return match;
     474│ };

     /private/tmp/flow/flowlib_102fce2d/core.js
 [1] 288│ type RegExp$matchResult = Array<string> & {index: number, input: string, groups: ?{[name: string]: string}};

I am using flow version 0.86

Edit:
there are a few more errors flow 0.86 complains about. If there is interest, I can post their error messages as well.

@ariabuckles
Copy link
Owner

Thanks! I haven't upgraded flow to latest myself; it looks like they improved their regexp match type. I'll look into fixing this and whatever other issues show in flow 0.86+

@ariabuckles ariabuckles self-assigned this Mar 13, 2019
@ariabuckles
Copy link
Owner

ariabuckles commented Mar 13, 2019

Just published 0.4.3 which should fix this! Please let me know if your app runs into any trouble with the new types!~

@ariabuckles ariabuckles removed their assignment Mar 13, 2019
@schumannd
Copy link
Author

Wow thank you so much for the quick response!

I tried it and it works perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants