MCPcopy Create free account
hub / github.com/Snapchat/Valdi / applyDefaults

Function applyDefaults

valdi/vscode_debugger/src/configuration.ts:994–1020  ·  view source on GitHub ↗
(config: AnyResolvingConfiguration)

Source from the content-addressed store, hash-verified

992 typeof config === 'object' && !!config && 'env' in config && 'envFile' in config;
993
994export 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

Callers 3

constructorMethod · 0.90
reportBootTelemetryMethod · 0.90

Calls 8

assertNeverFunction · 0.90
applyNodeDefaultsFunction · 0.85
applyEdgeDefaultsFunction · 0.85
applyChromeDefaultsFunction · 0.85
applyTerminalDefaultsFunction · 0.85
applyValdiDefaultsFunction · 0.85
resolveWorkspaceInConfigFunction · 0.85

Tested by

no test coverage detected