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
Currently, S.startsWith returns just a boolean.
Which is not bad, but in typescript, we could give more information on the type by simply changing type signature with
exportdeclarefunctionstartsWith<constSubStrextendsstring>(substr: SubStr): (str: string)=>str is `${SubStr}${string}`
// for non-curried versionexportdeclarefunctionstartsWith<constSubStrextendsstring>(str: string,substr: SubStr): str is `${SubStr}${string}`
The text was updated successfully, but these errors were encountered:
Currently, S.startsWith returns just a boolean.
Which is not bad, but in typescript, we could give more information on the type by simply changing type signature with
The text was updated successfully, but these errors were encountered: