{"_id":"@avocode/flow-to-ts","_rev":"17-91e2eac1f5e49b770431b9dc952c646a","name":"@avocode/flow-to-ts","dist-tags":{"latest":"0.5.3"},"versions":{"0.5.3":{"name":"@avocode/flow-to-ts","version":"0.5.3","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/khan/flow-to-ts.git"},"main":"dist/convert.js","bin":{"flow-to-ts":"bin/flow-to-ts.js"},"license":"MIT","dependencies":{"commander":"^2.19.0","glob":"^7.1.6","prettier":"2.2.1","trim-right":"^1.0.1"},"devDependencies":{"@babel/core":"^7.13.10","@babel/plugin-proposal-class-properties":"^7.13.0","@babel/plugin-proposal-decorators":"^7.13.5","@babel/plugin-transform-flow-strip-types":"^7.13.0","@babel/plugin-transform-typescript":"^7.13.0","@babel/preset-env":"^7.13.10","@babel/preset-flow":"^7.12.13","@babel/preset-typescript":"^7.13.0","@types/jest":"^26.0.20","@types/prettier":"^2.2.3","@types/typescript":"^2.0.0","babel-loader":"^8.2.2","babel-plugin-module-resolver":"^4.1.0","codecov":"^3.2.0","flow-bin":"^0.98.0","husky":"^1.3.1","jest":"^26.6.3","jest-mock-console":"^0.4.2","jest-mock-process":"^1.2.0","tmp":"^0.1.0","ts-jest":"^26.5.4","typescript":"^4.2.3","webpack":"^5.27.0","webpack-cli":"^4.5.0"},"scripts":{"prepare":"git submodule update --init --recursive && cd babel && yarn install && cd ..","prepublishOnly":"webpack build","build":"webpack build","type-check":"tsc --project tsconfig.json","watch":"tsc --watch --project tsconfig.json","test":"jest","coverage":"jest --coverage","pretty-quick":"prettier src/*.ts test/*.ts playground/src/*.tsx --write","pretty-tests":"prettier ./test/fixtures/**/ts.js --parser typescript --write && prettier ./test/fixtures/**/flow.js --parser flow --write"},"husky":{"hooks":{"pre-push":"npm test","pre-commit":"npm run pretty-quick && npm run pretty-tests"}},"jest":{"setupFilesAfterEnv":["jest-mock-console/dist/setupTestFramework.js"]},"gitHead":"e5a934a0fe4c6c26e3ba93a2bfd719c6909f4a8b","description":"[![Actions Status](https://github.com/Khan/flow-to-ts/workflows/Node%20CI/badge.svg)](https://github.com/Khan/flow-to-ts/actions) [![codecov](https://codecov.io/gh/Khan/flow-to-ts/branch/master/graph/badge.svg)](https://codecov.io/gh/Khan/flow-to-ts) [![n","bugs":{"url":"https://github.com/khan/flow-to-ts/issues"},"homepage":"https://github.com/khan/flow-to-ts#readme","_id":"@avocode/flow-to-ts@0.5.3","_nodeVersion":"14.15.2","_npmVersion":"6.14.9","dist":{"integrity":"sha512-z8Z3El5fNuBmkhWLIDn0a+hedl6eEGvs6JP32WCq4PisAlFnx2Ex315F9uqBV4pd1nGLBqQmCscgVmnIPfYOgg==","shasum":"aa004b0164ff46632ff080060c891cdc7ae335dd","tarball":"https://registry.npmjs.org/@avocode/flow-to-ts/-/flow-to-ts-0.5.3.tgz","fileCount":5,"unpackedSize":19874368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCqjsCRA9TVsSAnZWagAAQFoP/RTdTy968w6gU4qnywWc\n9OrqFAAPNb4vCIWyjgChgXBOI4a9Pyw8TRBa+OrsFMpJbuU1uA2vO8X+kyUt\nrj9XkWiM8SRa+0AZ7c2/rjCRuVujd6sdB/mvKfWMsfI/z57+BAWTsyLE55h5\nizPRSb4Rhkidd+Mh6Ao1UxCoMOa2nzQZILhMDPzdqAKgyPdYJaif+ZXp7MZp\nvCrnVv55Uxw7UKE0/fulHI0iFtWaMSdRRLOQfSv84nAOpwGPkv0eMllVzGBe\nYLLN23FcNomIqLChtIqdOUV1tOErZW8HxXyap37RuKZ+IWgXtCYLe9itXmcO\nlctK5HL1G+udWD1/k7V/Xgdtqe5AizZnRKzB/nbDLSkCen905Z6ojhDdreeb\niQkRpSbu1IfJ1xnip9yiemyDNkwpl8FQ+uit+GsL6QqyJESboc4MO4IFZlIS\n4JOIFNCffVvbe9GJjobmYdRAzLZHD2uGDpb2G9SRpPm0RpI37oLX1paqqRVQ\n8XontR+CEXeRFj+rTzW7h4x1phnN6A4cK+C9XUt0WyKA0CMeKpKdfxY23yXm\nnW8cwjxBtS1rHXhFFCJuenlDy9KC0bMiK1AzB46+ooakPCjATWF0Ss2zA6n3\nhM7wzrlsNUtNRFLNqcyGjaNhYaLkIguD9pixtSTFxVUd0VdCUv65tskncC/c\njGq7\r\n=K7QV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHJSjafBQM01LHl09yiojPeKXYFDkZKdqsb0zmh/Jt/DAiEArgsbi4J5dOZ9LBZL/ieEX0QIHvBQmKM8cRoIMFheQo8="}]},"_npmUser":{"name":"jankuca","email":"jan@jankuca.com"},"directories":{},"maintainers":[{"name":"petrbrzek","email":"petrbrzek@abdoc.net"},{"name":"jankuca","email":"jan@jankuca.com"},{"name":"jakubzitny","email":"jakubzitny@avocode.com"},{"name":"vojtatranta","email":"vojta.tranta@gmail.com"},{"name":"rychlis","email":"tom@avocode.com"},{"name":"nikitamironov","email":"nikitamironov@avocode.com"},{"name":"koty","email":"info@vojtechkotrba.cz"},{"name":"durk0","email":"martinduris@avocode.com"},{"name":"janroztocil","email":"janroztocil@avocode.com"},{"name":"avocode-ci","email":"tom+avocodeci@avocode.com"},{"name":"slinto","email":"hello@slinto.sk"},{"name":"ondraspala","email":"ondrejspala@avocode.com"},{"name":"marekcerny","email":"marekcerny@avocode.com"},{"name":"viktorchlumsky","email":"viktorchlumsky@avocode.com"},{"name":"tomasrebro","email":"rebrotomas@hotmail.sk"},{"name":"danielmelo","email":"danielmelo@avocode.com"},{"name":"bellathewitch","email":"isabella@skorepova.info"},{"name":"rojcyk","email":"hello@rojcyk.com"},{"name":"pavelsusicky","email":"susicky.pavel@outlook.cz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flow-to-ts_0.5.3_1628088556437_0.1789563730248933"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-04T14:49:16.393Z","0.5.3":"2021-08-04T14:49:16.633Z","modified":"2023-10-03T13:35:27.394Z"},"maintainers":[{"email":"tom+avocodeci@avocode.com","name":"avocode-ci"},{"email":"rebrotomas@hotmail.sk","name":"tomasrebro"},{"email":"isabella@skorepova.info","name":"bellathewitch"}],"description":"[![Actions Status](https://github.com/Khan/flow-to-ts/workflows/Node%20CI/badge.svg)](https://github.com/Khan/flow-to-ts/actions) [![codecov](https://codecov.io/gh/Khan/flow-to-ts/branch/master/graph/badge.svg)](https://codecov.io/gh/Khan/flow-to-ts) [![n","homepage":"https://github.com/khan/flow-to-ts#readme","repository":{"type":"git","url":"git+https://github.com/khan/flow-to-ts.git"},"bugs":{"url":"https://github.com/khan/flow-to-ts/issues"},"license":"MIT","readme":"# flow-to-ts\n\n[![Actions Status](https://github.com/Khan/flow-to-ts/workflows/Node%20CI/badge.svg)](https://github.com/Khan/flow-to-ts/actions)\n[![codecov](https://codecov.io/gh/Khan/flow-to-ts/branch/master/graph/badge.svg)](https://codecov.io/gh/Khan/flow-to-ts)\n[![npm version](https://badge.fury.io/js/%40khanacademy%2Fflow-to-ts.svg)](https://badge.fury.io/js/%40khanacademy%2Fflow-to-ts)\n\nConvert Flow code to TypeScript.\n\n> :warning: This is a WIP and many things still do not work properly.  There\n> may also be the odd regression from time to time as work progresses.\n\nThe goal of this project is to provide a tool that can translate 95% of Flow\nto TypeScript while maintaining a high percentage of the existing type\ninformation. We don't want to convert code and end up with everything using\n`any`. We also want to avoid having to make a lot of manual changes to files\nafterwards, e.g. changing `SyntheticEvent` to `React.Event`.\n\n# Quick start\n\n- `yarn global add @khanacademy/flow-to-ts`\n- `flow-to-ts [options] <file globs>`\n\nFor a comprehensive list of available options, please check out the [CLI code](./src/cli.ts).\n\n# Playground\n\nhttps://flow-to-ts.netlify.com\n\n# Principles\n\n- when exact translation isn't possible:\n  - downgrade to `any` when possible and provide a gentle warning\n  - when it isn't possible to downgrade (e.g. `%checks`), remove the syntax\n    and provide a forceful warning that the code in question will need a human\n    to convert it manually.\n- best effort to maintain blank lines and the position comments, this isn't\n  always possible so warn in those situations where we can't, e.g. converting\n  object type spreads to intersection types.\n\n# Contributing\n\n## Bugs\n\nBug reports for converting Flow to TypeScript should include a link to the\nplayground with an example of a minimal reproducible example of the bug.\n\n## Feature Requests\n\nFeature requests are welcome.\n\n## Pull Requests\n\nPlease make sure there is a GitHub issue first before creating a pull request\nexcept for small things. Also, please sign our [Contributor License Agreement](https://docs.google.com/forms/d/e/1FAIpQLSdyXYrc8ogVoA46J9KXyIj5nKlZzNkOnQG-4A1R7X_BWGTShQ/viewform).\n\nPull requests that fix a bug in the conversion code should include one or more\ntest cases and should have 100% diff coverage.\n\n## Dev quick start\n\n```bash\ngit clone git@github.com:Khan/flow-to-ts.git\ncd flow-to-ts\ngit submodule update --depth 1 --init -- babel\ncd babel\nyarn\ncd ..\nyarn\nyarn test\n```\n\n## Helpful resources\n\n- https://github.com/niieani/typescript-vs-flowtype\n- https://astexplorer.net/\n","readmeFilename":"README.md"}