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

Comments

Projects
None yet
4 participants
@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

This comment has been minimized.

Member

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

This comment has been minimized.

Member

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