You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`4.1.1`: Fixes type variable `Class` default value is set to [`Function`][function] by removing it cause it's always being picked from the `className` parameter.
731
+
`4.1.1`:
732
732
733
-
Use `isInstance()` or `is.instance()` to check if **any** value is an `object` of a generic `Obj` type equal to an `instance` of [`Constructor<Class>`](#constructor) type.
733
+
* Change the `Class` type variable to `Obj`.
734
+
* Change the `className` parameter name to `constructor`.
735
+
* Fixes type variable `Obj` default value is set to [`Function`][function] by removing it cause it's always being picked from the `constructor` parameter.
736
+
* Removed unnecessary `Constructor` from the return type.
737
+
* Add check `constructor` against the function.
738
+
739
+
Use `isInstance()` or `is.instance()` to check if **any** value is an `object` of a generic `Obj` type and an instance of [`Constructor`][constructor] type.
| value |`any`| Any `value` to compare with the `instance`|
759
-
|instance|[`Constructor<Obj>`](#constructor)| A generic `Obj`[`Constructor<Obj>`](#constructor) type to create an `instance` to compare with the `value`|
760
-
| callback |[`ResultCallback`][resultcallback]=[`resultCallback`][callback]|[`ResultCallback`][resultcallback] function to handle result before returns eg. to throw an [`Error`][error]|
| value |`any`| Any `value` to be an instance of the `constructor`|
765
+
|constructor|[`Constructor<Obj>`][constructor]| A [`class`][ts-classes] or [`function`][ts-function] that specifies the type of the [`Constructor`][constructor]|
766
+
| callback |[`ResultCallback`][resultcallback]=[`resultCallback`][callback]|A [`ResultCallback`][resultcallback] function to handle the result before returns eg. to throw an [`Error`][error]|
|`value` is `Class`|`boolean`|By default `Class` variable is equal to [`Function`][function] and the**return type** is a `boolean` as the result of its statement |
| value |[`Func`](#func)| A [`Func`](#func) type `value` to guard |
2277
-
| callback? |[`ResultCallback`][resultcallback]|Optional[`ResultCallback`][resultcallback] function to handle result before returns eg. to throw an [`Error`][error]|
2296
+
| callback? |[`ResultCallback`][resultcallback]|An optional[`ResultCallback`][resultcallback] function to handle result before returns eg. to throw an [`Error`][error]|
2278
2297
2279
2298
**Return type:**
2280
2299
@@ -2296,26 +2315,27 @@ The **return value** is a `boolean` indicating whether or not the `value` is a [
2296
2315
2297
2316
`4.1.0`: Fixes the `value` is not guarded by extending generic type `Obj` variable with `object`.
2298
2317
2299
-
Use `guardInstance()` or `guard.is.instance()` to guard the `value` to be an `object` of a generic `Obj` type equal to an `instance` of [`Constructor<Obj>`](#constructor) type.
2318
+
Use `guardInstance()` or `guard.is.instance()` to guard the `value` to be an `object` of a generic `Obj` type and an `instance` of [`Constructor`][constructor] type.
| value |`Obj`|An `Obj` type `value` to compare with the `instance`|
2317
-
|instance |[`Constructor<Obj>`](#constructor)| A generic `Obj`[`Constructor`](#constructor) type to create an `instance` to compare with the `value`|
2318
-
| callback? |[`ResultCallback`][resultcallback]|Optional [`ResultCallback`][resultcallback] function to handle result before returns eg. to throw an [`Error`][error]|
| value |`Obj`|A generic `Obj` type `value` to be an instance of the `constructor`|
2337
+
|constructor |[`Constructor<Obj>`][constructor]| A [`class`][ts-classes] or [`[function]`][ts-function] that specifies the type of the [`constructor`][constructor]|
2338
+
| callback? |[`ResultCallback`][resultcallback]|An optional [`ResultCallback`][resultcallback] function to handle the result before returns eg. to throw an [`Error`][error]|
| value |`symbol`| A `symbol` type `value` to guard |
2676
-
| callback? |[`ResultCallback`][resultcallback]|Optional [`ResultCallback`][resultcallback] function to handle result before returns eg. to throw an [`Error`][error]|
2736
+
| callback? |[`ResultCallback`][resultcallback]|An optional [`ResultCallback`][resultcallback] function to handle the result before returns eg. to throw an [`Error`][error]|
| value |`T` extends [`Type`][type]| A [`Type`][type]`value` to guard with the `type`|
2708
-
| type |[`Types<T>`](#types)| A `string` or generic [`Constructor<T>`](#constructor) type from the [`Types`](#types) to check the `value`|
2709
-
| callback? |[`ResultCallback`][resultcallback]|Optional [`ResultCallback`][resultcallback] function to handle result before returns eg. to throw an [`Error`][error]|
| value |`T` extends [`Type`][type]| A [`Type`][type]`value` to guard with the `type`|
2768
+
| type |[`Types<T>`](#types)| A `string` or generic [`Constructor<T>`][constructor] type from the [`Types`](#types) to check the `value`|
2769
+
| callback? |[`ResultCallback`][resultcallback]|An optional [`ResultCallback`][resultcallback] function to handle the result before returns eg. to throw an [`Error`][error]|
0 commit comments