(s: string | undefined | vscode.ViewColumn, fallback?: vscode.ViewColumn)
| 629 | export function asViewColumn(s: string | undefined | vscode.ViewColumn): vscode.ViewColumn | undefined; |
| 630 | export function asViewColumn(s: string | undefined | vscode.ViewColumn, fallback: vscode.ViewColumn): vscode.ViewColumn; |
| 631 | export function asViewColumn(s: string | undefined | vscode.ViewColumn, fallback?: vscode.ViewColumn): vscode.ViewColumn | undefined { |
| 632 | if (!s) { |
| 633 | return fallback; |
| 634 | } |
| 635 | if (typeof s !== 'string') { |
| 636 | // s is already ViewColumn: |
| 637 | return s; |
| 638 | } |
| 639 | if (VIEW_COLUMN_KEYS.includes(s)) { |
| 640 | return vscode.ViewColumn[s as keyof typeof vscode.ViewColumn]; |
| 641 | } |
| 642 | return fallback; |
| 643 | } |
| 644 | |
| 645 | |
| 646 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
no outgoing calls
no test coverage detected