🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

babel-flow-scope

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-flow-scope

Collect Flow bindings in a given scope

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

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.

FAQs

Package last updated on 05 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts