( arg: string, elementType?: CommandElementType, )
| 1647 | * to a char check against PS_TOKENIZER_DASH_CHARS. |
| 1648 | */ |
| 1649 | export function isPowerShellParameter( |
| 1650 | arg: string, |
| 1651 | elementType?: CommandElementType, |
| 1652 | ): boolean { |
| 1653 | if (elementType !== undefined) { |
| 1654 | return elementType === 'Parameter' |
| 1655 | } |
| 1656 | return arg.length > 0 && PS_TOKENIZER_DASH_CHARS.has(arg[0]!) |
| 1657 | } |
| 1658 | |
| 1659 | /** |
| 1660 | * Check if any argument on a command is an unambiguous abbreviation of a PowerShell parameter. |
no test coverage detected