-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(TypeScript): Reduce number, and simplify, type guards
We where exporting quite a lot of type guard function, several of which were effectively aliases (e.g. `isListItem`) some of which effiectively duplicated the functionality of others. This commit attempts to simplify the guards and reduce them to a mimimal, but still useful set. It also aims to reduce the confusion between a guard for a specific type `isA` and a guard for a family of types e.g. `isTypeOf`. The previous `isCreativeWork` was actually testing for waht is now `isTypeOf('CreativeWork')(node)` but could be confused for `isA('CreativeWork', node)`.
- Loading branch information
Showing
2 changed files
with
110 additions
and
215 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
Oops, something went wrong.