hunk.code_window:   while (unvisited.size > 0) {
       for (const vertex of unvisited) {
         const [weight] = weightMap.get(vertex)!;
         for (const event of keys(adjacency[vertex])) {
           const nextVertex = optionsWithDefaults.stateSerializer(
             adjacency[vertex][event]
           );
           if (!weightMap.has(nextVertex)) {
             weightMap.set(nextVertex, [weight + 1, vertex, event]);
           } else {
             const [nextWeight] = weightMap.get(nextVertex)!;
  
hunk.labels: keep keep keep keep replace replace replace keep keep keep keep
hunk.after_edit:         const nextState = adjacency[vertex][event];
           const nextVertex = optionsWithDefaults.stateSerializer(nextState);
           stateMap.set(nextVertex, nextState);
  
hunk.file_path: packages/xstate-graph/src/graph.ts
hunk.type: replace
file: {
    "extends": "../../tsconfig",
    "include": ["src/**/*"],
    "compilerOptions": {
      "outDir": "./lib"
    }
  }
  