Skip to content

Commit 40a9060

Browse files
docs(README.md): update
1 parent 83e0547 commit 40a9060

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,7 +2226,7 @@ const guardDefined: GuardDefined = <Type>(value: Defined<Type>, callback?: Resul
22262226
| :------------------------------------ | :---------: | :---------------------------------------------------------------- |
22272227
| `value` is [`Defined<Type>`][defined] | `boolean` | By default `Type` variable is equal to the type detected from the `value`, but the detected type `undefined` changes to `never` and the **return type** is a `boolean` as the result of its statement |
22282228

2229-
The **return value** is A `boolean` indicating whether or not the `value` is defined.
2229+
The **return value** is a `boolean` indicating whether or not the `value` is defined.
22302230

22312231
----
22322232

@@ -2306,7 +2306,7 @@ The **return value** is a `boolean` indicating whether or not the `value` is an
23062306
Use `guardKey()` or `guard.is.key()` to guard the `value` to be one of the `string`, `number`, or `symbol`.
23072307

23082308
```typescript
2309-
const guardKey: GuardKey = (value: Key, callback?: ResultCallback): value is Key =>
2309+
const guardKey: GuardKey = (value: Key, callback?: ResultCallback): value is Key =>
23102310
isKey(value, callback);
23112311
```
23122312

@@ -2437,7 +2437,7 @@ Use `guardObjectKey()` or `guard.is.objectKey()` to guard the `value` to be an `
24372437

24382438
```typescript
24392439
const guardObjectKey: GuardObjectKey =
2440-
<Obj>(value: Obj, key: keyof Obj | (keyof Obj)[], callback?: ResultCallback): value is Obj =>
2440+
<Obj extends object>(value: Obj, key: keyof Obj | (keyof Obj)[], callback?: ResultCallback): value is Obj =>
24412441
isObjectKey<Obj>(value, key, callback);
24422442
```
24432443

@@ -2505,7 +2505,7 @@ const guardObjectKeys: GuardObjectKeys =
25052505
| :--------------- | :---------: | :---------------------------------------------------------------- |
25062506
| `value` is `Obj` | `boolean` | By default `Obj` variable is equal to the type detected from the `value` and the **return type** is a `boolean` as the result of its statement |
25072507

2508-
The **return value** is A `boolean` indicating whether or not the `value` is an `object` with some of its own specified `keys`.
2508+
The **return value** is a `boolean` indicating whether or not the `value` is an `object` with some of its own specified `keys`.
25092509

25102510
**Usage:**
25112511

@@ -2561,7 +2561,7 @@ Use `guardPrimitive()` or `guard.is.primitive()` to guard the `value` to be the
25612561

25622562
```typescript
25632563
const guardPrimitive: GuardPrimitive =
2564-
<Type extends Primitive>(value: Type, type: Primitives, callback?: ResultCallback): value is Type =>
2564+
<Type extends Primitive>(value: Type, type: Primitives, callback?: ResultCallback): value is Type =>
25652565
isPrimitive<Type>(value, type, callback);
25662566
```
25672567

packages/type/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,7 +2226,7 @@ const guardDefined: GuardDefined = <Type>(value: Defined<Type>, callback?: Resul
22262226
| :------------------------------------ | :---------: | :---------------------------------------------------------------- |
22272227
| `value` is [`Defined<Type>`][defined] | `boolean` | By default `Type` variable is equal to the type detected from the `value`, but the detected type `undefined` changes to `never` and the **return type** is a `boolean` as the result of its statement |
22282228

2229-
The **return value** is A `boolean` indicating whether or not the `value` is defined.
2229+
The **return value** is a `boolean` indicating whether or not the `value` is defined.
22302230

22312231
----
22322232

@@ -2306,7 +2306,7 @@ The **return value** is a `boolean` indicating whether or not the `value` is an
23062306
Use `guardKey()` or `guard.is.key()` to guard the `value` to be one of the `string`, `number`, or `symbol`.
23072307

23082308
```typescript
2309-
const guardKey: GuardKey = (value: Key, callback?: ResultCallback): value is Key =>
2309+
const guardKey: GuardKey = (value: Key, callback?: ResultCallback): value is Key =>
23102310
isKey(value, callback);
23112311
```
23122312

@@ -2437,7 +2437,7 @@ Use `guardObjectKey()` or `guard.is.objectKey()` to guard the `value` to be an `
24372437

24382438
```typescript
24392439
const guardObjectKey: GuardObjectKey =
2440-
<Obj>(value: Obj, key: keyof Obj | (keyof Obj)[], callback?: ResultCallback): value is Obj =>
2440+
<Obj extends object>(value: Obj, key: keyof Obj | (keyof Obj)[], callback?: ResultCallback): value is Obj =>
24412441
isObjectKey<Obj>(value, key, callback);
24422442
```
24432443

@@ -2505,7 +2505,7 @@ const guardObjectKeys: GuardObjectKeys =
25052505
| :--------------- | :---------: | :---------------------------------------------------------------- |
25062506
| `value` is `Obj` | `boolean` | By default `Obj` variable is equal to the type detected from the `value` and the **return type** is a `boolean` as the result of its statement |
25072507

2508-
The **return value** is A `boolean` indicating whether or not the `value` is an `object` with some of its own specified `keys`.
2508+
The **return value** is a `boolean` indicating whether or not the `value` is an `object` with some of its own specified `keys`.
25092509

25102510
**Usage:**
25112511

@@ -2561,7 +2561,7 @@ Use `guardPrimitive()` or `guard.is.primitive()` to guard the `value` to be the
25612561

25622562
```typescript
25632563
const guardPrimitive: GuardPrimitive =
2564-
<Type extends Primitive>(value: Type, type: Primitives, callback?: ResultCallback): value is Type =>
2564+
<Type extends Primitive>(value: Type, type: Primitives, callback?: ResultCallback): value is Type =>
25652565
isPrimitive<Type>(value, type, callback);
25662566
```
25672567

0 commit comments

Comments
 (0)