flowgen icon indicating copy to clipboard operation
flowgen copied to clipboard

--flow-typed-format doesn't work

Open 4rokis opened this issue 7 years ago • 3 comments

Running

$ flowgen --flow-typed-format build/focus.d.ts
Parsing focus
Missing node parse ExportDeclaration

Doesn't produce any output file. However,

$ flowgen build/focus.d.ts Parsing focus Missing node parse ExportDeclaration

does.

declare type FakeEventType = { keyCode: number, preventDefault(): void }; export type KeyDownEventType = { key: number, target?: HTMLElement, originalEvent: KeyboardEvent | FakeEventType | MouseEvent }; declare var focus: (toFocus: string) => void; declare var fakeKeyDown: (fakeEvent: FakeEventType) => boolean; declare var fakeEnter: () => boolean; declare var fakeReturn: () => boolean;

$ flowgen -V
1.3.0

focus.d.ts

declare type FakeEventType = { keyCode: number; preventDefault(): void; }; export declare type KeyDownEventType = { key: number; target?: HTMLElement; originalEvent: KeyboardEvent | FakeEventType | MouseEvent; }; declare const focus: (toFocus: string) => void; declare const fakeKeyDown: (fakeEvent: FakeEventType) => boolean; declare const fakeEnter: () => boolean; declare const fakeReturn: () => boolean; export { focus, fakeKeyDown, fakeEnter, fakeReturn }; //# sourceMappingURL=focus.d.ts.map

4rokis avatar Oct 25 '18 07:10 4rokis

I think it works

goodmind avatar Feb 08 '19 03:02 goodmind

It just doesn't support directory name

goodmind avatar Feb 08 '19 03:02 goodmind

Fixed in #73

goodmind avatar Feb 14 '19 16:02 goodmind