forked from MetaMask/utils
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve compatibility of
hasProperty
(MetaMask#80)
* Improve compatibility of `hasProperty` The `hasProperty` function is now compatible with a wider variety of objects. The `Record<PropertyKey, unknown>` constraint used previously was exluding `Error`s, and any object-like things expressed as a custom class or interface. Now all of those are accepted. * Ignore `tsd` tests when building These test modules are not meant to be compiled directly with TypeScript. They sometimes include errors by-design that would blow up if building with TypeScript. * Re-enable TypeScript in `test-d.ts` files to enable linting The type error assertion was replaced with an alternative that does not introduce a compile-time error.
- Loading branch information
Showing
3 changed files
with
42 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters