Type Alias Includes<Subject, Search, Then, Else>

Check if Subject includes Search. If either of them is not a string, returns Else.

type R = StringPlus.Includes<'abc', 'a'> // true

type R = StringPlus.Includes<'abc', 'd'> // false

Type Parameters

  • Subject extends string
  • Search extends string
  • Then = true
  • Else = false