Flow Types with Meteor proof of concept
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.interfaces
.meteor
.flowconfig
LICENSE
README.md
meteor-flow-types.css
meteor-flow-types.html
meteor-flow-types.js

README.md

Flow Types with Meteor

How to use

  1. Clone this repo
  2. Install Flow
  3. Run flow check

How it works

The .interfaces folder contains an partial example definition for Mongo.Collection. Because in Meteor the globals are just available, we need to use the undocumented syntax $Exports<'moduleName' to declare the available globals. This has been pointed out here.

Converting Typescript definitions to Flow

The syntax is quiet similar. Some replacements:

  • interface -> declare class
  • var -> declare var
  • Remove Static var declarations that have the same name as a class declaration

The full Meteor Typescript definition can be found here.