Skip to content

2688 - StartsWith #32041

Closed
Closed

Description

@PassionZale
type StartsWith<T extends string, U extends string> = U extends ""
  ? true
  : T extends `${U}${infer _}`
  ? true
  : false;

Activity

  1. added
    answer
    zh-CN
    on Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    2688answerzh-CN

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions