Meteor + stream

I played with all the tools / equipment I know to try to get Meteor and Flowtype friends to be friends. I made a meteor packet to launch the flow control panel as linter. It works, but brings more problems than it helps my project. The problem is that a thread does not have an easy way to declare all global libs interfaces, so when it checks my code, it does not know anything about Meteor or Session global variables. Should I convert the entire Meteor API to a stream interface? He also has problems to understand how we use to identify global vars in Meteor. enter image description here

Has anyone tried to fix these problems and how?

+5
source share
1 answer

You need a file.

You need to do the following:

Declare a .flowconfig file (it is automatically created when flow init starts).

Create a folder to store interface files that Meteor ignores, so it does not try to analyze it. Meteor ignores certain folder templates , so you can try mkdir .interfaces . Add the folder to the [libs] section of your .flowconfig , comme รงa:

 [libs] .interfaces/ 

Inside, you can create declarations for your global modules. To create it for Meteor, you can try touch .interfaces/meteor.js and write something on these lines:

 declare class Meteor { isClient: boolean; } 

Let me know if that works. The flow itself was still learning.

+3
source

Source: https://habr.com/ru/post/1239649/


All Articles