Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
Fix preact typings for Typescript 2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronjensen committed May 31, 2018
1 parent 7c54bbe commit 236bb4e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions typings/preact/helpers.d.ts
@@ -1,5 +1,7 @@
type Diff<T extends string, U extends string> = ({[P in T]: P} &
{[P in U]: never} & {[x: string]: never})[T]
type Diff<
T extends string | number | symbol,
U extends string | number | symbol
> = ({[P in T]: P} & {[P in U]: never} & {[x: string]: never})[T]

export type Omit<T, K extends keyof T> = Pick<T, Diff<keyof T, K>>

Expand Down

0 comments on commit 236bb4e

Please sign in to comment.