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
Copy file name to clipboardExpand all lines: readme.md
+7-30Lines changed: 7 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,41 +211,17 @@ Click the type names for complete docs.
211
211
212
212
### Type Guard
213
213
214
-
#### `IsType` vs. `IfType`
215
-
216
-
For every `IsT` type (e.g. `IsAny`), there is an associated `IfT` type that can help simplify conditional types. While the `IsT` types return a `boolean`, the `IfT` types act like an `If`/`Else` - they resolve to the given `TypeIfT` or `TypeIfNotT` depending on whether `IsX` is `true` or not. By default, `IfT` returns a `boolean`:
-[`If`](source/if.d.ts) - An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
239
215
-[`IsLiteral`](source/is-literal.d.ts) - Returns a boolean for whether the given type is a [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
240
216
-[`IsStringLiteral`](source/is-literal.d.ts) - Returns a boolean for whether the given type is a `string`[literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
241
217
-[`IsNumericLiteral`](source/is-literal.d.ts) - Returns a boolean for whether the given type is a `number` or `bigint`[literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
242
218
-[`IsBooleanLiteral`](source/is-literal.d.ts) - Returns a boolean for whether the given type is a `true` or `false`[literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
243
219
-[`IsSymbolLiteral`](source/is-literal.d.ts) - Returns a boolean for whether the given type is a `symbol`[literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
244
-
-[`IsAny`](source/is-any.d.ts) - Returns a boolean for whether the given type is `any`. (Conditional version: [`IfAny`](source/if-any.d.ts))
245
-
-[`IsNever`](source/is-never.d.ts) - Returns a boolean for whether the given type is `never`. (Conditional version: [`IfNever`](source/if-never.d.ts))
246
-
-[`IsUnknown`](source/is-unknown.d.ts) - Returns a boolean for whether the given type is `unknown`. (Conditional version: [`IfUnknown`](source/if-unknown.d.ts))
247
-
-[`IsEmptyObject`](source/empty-object.d.ts) - Returns a boolean for whether the type is strictly equal to an empty plain object, the `{}` value. (Conditional version: [`IfEmptyObject`](source/if-empty-object.d.ts))
248
-
-[`IsNull`](source/is-null.d.ts) - Returns a boolean for whether the given type is `null`. (Conditional version: [`IfNull`](source/if-null.d.ts))
220
+
-[`IsAny`](source/is-any.d.ts) - Returns a boolean for whether the given type is `any`.
221
+
-[`IsNever`](source/is-never.d.ts) - Returns a boolean for whether the given type is `never`.
222
+
-[`IsUnknown`](source/is-unknown.d.ts) - Returns a boolean for whether the given type is `unknown`.
223
+
-[`IsEmptyObject`](source/empty-object.d.ts) - Returns a boolean for whether the type is strictly equal to an empty plain object, the `{}` value.
224
+
-[`IsNull`](source/is-null.d.ts) - Returns a boolean for whether the given type is `null`.
249
225
-[`IsTuple`](source/is-tuple.d.ts) - Returns a boolean for whether the given array is a tuple.
0 commit comments