Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report declaration/interface errors on start #89

Closed
CrabDude opened this issue Nov 21, 2014 · 2 comments
Closed

Report declaration/interface errors on start #89

CrabDude opened this issue Nov 21, 2014 · 2 comments
Assignees

Comments

@CrabDude
Copy link

@CrabDude CrabDude commented Nov 21, 2014

When an interface file contains an error, it fails silently, resulting in unexpected errors:

declare module http {
  declare function createServer(callback?: (req: httpIncomingMessage, res: httpServerResponse) => void): httpServer
}

declare class httpServer {}
declare class httpIncomingMessage {}

// INVALID class method declaration syntax
declare class httpServerResponse {
  declare function end(chunk?: string): void
}

Results in:

http
Required module not found
@bhosmer bhosmer self-assigned this Nov 21, 2014
@samwgoldman
Copy link
Member

@samwgoldman samwgoldman commented Jun 23, 2015

@bhosmer took care of this in 729c2af. Now, your example results in:

flow-test/lib/test.js:10:11,18: Library parse error:
flow-test/lib/test.js:10:11,18: Unexpected identifier

which is much nicer!

@samwgoldman
Copy link
Member

@samwgoldman samwgoldman commented Jun 29, 2015

Fixed in 0.13

jeffmo pushed a commit to jeffmo/flow that referenced this issue Jul 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants