Suggest a list of possible arg labels when an argument is unlabelled (#6755)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -41,7 +41,9 @@ export async function refreshPage(method = 'UI button') {
|
||||
* Get all labels for a keyword call expression.
|
||||
*/
|
||||
export function allLabels(callExpression: CallExpressionKw): string[] {
|
||||
return callExpression.arguments.map((a) => a.label.name)
|
||||
return callExpression.arguments
|
||||
.map((a) => a.label?.name)
|
||||
.filter((a) => a !== undefined)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user