NotStringtype

{
	toUpperCase?: never;
	toLowerCase?: never;
}
PropertyType
.toUpperCasenever
.toLowerCasenever

Type that never matches the string type.

  • string itself is iterable (iterating over its individual characters) and implements Iterable<string>
  • Using Iterable<string> & NotString allows an iterable containing strings but not string itself.
  • This helps catch this category of subtle errors.