{
  "manifest": {
    "name": "ast-types-flow",
    "version": "0.0.8",
    "description": "Flow types for the Javascript AST",
    "main": "lib/types.js",
    "files": [
      "lib"
    ],
    "scripts": {
      "build": "gulp build",
      "test": "flow"
    },
    "repository": {
      "type": "git",
      "url": "git+https://github.com/kyldvs/ast-types-flow.git"
    },
    "keywords": [
      "flow",
      "ast",
      "javascript"
    ],
    "author": {
      "name": "kyldvs"
    },
    "license": "MIT",
    "bugs": {
      "url": "https://github.com/kyldvs/ast-types-flow/issues"
    },
    "homepage": "https://github.com/kyldvs/ast-types-flow#readme",
    "devDependencies": {
      "gulp": "^3.9.0",
      "gulp-util": "^3.0.6",
      "jscodeshift": "^0.3.7",
      "nuclide-node-transpiler": "0.0.30",
      "through2": "^2.0.0"
    },
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-ast-types-flow-0.0.8-0a85e1c92695769ac13a428bb653e7538bea27d6-integrity/node_modules/ast-types-flow/package.json",
    "readmeFilename": "README.md",
    "readme": "# ast-types-flow\n\nFlow types for the Javascript AST. Based off of [benjamn/ast-types](https://github.com/benjamn/ast-types).\n\n## Usage\n\nFirst install `ast-types-flow` via npm, then you can import any of the types\nthat are exported.\n\n```javascript\n/* @flow */\n\nimport type {Node} from 'ast-types-flow';\n\nfunction getName(node: Node): string {\n  switch (node.type) {\n    case 'Identifier':\n      return node.name;\n\n    case 'ClassDeclaration':\n      return node.id.name; // Error, id could be null.\n\n    case 'FunctionDeclaration':\n      return node.id.name; // Fine if it's always there.\n\n    case 'FunctionExpression':\n      if (node.id) {\n        return node.id.name; // Can refine id to make sure it exists.\n      } else {\n        return 'Unknown';\n      }\n\n    case 'Literal':\n      return node.name; // Error, Literals don't have names, don't be silly.\n  }\n  return 'Unknown';\n}\n```\n\n## How it works\n\nA notion of \"extends\" is added to the Flow syntax via comments. A transform is\nincluded that will compile the source code into useful disjoint union types\nbased on how the different types extend each other. For example:\n\n```javascript\ntype Node = {\n  common: string,\n};\n\ntype Foo = {\n  // extends Node\n  foo: string,\n};\n\ntype Bar = {\n  // extends Node\n  bar: number,\n};\n```\n\nWill be transformed into:\n\n```javascript\ntype Node = {\n  type: 'Foo',\n  _Foo: void,\n  common: string,\n  foo: string,\n} | {\n  type: 'Bar',\n  _Bar: void,\n  common: string,\n  bar: number,\n};\n\ntype Foo = {\n  type: 'Foo',\n  _Foo: void,\n  common: string,\n  foo: string,\n};\n\ntype Bar = {\n  type: 'Bar',\n  _Foo: void,\n  common: string,\n  bar: number,\n};\n```\n\nA few things to note:\n\n1. The type `Node` would more ideally be compiled into `Foo | Bar` but then the\ndisjoint union cannot be properly refined. For now we have to duplicate the\ncomplete definitions.\n2. Each entry in a disjoint union has to be structurally unique or Flow will\nhave an error on the definition. That is why the private `_Foo: void` fields\nappear in the types.\n",
    "licenseText": "MIT License\n\nCopyright (c) 2018 Kyle Davis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.8.tgz#0a85e1c92695769ac13a428bb653e7538bea27d6",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.8.tgz",
    "hash": "0a85e1c92695769ac13a428bb653e7538bea27d6",
    "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==",
    "registry": "npm",
    "packageName": "ast-types-flow",
    "cacheIntegrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ== sha1-CoXhySaVdprBOkKLtlPnU4vqJ9Y="
  },
  "registry": "npm",
  "hash": "0a85e1c92695769ac13a428bb653e7538bea27d6"
}