You can not get hello as the type from .toLowerCase() without a cast.
hello
.toLowerCase()
If you really want strict typing, the safest/idiomatic approach is:
const toLowerCaseTyped = <S extends string>(str: S) => str.toLowerCase() as Lowercase<S>;