Skip to content

Commit

Permalink
Merge pull request #47 from rokoroku/issue-45
Browse files Browse the repository at this point in the history
Fix Typescript compilation issue
  • Loading branch information
rokoroku authored Jul 22, 2018
2 parents 46dce57 + 20e47ca commit 9a3722a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"postcss-url": "^7.3.2",
"prettier": "^1.13.5",
"react-hot-loader": "^4.3.1",
"redux-devtools-extension": "^2.13.2",
"redux-devtools-extension": "^2.13.5",
"style-loader": "^0.21.0",
"ts-loader": "^4.4.1",
"typescript": "^2.9.1",
Expand Down
3 changes: 2 additions & 1 deletion types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ declare module '*.css' {
}

// Omit type https://github.com/Microsoft/TypeScript/issues/12215
type SimpleKeyOf<T> = Extract<keyof T, 'number' | 'string'>;
type Diff<T extends string, U extends string> = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T];
type Omit<T, K extends keyof T> = { [P in Diff<keyof T, K>]: T[P] };
type Omit<T, K extends SimpleKeyOf<T>> = { [P in Diff<SimpleKeyOf<T>, K>]: T[P] };

type PartialPick<T, K extends keyof T> = Partial<T> & Pick<T, K>;

0 comments on commit 9a3722a

Please sign in to comment.