Closed zploskey closed 6 years ago
Seems to work for me on master:
ryan@ryan-desktop ~/d/ReasonablyTyped> cat _test.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;
}
}
ryan@ryan-desktop ~/d/ReasonablyTyped> node lib/cli.js ./_test.js --debug
=== Imports ===
=== Types ===
typeof State = { id: number, storeName: string }
typeof Store = Class
=== Flow Definition ===
declare module 'classes' {
declare type State = { id: number, storeName: string }
declare class Store { constructor: (initialState: State): Store; state: State; update: (nextState: State): void }
}
=== Bucklescript Definition ===
/* Module classes */
type state = {. "id": float, "storeName": string };
module Store = {
type t = {. "state": (state), "update": [@bs.meth](state => unit)};
[@bs.new] [@bs.module "classes"] external make : state => t = "Store";
};
Compiled 0 files
Seems to have been fixed. Sweet!
This example in the README does not work.
Running retyped on it produces a file
t.re
containing onlyI ran this because I was trying to update the example to Reason 3 syntax, but this will need to be fixed first or changed to something that will compile.