Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
Update fow + fixes/workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
MoOx committed Dec 5, 2018
1 parent 22ff8f9 commit 4d47b5c
Show file tree
Hide file tree
Showing 43 changed files with 2,210 additions and 540 deletions.
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[version]
^0.68.0
^0.87.0

[ignore]
.*/__tests__/_output/.*
Expand Down
2 changes: 1 addition & 1 deletion examples/react-app-blog/src/PageRepositories.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function getPagesProps(
first?: number,
last: number,
|} {
const link = res.headers.get("Link") || res.headers.get("link");
const link = res.headers.get("Link") || res.headers.get("link") || "";
const almostParams = link.split(/(page=\d+>; rel="[a-z]+)"/);
const pages = {};
for (let i = 1; i < almostParams.length; i = i + 2) {
Expand Down
16 changes: 8 additions & 8 deletions flow-typed/handmade/find-cache-dir.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
type findCacheDirOptions = {
name: string,
files: Array<string>,
cwd: string,
create: boolean,
thunk: boolean,
};
type findCacheDirOptions = {|
name?: string,
files?: Array<string>,
cwd?: string,
create?: boolean,
thunk?: boolean,
|};

declare module "find-cache-dir" {
declare function findCacheDir(options: findCacheDirOptions): string;
declare module.exports: findCacheDir;
declare module.exports: typeof findCacheDir;
}
4 changes: 2 additions & 2 deletions flow-typed/handmade/fs-promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ declare module "fs-promise" {
declare function mkdirs(path: string): Promise<any>;

declare interface fsPromise {
writeFile: writeFile;
mkdirs: mkdirs;
writeFile: typeof writeFile;
mkdirs: typeof mkdirs;
}
declare module.exports: fsPromise;
}
4 changes: 2 additions & 2 deletions flow-typed/handmade/lru-memoize.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
declare module "lru-memoize" {
declare function memoizeInstance(func: Function): Function;
declare function memoize(num: number): memoizeInstance;
declare module.exports: memoize;
declare function memoize(num: number): typeof memoizeInstance;
declare module.exports: typeof memoize;
}
2 changes: 1 addition & 1 deletion flow-typed/handmade/node-object-hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type NodeObjectHashConfig = {
declare function hash(obj: Object): string;

type NodeObjectHashInstance = {
hash: hash,
hash: typeof hash,
};

declare module "node-object-hash" {
Expand Down
18 changes: 0 additions & 18 deletions flow-typed/handmade/webpack.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
/* eslint-disable */
// @todo improve this

export type WebpackConfig = Object;

export type WebpackAssetsFiles = { [key: string]: Array<string> };

type WebpackInstance = {
query: Object,
options: Object,
emitError: Function,
emitFile: Function,
resourcePath: string,
};

declare module "webpack" {
declare function webpack(options: Object, callback: Function): void;
declare module.exports: webpack;
}

declare var module: {
hot: {
Expand Down
Loading

0 comments on commit 4d47b5c

Please sign in to comment.