-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
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
export declare function startsWith<const SubStr extends string>(substr: SubStr): (str: string) => str is `${SubStr}${string}`
// for non-curried version
export declare function startsWith<const SubStr extends string>(str: string, substr: SubStr): str is `${SubStr}${string}`Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels