Skip to content

Commit

Permalink
misc Flow library fixes & suppressions
Browse files Browse the repository at this point in the history
Summary:
The current version of Flow fails to report some errors in library definitions. I'm
working on a Flow fix that would surface these errors. In preparation for this, this diff:

* replaces `FbtErrorListener` (missing) with `IFbtErrorListener` in fbt.js
* fixes typos in several files
* suppresses missing names with `[cannot-resolve-name]`
* adds `sourceMapTarget` option in babel-generator

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D25839533

fbshipit-source-id: 947207db9238aa10663616d59080440d2ac6f243
  • Loading branch information
panagosg7 authored and facebook-github-bot committed Jan 19, 2021
1 parent 9b1f3b1 commit d9c84f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flow-typed/npm/promise_v8.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
*/

declare module 'promise/setimmediate/es6-extensions' {
declare module.exports: Class<Promise>;
declare module.exports: typeof Promise;
}

declare module 'promise/setimmediate/done' {
declare module.exports: Class<Promise>;
declare module.exports: typeof Promise;
}

declare module 'promise/setimmediate/finally' {
declare module.exports: Class<Promise>;
declare module.exports: typeof Promise;
}

declare module 'promise/setimmediate/rejection-tracking' {
Expand Down
1 change: 1 addition & 0 deletions jest/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ module.exports = {

return generate(
ast,
// $FlowFixMe[prop-missing] Error found when improving flow typing for libs
{
code: true,
comments: false,
Expand Down

0 comments on commit d9c84f0

Please sign in to comment.