Skip to content

Update constants.ts#4

Open
faizancodes wants to merge 1 commit into
mainfrom
faizancodes-patch-4
Open

Update constants.ts#4
faizancodes wants to merge 1 commit into
mainfrom
faizancodes-patch-4

Conversation

@faizancodes

Copy link
Copy Markdown
Member

No description provided.

@headstarterbot

Copy link
Copy Markdown

src/constants.ts

Removing unnecessary array brackets can make the code easier to read and understand.
Create Issue

    findEnclosingContext(
      file: string,
      node: Node,
    )

Using const assertions for string literals can help prevent accidental modification of the string and improve type safety.
Create Issue

    return filepath.startsWith("/") ? filepath.slice(1) : filepath as const;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant