{"_id":"@dww/reasonably-typed","_rev":"2-734f0eeb8a0b95202d4effe5e178a820","name":"@dww/reasonably-typed","description":"Converts flow definitions to Bucklescript definitions","dist-tags":{"latest":"0.11.1-1"},"versions":{"0.11.1":{"name":"@dww/reasonably-typed","version":"0.11.1","description":"Converts flow definitions to Bucklescript definitions","bin":{"retyped":"./lib/cli.js"},"main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/rrdelaney/ReasonablyTyped.git"},"keywords":["Reason","OCaml","Bucklescript","Flow"],"author":{"name":"Ryan Delaney","email":"rrdelaney@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/rrdelaney/ReasonablyTyped/issues"},"homepage":"https://github.com/rrdelaney/ReasonablyTyped","files":["lib/cli.js","lib/index.js","lib/retyped_node.js"],"dependencies":{"babel-code-frame":"^6.26.0","chalk":"^2.1.0","flowgen":"^1.2.0","meow":"^3.7.0","reasonable-flowgen":"^0.1.3","refmt":"^1.13.7"},"scripts":{"build:native":"jbuilder build src/cli.exe","build:js":"jbuilder build src/retyped_node.bc.js && cp _build/default/src/retyped_node.bc.js lib/retyped_node.js","ctp":"jbuilder build src/cli.exe && ./_build/default/src/cli.exe _test.js","pretest":"jbuilder clean && jbuilder build src/test.exe src/retyped_node.bc.js && cp _build/default/src/retyped_node.bc.js lib/retyped_node.js","test":"jest && ./build/default/src/test.exe","precommit":"lint-staged"},"devDependencies":{"glob":"^7.1.2","husky":"^0.14.3","jest":"^20.0.4","jest-cli":"^20.0.4","lint-staged":"^4.0.2","prettier":"^1.5.3"},"lint-staged":{"*.js":["prettier --no-semi --single-quote --write","git add"]},"jest":{"testPathIgnorePatterns":["/node_modules/","/flow/","/reason-tools/","/fixtures/","/flow-typed/","/definitely-typed/"],"modulePathIgnorePatterns":["/flow/"],"transformIgnorePatterns":["/node_modules/","/lib/"]},"directories":{"doc":"docs","lib":"lib"},"gitHead":"808c4f9b31c901a0ae2dc1e6b35fc9b81c5130d4","_id":"@dww/reasonably-typed@0.11.1","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"dww","email":"dwwoelfel@gmail.com"},"dist":{"integrity":"sha512-SIOsWwnMorYGB+6omgsVL0wGM0JoCh7IPuVzRvETXv/Vctvjz1jkMROQPcvcrbQKKoGFO0MWG6r8ytDeFmMOiQ==","shasum":"95cf28ef7cc31d4a5bb1c8dd5a07a0a24afb7c19","tarball":"https://registry.npmjs.org/@dww/reasonably-typed/-/reasonably-typed-0.11.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICu1WwFfO+nsPxw+DA72Un2nTxlDIMwzsrnrIwV5HyrrAiEAuxvZeBjDC4olYyYvE7ZdBcm5YK8AnbvT3Pvy4htpha4="}]},"maintainers":[{"name":"dww","email":"dwwoelfel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reasonably-typed-0.11.1.tgz_1506897548282_0.5325306341983378"}},"0.11.1-1":{"name":"@dww/reasonably-typed","version":"0.11.1-1","description":"Converts flow definitions to Bucklescript definitions","bin":{"retyped":"./lib/cli.js"},"main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/rrdelaney/ReasonablyTyped.git"},"keywords":["Reason","OCaml","Bucklescript","Flow"],"author":{"name":"Ryan Delaney","email":"rrdelaney@outlook.com"},"license":"MIT","bugs":{"url":"https://github.com/rrdelaney/ReasonablyTyped/issues"},"homepage":"https://github.com/rrdelaney/ReasonablyTyped","files":["lib/cli.js","lib/index.js","lib/retyped_node.js"],"dependencies":{"babel-code-frame":"^6.26.0","chalk":"^2.1.0","flowgen":"^1.2.0","meow":"^3.7.0","reasonable-flowgen":"^0.1.3","refmt":"^1.13.7"},"scripts":{"build:native":"jbuilder build src/cli.exe","build:js":"jbuilder build src/retyped_node.bc.js && cp _build/default/src/retyped_node.bc.js lib/retyped_node.js","ctp":"jbuilder build src/cli.exe && ./_build/default/src/cli.exe _test.js","pretest":"jbuilder clean && jbuilder build src/test.exe src/retyped_node.bc.js && cp _build/default/src/retyped_node.bc.js lib/retyped_node.js","test":"jest && ./build/default/src/test.exe","precommit":"lint-staged"},"devDependencies":{"glob":"^7.1.2","husky":"^0.14.3","jest":"^20.0.4","jest-cli":"^20.0.4","lint-staged":"^4.0.2","prettier":"^1.5.3"},"lint-staged":{"*.js":["prettier --no-semi --single-quote --write","git add"]},"jest":{"testPathIgnorePatterns":["/node_modules/","/flow/","/reason-tools/","/fixtures/","/flow-typed/","/definitely-typed/"],"modulePathIgnorePatterns":["/flow/"],"transformIgnorePatterns":["/node_modules/","/lib/"]},"directories":{"doc":"docs","lib":"lib"},"gitHead":"808c4f9b31c901a0ae2dc1e6b35fc9b81c5130d4","_id":"@dww/reasonably-typed@0.11.1-1","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"dww","email":"dwwoelfel@gmail.com"},"dist":{"integrity":"sha512-vTqjWPG44yG2LN4p4tBE3aVb7a+RN1FNlPq5sf9005fXcLA1Pxp49DWJTMA0DgsUpx/O+xm2FxxGP9E8Goc9CA==","shasum":"633bf6a16dead749bc5ae3015149079f7271f36c","tarball":"https://registry.npmjs.org/@dww/reasonably-typed/-/reasonably-typed-0.11.1-1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZLw6AClzF+k4zcLV6tGZ+l5AnVqAwAX3qqixfOpaA5QIhAJ4UCjBW0e6RIi5kOlef3WDvYE5kVHNuqT/DD0ARhaGb"}]},"maintainers":[{"name":"dww","email":"dwwoelfel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reasonably-typed-0.11.1-1.tgz_1506898322909_0.508896719198674"}}},"readme":"<h1 align=\"center\"><img src=\"https://github.com/rrdelaney/ReasonablyTyped/raw/master/docs/logo.png\"></h1>\n\n<pre align=\"center\">\n  $ npm install --global reasonably-typed\n</pre>\n\n<h4 align=\"center\"><i>Converts TypeScript and Flow definitions to Reason interfaces</i></h4>\n\n<hr>\n\n<h3 align=\"center\">Take your Flow or TypeScript definition</h3>\n\n```js\n// class.js\ndeclare module 'classes' {\n  declare type State = {\n    id: number,\n    storeName: string\n  };\n\n  declare export class Store {\n    constructor(initialState: State): Store;\n    state: State;\n    update(nextState: State): void;\n  }\n}\n```\n\n<h3 align=\"center\">Run retyped</h3>\n\n<pre align=\"center\">\n$ retyped compile class.js\n</pre>\n\n<h3 align=\"center\">Get Reason</h3>\n\n```reason\n/* Module classes */\n\ntype state = Js.t {. id : float, storeName : string};\n\nmodule Store = {\n  type t = Js.t {. state : state, update : (state => unit) [@bs.meth]};\n  external make : state => t = \"Store\" [@@bs.new] [@@bs.module \"classes\"];\n};\n```\n\n## Docs\n\n<p><details>\n<summary><b><a href=\"https://rrdelaney.github.io/ReasonablyTyped\">Examples</a></b></summary>\n</details></p>\n\n<p><details>\n<summary><b>TypeScript</b></summary>\n\nTypeScript has a similar workflow. Compile your TypeScript file with:\n\n```\n$ retyped compile my-definition.d.ts\n```\n</details></p>\n\n<p><details>\n<summary><b>FlowTyped</b></summary>\n\nReasonablyTyped can automatically compile all FlowTyped definitions in your repo. Run\n\n```\n$ retyped compile --flow-typed\n```\n</details></p>\n\n<p><details>\n<summary><b>Command-line Usage</b></summary>\n\n```\nretyped\n\nCommands:\n  compile [files...]  Generate BuckleScript interfaces from a file\n\nOptions:\n  --version     Show version number                                    [boolean]\n  --help        Show help                                              [boolean]\n\n```\n</details></p>\n\n<p><details>\n<summary><b>Usage as a library</b></summary>\nReasonablyTyped also exports a library for use! See the example below:\n\n```js\n// lib-usage.js\nimport * as ReasonablyTyped from 'reasonably-typed'\n\nconst libSrc = fs.readFileSync('lib.js').toString()\nconst bsInterface = ReasonablyTyped.compile(libSrc)\n```\n\n**`format (code: string) => string`**\n\nFormats a block of code using `refmt`\n\n**`compile (code: string, filename?: string) => string`**\n\nCompiles a libdef, formats the result, and handles errors cleanly\n</details></p>\n\n## Status\n\n[![CircleCI](https://circleci.com/gh/rrdelaney/ReasonablyTyped.svg?style=svg)](https://circleci.com/gh/rrdelaney/ReasonablyTyped)\n\n## Roadmap\n\n- [x] Basic types like `string`\n- [x] Function types\n- [x] Record types\n- [ ] Literals as types\n- [x] Union types\n- [ ] Instersection types\n- [x] Named types\n- [x] Optional parameters\n- [x] Classes\n- [x] Generics\n- [x] Built-ins like Promises\n- [ ] React components\n","maintainers":[{"name":"dww","email":"dwwoelfel@gmail.com"}],"time":{"modified":"2022-04-05T06:13:21.334Z","created":"2017-10-01T22:39:09.875Z","0.11.1":"2017-10-01T22:39:09.875Z","0.11.1-1":"2017-10-01T22:52:04.255Z"},"homepage":"https://github.com/rrdelaney/ReasonablyTyped","keywords":["Reason","OCaml","Bucklescript","Flow"],"repository":{"type":"git","url":"git+https://github.com/rrdelaney/ReasonablyTyped.git"},"author":{"name":"Ryan Delaney","email":"rrdelaney@outlook.com"},"bugs":{"url":"https://github.com/rrdelaney/ReasonablyTyped/issues"},"license":"MIT","readmeFilename":"README.md"}