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