repo_description: Chrome DevTools for coding agents
repo_topics: browser chrome chrome-devtools debugging devtools mcp mcp-server puppeteer
code: /**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   */
  
  export function createIdGenerator() {
    let i = 1;
    return () => {
      if (i === Number.MAX_SAFE_INTEGER) {
        i = 0;
      }
      return i++;
    };
  }
  
  export const stableIdSymbol = Symbol('stableIdSymbol');
  
  export type WithSymbolId<T> = T & {
    [stableIdSymbol]?: number;
  };
  