MCPcopy
hub / github.com/coder/mux / hasSrcBaseDir

Function hasSrcBaseDir

src/common/types/runtime.ts:306–311  ·  view source on GitHub ↗
(
  config: RuntimeConfig | undefined
)

Source from the content-addressed store, hash-verified

304 * This narrows the type to allow safe access to srcBaseDir.
305 */
306export function hasSrcBaseDir(
307 config: RuntimeConfig | undefined
308): config is Extract<RuntimeConfig, { srcBaseDir: string }> {
309 if (!config) return false;
310 return "srcBaseDir" in config && typeof config.srcBaseDir === "string";
311}
312
313/**
314 * Helper to safely get srcBaseDir from a runtime config.

Callers 5

createMethod · 0.90
createMultiProjectMethod · 0.90
removeMethod · 0.90
createRuntimeFunction · 0.90
getSrcBaseDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected