Skip to content

Commit

Permalink
fix: Remove func constraint.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Jan 25, 2020
1 parent 5120d63 commit 25b9f2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,9 @@
### 4.1.1 - 2020-01-29

#### 🐞 Fixes

- **[func]** Removed the generic constraint as it is too restrictive.

## 4.1.0 - 2020-01-20

#### 🚀 Updates
Expand Down
2 changes: 1 addition & 1 deletion src/Predicate.ts
Expand Up @@ -451,6 +451,6 @@ export function custom<T, S extends object = {}>(
return new Predicate<T>('custom', defaultValue).custom(callback);
}

export function func<T extends FuncOf = FuncOf>(defaultValue: T | null = null) /* infer */ {
export function func<T = FuncOf>(defaultValue: T | null = null) /* infer */ {
return new Predicate<T | null>('function', defaultValue, true).nullable();
}

0 comments on commit 25b9f2a

Please sign in to comment.