(config: AnyResolvingConfiguration)
| 992 | typeof config === 'object' && !!config && 'env' in config && 'envFile' in config; |
| 993 | |
| 994 | export function applyDefaults(config: AnyResolvingConfiguration): AnyLaunchConfiguration { |
| 995 | let configWithDefaults: AnyLaunchConfiguration; |
| 996 | switch (config.type) { |
| 997 | case DebugType.Node: |
| 998 | configWithDefaults = applyNodeDefaults(config); |
| 999 | break; |
| 1000 | case DebugType.Edge: |
| 1001 | configWithDefaults = applyEdgeDefaults(config); |
| 1002 | break; |
| 1003 | case DebugType.Chrome: |
| 1004 | configWithDefaults = applyChromeDefaults(config); |
| 1005 | break; |
| 1006 | case DebugType.ExtensionHost: |
| 1007 | configWithDefaults = applyExtensionHostDefaults(config); |
| 1008 | break; |
| 1009 | case DebugType.Terminal: |
| 1010 | configWithDefaults = applyTerminalDefaults(config); |
| 1011 | break; |
| 1012 | case DebugType.SnapValdi: |
| 1013 | configWithDefaults = applyValdiDefaults(config); |
| 1014 | break; |
| 1015 | default: |
| 1016 | throw assertNever(config, 'Unknown config: {value}'); |
| 1017 | } |
| 1018 | |
| 1019 | return resolveWorkspaceInConfig(configWithDefaults); |
| 1020 | } |
| 1021 | |
| 1022 | /** |
| 1023 | * Removes optional properties from the config where ${workspaceFolder} is |
no test coverage detected