Skip to content

Commit

Permalink
Switch declare function exports to declare module.exports
Browse files Browse the repository at this point in the history
Reviewed By: calebmer

Differential Revision: D6579552

fbshipit-source-id: a46f27cca8065e9f3c46739f6a874dfb346c0c7d
  • Loading branch information
samwgoldman authored and facebook-github-bot committed Dec 19, 2017
1 parent dabb78b commit 632f120
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions flow/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,5 @@ declare module "Map" {
values(): Iterator<V>;
}

// Don't "declare class exports" directly, otherwise in error messages our
// show up as "exports" instead of "Map" or "MapPolyfill".
declare module.exports: typeof MapPolyfill;
}
2 changes: 0 additions & 2 deletions flow/Set.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,5 @@ declare module "Set" {
values(): Iterator<T>;
}

// Don't "declare class exports" directly, otherwise in error messages our
// show up as "exports" instead of "Set" or "SetPolyfill".
declare module.exports: typeof SetPolyfill;
}
4 changes: 2 additions & 2 deletions flow/fbjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
*/

declare module 'fbjs/lib/invariant' {
declare function exports<T>(condition: any, message: string, ...args: Array<any>): void;
declare module.exports: <T>(condition: any, message: string, ...args: Array<any>) => void;
}

declare module 'fbjs/lib/nullthrows' {
declare function exports<T>(value: ?T): T;
declare module.exports: <T>(value: ?T) => T;
}

0 comments on commit 632f120

Please sign in to comment.