MCPcopy Create free account
hub / github.com/facebook/memlab / parse

Method parse

packages/cli/src/options/heap/FinalFileOption.ts:30–44  ·  view source on GitHub ↗
(config: MemLabConfig, args: ParsedArgs)

Source from the content-addressed store, hash-verified

28 }
29
30 async parse(config: MemLabConfig, args: ParsedArgs): Promise<void> {
31 const name = this.getOptionName();
32 if (!args[name]) {
33 return;
34 }
35 const file = args[name];
36 if (!fs.existsSync(file)) {
37 utils.haltOrThrow(`Invalid snapshot file: ${file}`);
38 }
39 config.useExternalSnapshot = true;
40 if (!config.externalSnapshotFilePaths) {
41 config.externalSnapshotFilePaths = [];
42 }
43 config.externalSnapshotFilePaths[2] = file;
44 }
45}

Callers

nothing calls this directly

Calls 2

getOptionNameMethod · 0.95
haltOrThrowMethod · 0.80

Tested by

no test coverage detected