babel-flow-scope
Collect Flow bindings in a given scope
Last updated 9 years ago by thejameskyle .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install babel-flow-scope 
SYNC missed versions from official npm registry.

babel-flow-scope

Collect Flow bindings in a given scope

import type foo from "mod";
type baz<bar> = {};
import {getFlowBindingsInScope} from 'babel-flow-scope';

getFlowBindingsInScope(path);
// {
//   foo: {
//     kind: 'import',
//     path: (Identifier)
//   },
//   bar: {
//     kind: 'param',
//     path: (TypeParameter)
//   },
//   baz: {
//     kind: 'declaration',
//     path: (Identifier)
//   }
// }

API

getFlowScopePath(path)

Find the closest path to a Flow scope.

getFlowBindingsInScope(path)

Retreive all the Flow bindings in the local Flow scope.

findFlowBinding(path, name)

Search for a binding in the current scope and parent scopes.

Current Tags

  • 1.2.1                                ...           latest (9 years ago)

4 Versions

  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 3
Last Day 0
Last Week 2
Last Month 1
Dependencies (0)
None
Dev Dependencies (5)

Copyright 2013 - present © cnpmjs.org | Home |