flowgen icon indicating copy to clipboard operation
flowgen copied to clipboard

Formatting with prettier breaks

Open vjpr opened this issue 7 years ago • 3 comments

[error] dist/private/js/index.flow.js: SyntaxError: `declare export interface` is not supported. Use `export interface` instead (5:16)
[error]   3 |  * Properties of a CustomMessage.
[error]   4 | */
[error] > 5 | declare export interface ICustomMessage {
[error]     |                ^
[error]   6 |
[error]   7 | /**
[error]   8 |  * CustomMessage payload

vjpr avatar Mar 10 '18 19:03 vjpr

Want to try make a unit test for this?

orta avatar Mar 10 '18 20:03 orta

this happens because there is no module declaration:

declare module 'something' {
  declare export interface ICustomMessage {

stereobooster avatar Mar 13 '18 21:03 stereobooster

I get a type error when trying to create a d.ts file with what @stereobooster wrote. so I just added a test case for global declare and it works as expected @vjpr if you have some better code to reproduce, you are welcome to share and I will add it to the test case.

talshani avatar May 25 '18 04:05 talshani