{"name":"babel-type-scopes","version":"1.0.0","description":"Utils for looking up and working with Flow & TypeScript scopes in Babel","main":"index.js","repository":{"type":"git","url":"git+https://github.com/babel-utils/babel-type-scopes.git"},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","files":["index.js"],"keywords":["babel","utils","flow","typescript","scope","binding"],"scripts":{"test":"jest"},"dependencies":{"babel-flow-types":"^1.2.1"},"devDependencies":{"babel-core":"^7.0.0-alpha.19","babylon-options":"^1.1.2","flow-bin":"^0.53.1","jest":"^20.0.4","jest-in-case":"^1.0.1"},"gitHead":"43a912f1e6a7e060c4f1f6f241db8d594d302174","bugs":{"url":"https://github.com/babel-utils/babel-type-scopes/issues"},"homepage":"https://github.com/babel-utils/babel-type-scopes#readme","_id":"babel-type-scopes@1.0.0","_shasum":"53c7e035a0e4129b2c58b1ecb402d78cbe7e6a11","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"53c7e035a0e4129b2c58b1ecb402d78cbe7e6a11","tarball":"http://registry-npm.ywwl.com/babel-type-scopes/download/babel-type-scopes-1.0.0.tgz","integrity":"sha512-MPHthcN4IyaxIB8DpapnXd5eFJA51a92JpCrjblNkR2+/eAfYVrmZOWhczyxinIWvW0akRUFtHPx49qq86iIyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG4TUp1ShT/uLvepLfPV8fC+LUw3H7L9IjyIkwtXdrmeAiAGiAh9gZ6FvKL1XcBym5x/faAgaVf+vmaHfPQlLHv1CA=="}],"size":2880,"noattachment":false,"key":"/babel-type-scopes/-/babel-type-scopes-1.0.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-type-scopes-1.0.0.tgz_1504244597724_0.1543286037631333"},"directories":{},"readme":"# babel-type-scopes\n\n> Utils for looking up and working with Flow & TypeScript scopes in Babel\n\n```js\nimport {\n  isTypeScope,\n  getClosestTypeScopePath,\n  getOwnTypeBindings,\n  getTypeBinding,\n} from 'babel-type-scopes';\n\nisTypeScope(path); // true | false\ngetClosestTypeScopePath(path); // (Path)\ngetOwnTypeBindings(path) // { foo: { kind, path, id }, bar: { kind, path, id } }\ngetTypeBinding(path, 'foo') // { kind, path, id }\n```\n\n## Installation\n\n```sh\nyarn add babel-type-scopes\n```\n\n## API\n\n#### `isTypeScope(path: Path) => boolean`\n\nCheck if a path creates a type scope.\n\n#### `getClosestTypeScope(path: Path) => Path`\n\nFind the closest path to a type scope.\n\n#### `getOwnTypeBindings(path: Path) => Bindings`\n\nFind the closest path to a type scope.\n\n#### `getTypeBinding(path: Path) => Binding`\n\nSearch for a binding in the current scope and parent scopes.\n\n### Types\n\n#### `Binding`\n\n```js\ntype Binding = {\n  kind: 'import' | 'declaration' | 'expression' | 'param',\n  path: Path,\n  id: Path,\n};\n```\n\n#### `Bindings`\n\n```js\ntype Bindings = { [name: string]: Binding };\n```\n","publish_time":1504244597801,"_cnpm_publish_time":1504244597801,"dist-tags":{"latest":"1.1.0"}}