{"_id":"babel-type-scopes","_rev":"4-06edc4c52dd795ed7315b14c7288441d","name":"babel-type-scopes","description":"Utils for looking up and working with Flow & TypeScript scopes in Babel","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"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":"https://registry.npmjs.org/babel-type-scopes/-/babel-type-scopes-1.0.0.tgz","integrity":"sha512-MPHthcN4IyaxIB8DpapnXd5eFJA51a92JpCrjblNkR2+/eAfYVrmZOWhczyxinIWvW0akRUFtHPx49qq86iIyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG4TUp1ShT/uLvepLfPV8fC+LUw3H7L9IjyIkwtXdrmeAiAGiAh9gZ6FvKL1XcBym5x/faAgaVf+vmaHfPQlLHv1CA=="}]},"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":{}},"1.1.0":{"name":"babel-type-scopes","version":"1.1.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":"0ac161160c8ae54687da9a8acd44927c401a0037","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.1.0","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"integrity":"sha512-8VMsHzoLTrmaSh+48STqsHCdJlkj1UeC6MqYoc2pZm6nzRXQXQUEdow/ZUrlD1xOCYbjyAcpkkqb/ktuuKJ/jQ==","shasum":"040228035d5c3205036f38aa4c594fb831c2366a","tarball":"https://registry.npmjs.org/babel-type-scopes/-/babel-type-scopes-1.1.0.tgz","fileCount":4,"unpackedSize":5838,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbIbQcCRA9TVsSAnZWagAAQfQP/3IyQDERm3nEsddZSn4R\nxXD9DssuCy8kftA4uyGa8iLD6m4B13MHWHLZVWzuRnaWf87UgS5pbeI15VlU\nuKWzAm1kzyRKgY5oLkXfB8Ki4UjlTiht6Xnxa9QMmEdPQMcfDcNOqtb4FGmD\nOazT8VRyUilprKYiubBEeOtwaJEMghO9J4Qk1ueAlcg6ogEJHukwDEKw+mfI\nKsk9D5956+LLgPmRLdSpy9YQRQ5+VGJtdKkxMb1Q0VsXE0PC/lAxhTf3Ib5C\nZ08RAMVeD2lfn9YLfC9cinnbkE3jTdwr6i6Z3fLJiLqNMNPK6dM/f5JAa9FF\nCiYahYnAa/7PNf0tKNDJ1EokLmtdVkZtNNL2D3WfwLItV09V33IAkehjvfN2\nuz6vMmWCYrPEXUu/4BmR9/usnmT5XvDz4R4hC9Fm+6rmbD0vUKa8NTml25Dz\nQCkvyNl9GaxqgmLjK+BZ/6pQPmWAhkvugDAO5CwCEs35qtVHsXVLlPWLfeLa\naO4sDDP03OsYUTQfOdeh6CGQ8oBatTDIc6osDd1ycOFZ/CcPgnq7urJJdp2y\nj8o2Oh7QJK59ZGGhVvdoaNV5lw8In7CuCwJlsRgdqDXixT7trqTvLqRb9H9l\nNiHDdEyR45fqBOOGt2Htqrlz+bER3lBRlszXDUQC+9HBkOlrxgBmA5jkELKf\n6ffY\r\n=+oBo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVlG3dQmhByowlvdqgQBEKKoIZ5yBH36NPB0o3QLk/swIgajDZVV2zxnqrnC4dxWOMl6w7ibSDV3UIWzUWw9Ypfco="}]},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-type-scopes_1.1.0_1528935451281_0.5940703875195443"},"_hasShrinkwrap":false}},"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","maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"time":{"modified":"2022-06-13T04:08:29.998Z","created":"2017-09-01T05:43:17.801Z","1.0.0":"2017-09-01T05:43:17.801Z","1.1.0":"2018-06-14T00:17:31.369Z"},"homepage":"https://github.com/babel-utils/babel-type-scopes#readme","keywords":["babel","utils","flow","typescript","scope","binding"],"repository":{"type":"git","url":"git+https://github.com/babel-utils/babel-type-scopes.git"},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"bugs":{"url":"https://github.com/babel-utils/babel-type-scopes/issues"},"license":"MIT","readmeFilename":"README.md"}