* Ensure a value is an array. PowerShell 5.1's ConvertTo-Json may unwrap * single-element arrays into plain objects.
(value: T | T[] | undefined | null)
| 701 | * single-element arrays into plain objects. |
| 702 | */ |
| 703 | function ensureArray<T>(value: T | T[] | undefined | null): T[] { |
| 704 | if (value === undefined || value === null) { |
| 705 | return [] |
| 706 | } |
| 707 | return Array.isArray(value) ? value : [value] |
| 708 | } |
| 709 | |
| 710 | /** Map raw .NET AST type name to our StatementType union */ |
| 711 | // exported for testing |
no outgoing calls
no test coverage detected