
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@dwwoelfel/reasonably-typed
Advanced tools

$ npm install --global reasonably-typed
// class.js
declare module 'classes' {
declare type State = {
id: number,
storeName: string
};
declare export class Store {
constructor(initialState: State): Store;
state: State;
update(nextState: State): void;
}
}
$ retyped compile class.js
/* Module classes */
type state = Js.t {. id : float, storeName : string};
module Store = {
type t = Js.t {. state : state, update : (state => unit) [@bs.meth]};
external make : state => t = "Store" [@@bs.new] [@@bs.module "classes"];
};
TypeScript has a similar workflow. Compile your TypeScript file with:
$ retyped compile my-definition.d.ts
ReasonablyTyped can automatically compile all FlowTyped definitions in your repo. Run
$ retyped compile --flow-typed
retyped
Commands:
compile [files...] Generate BuckleScript interfaces from a file
Options:
--version Show version number [boolean]
--help Show help [boolean]
// lib-usage.js
import * as ReasonablyTyped from 'reasonably-typed'
const libSrc = fs.readFileSync('lib.js').toString()
const bsInterface = ReasonablyTyped.compile(libSrc)
format (code: string) => string
Formats a block of code using refmt
compile (code: string, filename?: string) => string
Compiles a libdef, formats the result, and handles errors cleanly
stringFAQs
Converts flow definitions to Bucklescript definitions
We found that @dwwoelfel/reasonably-typed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Product
Bringing supply chain security to the next generation of JavaScript package managers