Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Omit with Pick + Exclude (#899)
Recently the type declarations include the use of the Omit library type. This type was added in TypeScript 3.5 (typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type), and therefore the change prevents using this library with TypeScript projects that have not upgraded. (In my case, we use TypeScript 3.4.) I replaced the use of Omit with the same implementation based on Pick and Exclude: type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>; I'm not sure what the minimum TypeScript this project supports, but this will at least prevent issues with some earlier 3.x versions.
- Loading branch information