feat: improve JSDoc with examples and detailed type definitions #13
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
codetease/mep!13
Loading…
Reference in a new issue
No description provided.
Delete branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
V1.2.0
@ -151,20 +151,20 @@ export class SnippetPrompt extends Prompt<string, SnippetOptions> {protected handleInput(char: string, _key: Buffer) {Useless assignment to local variable
The initial value of styledVal is unused, since it is always overwritten.
To fix the problem, we should remove the useless initial assignment and declare
styledValwithout assigning it until we know which styled string we want. This avoids dead code and preserves behavior.Concretely, in
src/prompts/snippet.tswithin therendermethod, replace the linelet styledVal = displayVal;with a declaration that does not assign a value yet, and ensure that both branches of theif (isFocused)/elsestatement still assign a value tostyledVal. For example, change it tolet styledVal: string;, leaving theif/elsebranches as they are. No new imports, methods, or additional definitions are required; this is a local refactor to remove the unused initial value.