{"id":30252,"date":"2026-10-02T17:13:53","date_gmt":"2026-10-02T17:13:53","guid":{"rendered":"https:\/\/umang.pk\/2026\/10\/02\/vs-%da%a9%d9%88%da%88-%da%a9%db%8c-%d8%b2%d8%a8%d8%a7%d9%86-api-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9%d8%b1%d8%aa%db%92-%db%81%d9%88%d8%a6%db%92-typescript-%d9%85%db%8c%da%ba\/"},"modified":"2026-10-02T17:13:55","modified_gmt":"2026-10-02T17:13:55","slug":"vs-%da%a9%d9%88%da%88-%da%a9%db%8c-%d8%b2%d8%a8%d8%a7%d9%86-api-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9%d8%b1%d8%aa%db%92-%db%81%d9%88%d8%a6%db%92-typescript-%d9%85%db%8c%da%ba","status":"publish","type":"post","link":"https:\/\/umang.pk\/ur\/2026\/10\/02\/vs-%da%a9%d9%88%da%88-%da%a9%db%8c-%d8%b2%d8%a8%d8%a7%d9%86-api-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9%d8%b1%d8%aa%db%92-%db%81%d9%88%d8%a6%db%92-typescript-%d9%85%db%8c%da%ba\/","title":{"rendered":"VS \u06a9\u0648\u0688 \u06a9\u06cc \u0632\u0628\u0627\u0646 API \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 TypeScript \u0645\u06cc\u06ba \u06a9\u0648\u0688 \u06af\u0631\u0627\u0641 \u06a9\u06cc\u0633\u06d2 \u0628\u0646\u0627\u0626\u06cc\u06ba"},"content":{"rendered":"\n<div id=\"\">\n<p>\u062c\u062f\u06cc\u062f \u06a9\u0648\u0688 \u0628\u06cc\u0633\u0632 \u067e\u0631 \u062a\u0634\u0631\u06cc\u0641 \u0644\u0627\u0646\u0627 \u0645\u0634\u06a9\u0644 \u06c1\u0648\u062a\u0627 \u062c\u0627 \u0631\u06c1\u0627 \u06c1\u06d2\u06d4 \u0636\u0631\u0648\u0631\u06cc \u0646\u06c1\u06cc\u06ba \u06a9\u06c1 \u06cc\u06c1 \u0633\u0686 \u06c1\u0648 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0688\u0648\u06cc\u0644\u067e\u0631 \u062e\u0648\u062f \u0632\u06cc\u0627\u062f\u06c1 \u06a9\u0648\u0688 \u0644\u06a9\u06be \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06a9\u062b\u0631 \u0627\u06cc\u0633\u0627 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u06a9\u0648\u0688\u0646\u06af \u0627\u0633\u0633\u0679\u0646\u0679 \u0646\u06d2 \u06a9\u0648\u0688 \u06a9\u06cc \u0633\u06cc\u06a9\u0691\u0648\u06ba \u06cc\u0627 \u06c1\u0632\u0627\u0631\u0648\u06ba \u0644\u0627\u0626\u0646\u06cc\u06ba \u062a\u06cc\u0627\u0631 \u06a9\u06cc \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0645\u0633\u0626\u0644\u06c1 \u06a9\u0648\u0688 \u06a9\u0627 \u062c\u0627\u0626\u0632\u06c1 \u0628\u0646 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u06cc\u0644 \u0627\u06cc\u0644 \u0627\u06cc\u0645 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u06a9\u06d2 \u062f\u0648\u0631 \u0645\u06cc\u06ba\u060c \u06a9\u0648\u0688 \u06a9\u06cc \u0686\u0646\u062f \u0633\u0637\u0631\u06cc\u06ba \u0644\u06a9\u06be\u0646\u06d2 \u0645\u06cc\u06ba \u062f\u0646 \u0644\u06af \u0633\u06a9\u062a\u06d2 \u062a\u06be\u06d2\u06d4 \u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u06a9\u06cc \u0634\u0631\u0627\u06a9\u062a \u06a9\u06cc \u0648\u062c\u06c1 \u0633\u06d2 \u06c1\u0631 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0622\u067e \u06a9\u06cc \u0635\u0648\u0631\u062a\u062d\u0627\u0644 \u0628\u062a\u062f\u0631\u06cc\u062c \u0628\u0691\u06be\u062a\u06cc \u06c1\u06d2\u06d4 \u062c\u0628 \u0622\u067e \u06a9\u0633\u06cc \u0646\u0626\u06cc \u0679\u06cc\u0645 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06c1\u0648\u06ba \u06cc\u0627 \u06a9\u0648\u0626\u06cc \u0646\u06cc\u0627 \u06a9\u0627\u0645 \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba \u062a\u0648 \u0622\u067e \u06a9\u0648 \u0635\u0631\u0641 \u0627\u0633 \u06a9\u0627 \u062c\u0627\u0626\u0632\u06c1 \u0644\u06cc\u0646\u06d2 \u0627\u0648\u0631 \u0646\u0626\u06d2 \u06a9\u0648\u0688 \u0633\u06d2 \u0648\u0627\u0642\u0641 \u06c1\u0648\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4<\/p>\n<p>\u0644\u06cc\u06a9\u0646 \u0622\u062c\u060c \u0627\u06cc\u06a9 \u06c1\u06cc \u067e\u0631\u0627\u0645\u067e\u0679 \u0645\u0646\u0679\u0648\u06ba \u0645\u06cc\u06ba \u0633\u06cc\u0646\u06a9\u0691\u0648\u06ba \u0641\u0627\u0626\u0644\u0648\u06ba \u0645\u06cc\u06ba \u06a9\u0648\u0688 \u06a9\u06cc \u06c1\u0632\u0627\u0631\u0648\u06ba \u0644\u0627\u0626\u0646\u06cc\u06ba \u062a\u06cc\u0627\u0631 \u06a9\u0631 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u067e\u06cc\u0645\u0627\u0646\u06d2 \u067e\u0631\u060c \u0631\u0648\u0627\u06cc\u062a\u06cc \u06a9\u0648\u0688 \u0631\u06cc\u0648\u06cc\u0648 \u0641\u0627\u0631\u0645\u06cc\u0679\u0633 \u0679\u0648\u0679\u0646\u0627 \u0634\u0631\u0648\u0639 \u06c1\u0648 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0622\u067e \u06a9\u0648 \u06a9\u0648\u0688 \u06a9\u0627 \u062c\u0627\u0626\u0632\u06c1 \u0644\u06cc\u0646\u06d2 \u0645\u06cc\u06ba \u0627\u0635\u0644 \u0645\u06cc\u06ba \u0627\u0633\u06d2 \u0644\u06a9\u06be\u0646\u06d2 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0648\u0642\u062a \u0635\u0631\u0641 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631\u060c \u0622\u067e \u06a9\u06d2 \u067e\u0627\u0633 \u0627\u06cc\u06a9 \u0628\u0691\u0627 TypeScript \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06c1\u0648 \u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0622\u067e \u0628\u0638\u0627\u06c1\u0631 \u0622\u0633\u0627\u0646 \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u0627 \u062c\u0648\u0627\u0628 \u062f\u06cc\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u06cc\u0633\u06d2:<\/p>\n<blockquote>\n<p>&quot;\u0627\u0633 \u062e\u0635\u0648\u0635\u06cc\u062a \u06a9\u0648 \u06a9\u06cc\u0627 \u06a9\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba\u061f&#8221;<\/p>\n<\/blockquote>\n<p>\u0622\u067e \u0634\u0627\u06cc\u062f \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u0648 \u062a\u0644\u0627\u0634 \u06a9\u0631\u06a9\u06d2 \u0634\u0631\u0648\u0639 \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u06d4 \u0622\u067e \u0627\u06cc\u0688\u06cc\u0679\u0631 \u06a9\u06cc &quot;\u0641\u0627\u0626\u0646\u0688 \u0631\u06cc\u0641\u0631\u06cc\u0646\u0633\u0632&#8221; \u0641\u06cc\u0686\u0631 \u0628\u06be\u06cc \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0622\u067e \u062a\u0639\u0631\u06cc\u0641\u0648\u06ba \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0628\u06be\u06cc \u0645\u0646\u062a\u0642\u0644 \u06c1\u0648 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0622\u067e \u062f\u0631\u0622\u0645\u062f\u060c \u0628\u0631\u0622\u0645\u062f\u060c \u0627\u0648\u0631 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u06d2 \u0646\u0627\u0645 \u062a\u0644\u0627\u0634 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0644\u06cc\u06a9\u0646 \u0645\u0633\u0626\u0644\u06c1 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0633\u0648\u0686\u0646\u06d2 \u06a9\u0627 \u0627\u06cc\u06a9 \u0627\u0648\u0631 \u0637\u0631\u06cc\u0642\u06c1 \u06c1\u06d2\u06d4 \u0627\u067e\u0646\u06d2 \u06a9\u0648\u0688 \u0628\u06cc\u0633 \u06a9\u0648 \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u06d2 \u0645\u062c\u0645\u0648\u0639\u06d2 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0633\u0645\u062c\u06be\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u0622\u067e \u0627\u0633\u06d2 \u06af\u0631\u0627\u0641 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0645\u0627\u0688\u0644 \u0628\u0646\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0641\u0646\u06a9\u0634\u0646 \u0646\u0648\u0688\u0633 \u0628\u0646 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u06a9\u0627\u0644\u0632 \u06a9\u0646\u0627\u0631\u06d2 \u0628\u0646 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u062c\u0628 \u0622\u067e \u06af\u0631\u0627\u0641 \u06a9\u0648\u0688 \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0622\u067e \u0627\u0633 \u0637\u0631\u062d \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u060c &quot;\u0645\u06cc\u06ba \u0627\u0633 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0648 \u06a9\u06cc\u0627 \u06a9\u06c1\u0648\u06ba\u061f&#8221; \u0627\u06cc\u06a9 \u06c1\u06cc \u0633\u0648\u0627\u0644 \u0622\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u0627 &quot;\u06cc\u06c1 \u0641\u0646\u06a9\u0634\u0646 \u0622\u062e\u0631 \u06a9\u0627\u0644 \u06a9\u06cc\u0627 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u061f&#8221; \u06cc\u06c1 \u06af\u0631\u0627\u0641 \u0679\u0631\u0627\u0648\u0631\u0633\u0644 \u0645\u0633\u0626\u0644\u06c1 \u0628\u0646 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0633 \u0679\u06cc\u0648\u0679\u0648\u0631\u06cc\u0644 \u0645\u06cc\u06ba\u060c \u06c1\u0645 TypeScript \u0627\u0648\u0631 VS Code \u06a9\u06d2 \u0628\u0644\u0679 \u0627\u0646 \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c API \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u06a9\u0648\u0688 \u06af\u0631\u0627\u0641 \u06a9\u0627 \u0628\u0646\u06cc\u0627\u062f\u06cc \u062d\u0635\u06c1 \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06c1\u0645 \u0627\u067e\u0646\u0627 TypeScript \u067e\u0627\u0631\u0633\u0631 \u0646\u06c1\u06cc\u06ba \u0644\u06a9\u06be\u06cc\u06ba \u06af\u06d2\u06d4 \u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u06cc\u06c1 VS \u06a9\u0648\u0688 \u0627\u0648\u0631 \u0627\u0646\u0633\u0679\u0627\u0644 \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062f\u06c1 \u0645\u0639\u0646\u0648\u06cc \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0646\u062a\u06cc\u062c\u06c1 \u0627\u06cc\u06a9 \u06af\u0631\u0627\u0641 \u06c1\u06d2 \u062c\u0633 \u0645\u06cc\u06ba \u0641\u0627\u0626\u0644\u06cc\u06ba\u060c \u0641\u0646\u06a9\u0634\u0646\u0632\u060c \u0637\u0631\u06cc\u0642\u06d2\u060c \u0627\u0648\u0631 \u06a9\u0627\u0644 \u062a\u0639\u0644\u0642\u0627\u062a \u06c1\u06cc\u06ba \u062c\u0648 VS Code Webview \u0645\u06cc\u06ba \u062f\u06a9\u06be\u0627\u0626\u06d2 \u062c\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-table-of-contents\">\u0627\u0646\u0688\u06cc\u06a9\u0633<\/h2>\n<h2 id=\"heading-what-were-building\">\u06c1\u0645 \u06a9\u06cc\u0627 \u0628\u0646\u0627 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba<\/h2>\n<p>\u06c1\u0645 VS Code&#8217;s Call Hierarchy API \u06a9\u0648 \u0627\u06cc\u06a9 \u0686\u06be\u0648\u0679\u0627 \u06a9\u0648\u0688 \u06af\u0631\u0627\u0641 \u0627\u0646\u062c\u0646 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba \u06af\u06d2 \u062c\u0648 \u0627\u0641\u0639\u0627\u0644 \u0627\u0648\u0631 \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u062a\u0639\u0644\u0642\u0627\u062a \u06a9\u0648 \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u067e\u06be\u0631 \u0627\u0646 \u062a\u0639\u0644\u0642\u0627\u062a \u06a9\u0648 \u0645\u062a\u0639\u062f\u062f \u06c1\u0627\u067e\u0633 \u067e\u0631 \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0631\u0627\u0633\u062a\u06d2 \u0645\u06cc\u06ba\u060c \u06c1\u0645 \u06c1\u0645 \u0622\u06c1\u0646\u06af\u06cc\u060c \u067e\u0631\u0627\u0646\u06d2 \u0632\u0628\u0627\u0646 \u06a9\u06d2 \u0679\u0648\u0644 \u06a9\u06d2 \u062d\u0648\u0627\u0644\u06c1 \u062c\u0627\u062a\u060c \u06a9\u06cc\u0634\u0646\u06af\u060c \u0627\u0648\u0631 \u0641\u0627\u0644\u062a\u0648 \u0679\u0631\u0627\u0648\u0631\u0633\u0644\u0632 \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u06cc\u06ba \u06af\u06d2 \u062a\u0627\u06a9\u06c1 \u06cc\u06c1 \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u06d2 \u06a9\u06c1 \u06af\u0631\u0627\u0641 \u0645\u0633\u062a\u062d\u06a9\u0645 \u0627\u0648\u0631 \u0645\u0648\u062b\u0631 \u0631\u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-prerequisites\">\u0634\u0631\u0637\u06cc\u06ba<\/h3>\n<p>\u067e\u06cc\u0631\u0648\u06cc \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u0622\u067e \u06a9\u0648 \u062f\u0631\u062c \u0630\u06cc\u0644 \u0633\u06d2 \u0648\u0627\u0642\u0641 \u06c1\u0648\u0646\u0627 \u0686\u0627\u06c1\u0626\u06d2:<\/p>\n<ul>\n<li>\n<p>\u0679\u0627\u0626\u067e \u0627\u0633\u06a9\u0631\u067e\u0679 \u0627\u0648\u0631 \u0628\u0646\u06cc\u0627\u062f\u06cc \u063a\u06cc\u0631 \u0645\u0637\u0627\u0628\u0642\u062a \u067e\u0630\u06cc\u0631 \u067e\u0631\u0648\u06af\u0631\u0627\u0645\u0646\u06af <code>async<\/code>\/<code>await<\/code><\/p>\n<\/li>\n<li>\n<p>\u062a\u0645\u0627\u0645 \u0648\u06cc \u0627\u06cc\u0633 \u06a9\u0648\u0688 \u06c1\u0645 \u0622\u06c1\u0646\u06af \u06a9\u0648\u0688\u060c \u0648\u06cc \u0627\u06cc\u0633 \u06a9\u0648\u0688 \u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646 API\u060c \u0627\u0648\u0631 <code>vscode.commands.executeCommand<\/code><\/p>\n<\/li>\n<li>\n<p>\u0628\u0646\u06cc\u0627\u062f\u06cc \u06af\u0631\u0627\u0641 \u06a9\u06d2 \u062a\u0635\u0648\u0631\u0627\u062a \u062c\u06cc\u0633\u06d2 \u06a9\u06c1 \u0646\u0648\u0688\u0633\u060c \u06a9\u0646\u0627\u0631\u06d2\u060c \u0627\u0648\u0631 \u0686\u0648\u0691\u0627\u0626\u06cc-\u067e\u06c1\u0644\u06cc \u062a\u0644\u0627\u0634 (BFS)<\/p>\n<\/li>\n<li>\n<p>TypeScript \u0645\u06cc\u06ba \u0646\u0642\u0634\u0648\u06ba\u060c \u0635\u0641\u0648\u06ba \u0627\u0648\u0631 \u0639\u0627\u0645 \u0627\u0641\u0639\u0627\u0644 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u0627\u0645 \u06a9\u0631\u0646\u0627<\/p>\n<\/li>\n<\/ul>\n<p>\u0686\u0644\u0648!<\/p>\n<p>\u06c1\u0645 \u06a9\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0622\u067e \u06a9\u06d2 \u067e\u0627\u0633 \u0627\u0633 \u0637\u0631\u062d \u06a9\u0627 \u06a9\u0648\u0688 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-ts\">function checkout() {\n  processPayment();\n}\n\nfunction processPayment() {\n  chargeCard();\n}\n\nfunction chargeCard() {\n  saveTransaction();\n}\n\nfunction saveTransaction() {\n  \/\/ persist transaction\n}\n<\/code><\/pre>\n<p>\u06c1\u0645 \u0633\u0648\u0631\u0633 \u06a9\u0648\u0688 \u06a9\u0648 \u06af\u0631\u0627\u0641 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06cc\u06a9 \u062d\u0642\u06cc\u0642\u06cc \u06a9\u0648\u0688\u0628\u06cc\u0633 \u0645\u06cc\u06ba\u060c \u06af\u0631\u0627\u0641 \u0645\u062a\u0639\u062f\u062f \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u0648 \u067e\u06be\u06cc\u0644\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/10\/1790961232_169_VS-\u06a9\u0648\u0688-\u06a9\u06cc-\u0632\u0628\u0627\u0646-API-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-TypeScript.png\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u06cc\u06c1 \u062f\u06a9\u06be\u0627\u062a\u06cc \u06c1\u06d2 \u06a9\u06c1 \u062c\u0628 \u0627\u06cc\u06a9 \u06af\u0631\u0627\u0641 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u062a\u0635\u0648\u0631 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u062a\u0648 \u0645\u0644\u0679\u06cc \u0641\u0627\u0626\u0644 \u06a9\u0648\u0688\u0628\u06cc\u0633 \u06a9\u06cc\u0633\u0627 \u0644\u06af\u062a\u0627 \u06c1\u06d2\u06d4\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0646\u0641\u0627\u0630 \u06a9\u06d2 \u062f\u0648 \u0627\u06c1\u0645 \u062d\u0635\u06d2 \u06c1\u06cc\u06ba: \u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646 \u06c1\u0648\u0633\u0679 \u06af\u0631\u0627\u0641 \u06a9\u0648 \u0628\u0627\u0632\u06cc\u0627\u0641\u062a \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 VS \u06a9\u0648\u0688 \u06a9\u06cc \u0632\u0628\u0627\u0646 API \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0646\u062a\u06cc\u062c\u06d2 \u0645\u06cc\u06ba \u06af\u0631\u0627\u0641 \u0648\u06cc\u0628 \u0648\u06cc\u0648 \u0645\u06cc\u06ba \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u0641\u0646 \u062a\u0639\u0645\u06cc\u0631 \u06a9\u0627 \u0627\u06cc\u06a9 \u062f\u0644\u0686\u0633\u067e \u062d\u0635\u06c1 \u06af\u0631\u0627\u0641 \u0628\u0644\u0688\u0631 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-1-understanding-the-vs-code-language-apis\">1. VS \u06a9\u0648\u0688 \u0632\u0628\u0627\u0646 API \u06a9\u0648 \u0633\u0645\u062c\u06be\u06cc\u06ba\u06d4<\/h2>\n<p>VS \u06a9\u0648\u0688 \u067e\u06c1\u0644\u06d2 \u06c1\u06cc \u06a9\u0626\u06cc \u06a9\u0645\u0627\u0646\u0688\u0632 \u06a9\u0648 \u0628\u06d2 \u0646\u0642\u0627\u0628 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u06a9\u06c1 \u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646\u0632 \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0627\u0646\u0679\u06cc\u0644\u06cc \u062c\u0646\u0633 \u06a9\u0648 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u0627\u0633 \u0645\u0646\u0635\u0648\u0628\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0686\u0627\u0631 \u0686\u06cc\u0632\u06cc\u06ba \u062e\u0627\u0635 \u0637\u0648\u0631 \u067e\u0631 \u0645\u0641\u06cc\u062f \u06c1\u06cc\u06ba:<\/p>\n<table>\n<thead>\n<tr>\n<th>\u062d\u06a9\u0645<\/th>\n<th>\u0645\u0642\u0635\u062f<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>vscode.executeDocumentSymbolProvider<\/code><\/td>\n<td>\u062f\u0633\u062a\u0627\u0648\u06cc\u0632\u0627\u062a \u0645\u06cc\u06ba \u0639\u0644\u0627\u0645\u062a\u06cc\u06ba \u062a\u0644\u0627\u0634 \u06a9\u0631\u06cc\u06ba\u06d4<\/td>\n<\/tr>\n<tr>\n<td><code>vscode.prepareCallHierarchy<\/code><\/td>\n<td>\u06a9\u0631\u0646\u0633\u06cc \u0644\u06cc\u0626\u0631 \u0622\u0626\u0679\u0645\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0642\u0627\u0645 \u06a9\u0627 \u062a\u0639\u06cc\u0646 \u06a9\u0631\u06cc\u06ba\u06d4<\/td>\n<\/tr>\n<tr>\n<td><code>vscode.provideIncomingCalls<\/code><\/td>\n<td>\u06a9\u0627\u0644\u0631 \u062a\u0644\u0627\u0634 \u06a9\u0631\u06cc\u06ba\u06d4<\/td>\n<\/tr>\n<tr>\n<td><code>vscode.provideOutgoingCalls<\/code><\/td>\n<td>\u0627\u06cc\u06a9 \u0648\u0635\u0648\u0644 \u06a9\u0646\u0646\u062f\u06c1 \u062a\u0644\u0627\u0634 \u06a9\u0631\u06cc\u06ba\u06d4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u06cc\u06c1 APIs \u0632\u0628\u0627\u0646 \u06a9\u06d2 \u0645\u062e\u0635\u0648\u0635 \u0646\u0641\u0627\u0630 \u06a9\u06d2 \u0633\u0628 \u0633\u06d2 \u0627\u0648\u067e\u0631 \u0628\u06cc\u0679\u06be\u06d2 \u06c1\u06cc\u06ba\u06d4 TypeScript \u0627\u0648\u0631 JavaScript \u06a9\u06d2 \u0644\u06cc\u06d2\u060c TypeScript \u0632\u0628\u0627\u0646 \u06a9\u06cc \u062e\u062f\u0645\u062a \u0628\u0646\u06cc\u0627\u062f\u06cc \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4 \u062f\u06cc\u06af\u0631 \u0632\u0628\u0627\u0646\u06cc\u06ba\u060c \u062c\u06cc\u0633\u06d2 Gopls for Go\u060c Rust-analyser for Rust\u060c \u0627\u0648\u0631 Pyright \u06cc\u0627 Pylance for Python\u060c \u0627\u067e\u0646\u06cc \u0632\u0628\u0627\u0646 \u06a9\u06cc \u062a\u0648\u0633\u06cc\u0639 \u0627\u0648\u0631 \u0632\u0628\u0627\u0646 \u06a9\u06d2 \u0633\u0631\u0648\u0631\u0632 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0627\u0633\u06cc \u0637\u0631\u062d \u06a9\u06cc \u0641\u0639\u0627\u0644\u06cc\u062a \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u06cc\u06c1 \u062e\u0627\u0635 \u0637\u0648\u0631 \u067e\u0631 \u0627\u06c1\u0645 \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u06cc\u06c1 \u06c1\u0631 \u0632\u0628\u0627\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0644\u06af \u0627\u0644\u06af \u067e\u0627\u0631\u0633\u0631 \u0627\u0648\u0631 \u06a9\u0627\u0644 \u06af\u0631\u0627\u0641 \u0627\u0646\u062c\u0646 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06a9\u0648 \u062e\u062a\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646 VS \u06a9\u0648\u0688 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u062f\u0633\u062a\u0627\u0648\u06cc\u0632 \u06a9\u06cc \u0639\u0644\u0627\u0645\u062a \u0627\u0648\u0631 \u06a9\u0627\u0644 \u0644\u06cc\u0626\u0631 \u0633\u067e\u0648\u0631\u0679 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u060c \u062a\u0648 \u0648\u06c1\u06cc \u06af\u0631\u0627\u0641 \u0628\u0644\u0688\u0646\u06af \u0622\u0631\u06a9\u06cc\u0679\u06cc\u06a9\u0686\u0631 \u0627\u0633 \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u06a9\u0648 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>AST \u0622\u067e \u06a9\u0648 \u0628\u062a\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0627\u06cc\u06a9 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0627\u0644\u0646\u06af \u0627\u06cc\u06a9\u0633\u067e\u0631\u06cc\u0634\u0646 \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06c1\u06d2\u06d4 \u062f\u0631\u0622\u0645\u062f\u0627\u062a\u060c \u0641\u0627\u0626\u0644\u06cc\u06ba\u060c \u0645\u0627\u0688\u06cc\u0648\u0644\u0632\u060c \u06a9\u0644\u0627\u0633\u0632\u060c \u0639\u0631\u0641\u06cc \u0646\u0627\u0645\u060c \u0627\u0648\u0631 \u062f\u06cc\u06af\u0631 \u0632\u0628\u0627\u0646 \u06a9\u06cc \u062a\u0639\u0645\u06cc\u0631\u0627\u062a \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0622\u067e \u06a9\u0648 \u06cc\u06c1 \u0646\u06c1\u06cc\u06ba \u0628\u062a\u0627\u062a\u06cc \u06c1\u06cc\u06ba \u06a9\u06c1 \u06a9\u0627\u0644 \u06a9\u06d2 \u062d\u0648\u0627\u0644\u06d2 \u0633\u06d2 \u06a9\u06cc\u0627 \u0641\u0646\u06a9\u0634\u0646 \u06c1\u06d2\u06d4<\/p>\n<p>\u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0633\u0631\u0648\u0631 \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u06c1\u06cc \u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 \u0633\u06cc\u0645\u0646\u0679\u06a9 \u06a9\u0627\u0645 \u0627\u0646\u062c\u0627\u0645 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4 \u0644\u06c1\u0630\u0627\u060c \u0627\u06cc\u06a9 \u0627\u0648\u0631 \u062a\u062c\u0632\u06cc\u06c1 \u06a9\u0627\u0631 \u0627\u0648\u0631 \u0639\u0644\u0627\u0645\u062a \u062d\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u0622\u067e \u0627\u06cc\u0633\u06cc \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0637\u0644\u0628 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 VS \u06a9\u0648\u0688 \u06a9\u0648 \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0645\u0639\u0644\u0648\u0645 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-2-setting-up-the-extension\">2. \u062a\u0648\u0633\u06cc\u0639 \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628\u0627\u062a<\/h2>\n<p>\u06c1\u0645\u0627\u0631\u06d2 <code>package.json<\/code> \u062f\u0631\u062c \u0630\u06cc\u0644 \u06a9\u0645\u0627\u0646\u0688 \u06a9\u0627 \u0627\u0639\u0644\u0627\u0646 \u06a9\u0631\u06cc\u06ba:<\/p>\n<pre><code class=\"language-json\">{\n  \"main\": \".\/out\/extension.js\",\n  \"engines\": {\n    \"vscode\": \"^1.85.0\"\n  },\n  \"activationEvents\": [],\n  \"contributes\": {\n    \"commands\": [\n      {\n        \"command\": \"codeGraphView.open\",\n        \"title\": \"Code Graph: Open Graph for Active File\",\n        \"icon\": \"$(type-hierarchy)\"\n      }\n    ],\n    \"menus\": {\n      \"editor\/title\": [\n        {\n          \"command\": \"codeGraphView.open\",\n          \"group\": \"navigation\",\n          \"when\": \"resourceLangId == typescript\"\n        }\n      ]\n    }\n  },\n  \"dependencies\": {\n    \"elkjs\": \"^0.9.3\"\n  }\n}\n<\/code><\/pre>\n<p>\u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646 \u06c1\u0648\u0633\u0679 \u0627\u0648\u0631 \u0648\u06cc\u0628 \u0648\u06cc\u0648 \u0645\u062e\u062a\u0644\u0641 \u0645\u0627\u062d\u0648\u0644 \u0645\u06cc\u06ba \u0686\u0644\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633 \u0644\u06cc\u06d2 \u0627\u0644\u06af \u0627\u0644\u06af \u0628\u0646\u0688\u0644 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06cc\u06a9 \u0622\u0633\u0627\u0646 esbuild \u062a\u0631\u062a\u06cc\u0628 \u0627\u0633 \u0637\u0631\u062d \u0646\u0638\u0631 \u0622\u0626\u06d2 \u06af\u06cc:<\/p>\n<pre><code class=\"language-js\">const extensionConfig = {\n  entryPoints: ['src\/extension.ts'],\n  bundle: true,\n  outfile: 'out\/extension.js',\n  external: ['vscode'],\n  format: 'cjs',\n  platform: 'node',\n};\n\nconst webviewConfig = {\n  entryPoints: ['webview\/main.ts'],\n  bundle: true,\n  outfile: 'out\/webview\/main.js',\n  format: 'iife',\n  platform: 'browser',\n};\n<\/code><\/pre>\n<p>\u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646 \u06a9\u0648\u0688 \u0646\u0648\u0688 \u0645\u06cc\u06ba \u0686\u0644\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0648\u06cc\u0628 \u0648\u06cc\u0648 \u06a9\u0648\u0688 \u0628\u0631\u0627\u0624\u0632\u0631 \u06a9\u06d2 \u0645\u0627\u062d\u0648\u0644 \u0645\u06cc\u06ba \u0686\u0644\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-3-designing-the-graph-data-model\">3. \u06af\u0631\u0627\u0641 \u0688\u06cc\u0679\u0627 \u0645\u0627\u0688\u0644 \u0688\u06cc\u0632\u0627\u0626\u0646<\/h2>\n<p>\u0632\u0628\u0627\u0646 API \u06a9\u0648 \u06a9\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u0622\u067e \u06a9\u0648 \u06cc\u06c1 \u0641\u06cc\u0635\u0644\u06c1 \u06a9\u0631\u0646\u0627 \u06c1\u0648\u06af\u0627 \u06a9\u06c1 \u06af\u0631\u0627\u0641 \u06a9\u06cc\u0633\u0627 \u0646\u0638\u0631 \u0622\u0626\u06d2 \u06af\u0627\u06d4 \u06a9\u0686\u06be \u0645\u0641\u06cc\u062f \u0645\u0627\u0688\u0644\u0632 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-typescript\">export interface SymbolRow {\n  id: string;\n  name: string;\n  kind: 'function' | 'method';\n  line: number;\n  character: number;\n}\n\nexport interface FileNode {\n  id: string;\n  label: string;\n  file: string;\n  symbols: SymbolRow[];\n}\n\nexport interface CallEdge {\n  id: string;\n  source: string;\n  target: string;\n}\n\nexport interface GraphData {\n  rootFileId: string;\n  rootSymbolId?: string;\n  roots: string[];\n  files: FileNode[];\n  edges: CallEdge[];\n  truncated: boolean;\n}\n<\/code><\/pre>\n<p>\u062f\u0648 \u0627\u06c1\u0645 \u062a\u0635\u0648\u0631\u0627\u062a \u06c1\u06cc\u06ba:<\/p>\n<ol>\n<li>\n<p>\u06a9\u0648\u0626\u06cc \u0631\u0627\u0633\u062a\u06c1 \u0646\u06c1\u06cc\u06ba <code>FileNode<\/code> \u0641\u0627\u0626\u0644 \u0633\u06d2 \u062a\u0639\u0644\u0642 \u0631\u06a9\u06be\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0627\u0641\u0639\u0627\u0644 \u06cc\u0627 \u0637\u0631\u06cc\u0642\u0648\u06ba \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<li>\n<p>\u06a9\u0648\u0626\u06cc \u0631\u0627\u0633\u062a\u06c1 \u0646\u06c1\u06cc\u06ba <code>CallEdge<\/code> \u062f\u0648 \u0639\u0644\u0627\u0645\u062a\u0648\u06ba \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u062a\u0639\u0644\u0642 \u06a9\u06cc \u0646\u0634\u0627\u0646\u062f\u06c1\u06cc \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<\/ol>\n<p>\u06a9\u0646\u0627\u0631\u06d2 \u06a9\u06cc \u0648\u0627\u0642\u0641\u06cc\u062a \u06a9\u0648 \u0645\u0633\u062a\u0642\u0644 \u0631\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-text\">caller \u2192 callee\n<\/code><\/pre>\n<p>\u067e\u06be\u0631 <code>checkout()<\/code> \u0641\u0648\u0646 \u06a9\u0627\u0644 <code>processPayment()<\/code>\u06af\u0631\u0627\u0641 \u0645\u06cc\u06ba \u06c1\u0645\u06cc\u0634\u06c1 \u0634\u0627\u0645\u0644 \u06c1\u0648\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-text\">checkout \u2192 processPayment\n<\/code><\/pre>\n<p>\u06cc\u06c1\u0627\u06ba \u062a\u06a9 \u06a9\u06c1 \u0627\u06af\u0631 \u0622\u067e \u06a9\u0648 \u0622\u0646\u06d2 \u0648\u0627\u0644\u06cc \u06a9\u0627\u0644 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a \u0648\u06c1 \u0631\u0634\u062a\u06c1 \u062f\u0631\u06cc\u0627\u0641\u062a \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-stable-symbol-ids\">\u0645\u0633\u062a\u062d\u06a9\u0645 \u0639\u0644\u0627\u0645\u062a ID<\/h3>\n<p>\u0641\u0646\u06a9\u0634\u0646 \u06a9\u06d2 \u0646\u0627\u0645 \u0645\u0646\u0641\u0631\u062f \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4 \u0645\u0646\u0635\u0648\u0628\u0648\u06ba \u0645\u06cc\u06ba \u0622\u0633\u0627\u0646\u06cc \u0633\u06d2 \u0634\u0627\u0645\u0644 \u06c1\u0648\u0633\u06a9\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-typescript\">\/\/ users.ts\nfunction save() {}\n<\/code><\/pre>\n<p>\u0627\u0648\u0631:<\/p>\n<pre><code class=\"language-typescript\">\/\/ payments.ts\nfunction save() {}\n<\/code><\/pre>\n<p>\u0644\u06c1\u0630\u0627\u060c \u06c1\u0645\u06cc\u06ba \u0639\u0644\u0627\u0645\u062a \u06a9\u06d2 \u0645\u0642\u0627\u0645 \u06a9\u06cc \u0628\u0646\u06cc\u0627\u062f \u067e\u0631 \u0627\u06cc\u06a9 \u0634\u0646\u0627\u062e\u062a \u06a9\u0646\u0646\u062f\u06c1 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-typescript\">function idOf(\n  uri: vscode.Uri,\n  pos: vscode.Position\n): string {\n  return `${uri.toString()}#${pos.line}:${pos.character}`;\n}\n<\/code><\/pre>\n<p>\u06a9\u0627\u0644 \u067e\u0631\u062a \u0627\u0646\u062f\u0631\u0627\u062c\u0627\u062a \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u0627\u0646 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 <code>selectionRange<\/code>:<\/p>\n<pre><code class=\"language-typescript\">function itemId(\n  item: vscode.CallHierarchyItem\n): string {\n  return idOf(\n    item.uri,\n    item.selectionRange.start\n  );\n}\n<\/code><\/pre>\n<p>\u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba <code>selectionRange<\/code> \u06cc\u06c1 \u0645\u0641\u06cc\u062f \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u06cc\u06c1 \u0627\u0639\u0644\u0627\u0646 \u06a9\u06d2 \u067e\u0648\u0631\u06d2 \u062c\u0633\u0645 \u06cc\u0627 \u062f\u0627\u0626\u0631\u06c1 \u06a9\u0627\u0631 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0639\u0644\u0627\u0645\u062a \u06a9\u06d2 \u0646\u0627\u0645 \u06a9\u06cc \u0634\u0646\u0627\u062e\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0645\u0633\u062a\u062d\u06a9\u0645 ID \u0688\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 \u06a9\u06cc \u0628\u0646\u06cc\u0627\u062f \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0627\u06cc\u06a9 \u06c1\u06cc \u0641\u0646\u06a9\u0634\u0646 \u06af\u0631\u0627\u0641 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0645\u062a\u0639\u062f\u062f \u0631\u0627\u0633\u062a\u0648\u06ba \u067e\u0631 \u067e\u0627\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0622\u067e \u062f\u06cc\u06a9\u06be \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u062a\u0645\u0627\u0645 \u062f\u0631\u06cc\u0627\u0641\u062a\u06cc\u06ba \u0627\u06cc\u06a9 \u06c1\u06cc \u0646\u0648\u0688 \u06a9\u0627 \u062d\u0648\u0627\u0644\u06c1 \u062f\u06d2 \u0631\u06c1\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-4-finding-functions-and-methods\">4. \u0627\u0641\u0639\u0627\u0644 \u0627\u0648\u0631 \u0637\u0631\u06cc\u0642\u06d2 \u062a\u0644\u0627\u0634 \u06a9\u0631\u06cc\u06ba\u06d4<\/h2>\n<p>\u06af\u0631\u0627\u0641 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u0627 \u067e\u06c1\u0644\u0627 \u0645\u0631\u062d\u0644\u06c1 \u0641\u0639\u0627\u0644 \u0641\u0627\u0626\u0644 \u0645\u06cc\u06ba \u0639\u0644\u0627\u0645\u062a \u062a\u0644\u0627\u0634 \u06a9\u0631\u0646\u0627 \u06c1\u06d2\u06d4 VS \u06a9\u0648\u0688 \u062f\u0633\u062a\u0627\u0648\u06cc\u0632 \u06a9\u06cc \u0639\u0644\u0627\u0645\u062a\u0648\u06ba \u06a9\u0648 \u0627\u0633 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-text\">vscode.executeDocumentSymbolProvider\n<\/code><\/pre>\n<p>\u06c1\u0645 \u0627\u0633\u06d2 \u06cc\u06c1 \u06a9\u06c1\u06c1 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-ts\">\/*\n * Get all symbols in a document using VS Code's\n * built-in language service instead of parsing the code ourselves. This was we can get the methods, functions, variables within a document\n *\/\nasync function getDocumentSymbols(\n  uri: vscode.Uri\n): Promise<vscode.documentsymbol> {\n\n  \/*\n   * `vscode.executeDocumentSymbolProvider` delegates the analysis\n   * to the language provider registered for the document's language.\n   *\/\n\n  const result =\n    await vscode.commands.executeCommand<\n      vscode.DocumentSymbol[] | undefined\n    >(\n      'vscode.executeDocumentSymbolProvider',\n      uri\n    );\n\n  \/\/ Return an empty list if no symbols are found.\n  return result ?? [];\n}\n<\/vscode.documentsymbol><\/code><\/pre>\n<p>\u0644\u0648\u0679\u06cc \u06c1\u0648\u0626\u06cc \u0639\u0644\u0627\u0645\u062a\u06cc\u06ba \u0627\u06cc\u06a9 \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u0628\u0646\u0627\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/10\/1790961233_878_VS-\u06a9\u0648\u0688-\u06a9\u06cc-\u0632\u0628\u0627\u0646-API-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-TypeScript.png\" alt=\"\u0627\u067e\u0646\u06d2 \u06af\u0631\u0627\u0641 \u06a9\u0648 \u0628\u0635\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0622\u0633\u0627\u0646 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u0622\u067e \u06a9\u0648 \u0627\u06cc\u06a9 \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u06c1\u0645\u06cc\u06ba \u0627\u0633 \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u0633\u06d2 \u06af\u0632\u0631\u0646\u06d2 \u0627\u0648\u0631 \u0627\u06cc\u0633\u06cc \u0639\u0644\u0627\u0645\u062a\u06cc\u06ba \u062c\u0645\u0639 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2 \u062c\u0648 \u0642\u0627\u0628\u0644 \u06a9\u0627\u0644 \u06a9\u0648\u0688 \u06a9\u06cc \u0646\u0645\u0627\u0626\u0646\u062f\u06af\u06cc \u06a9\u0631 \u0633\u06a9\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-typescript\">\/\/ Check whether a symbol can be treated as a callable node.\nconst isCallableKind = (\n  kind: vscode.SymbolKind,\n  includeConstructors: boolean\n) =>\n  kind === vscode.SymbolKind.Function ||\n  kind === vscode.SymbolKind.Method ||\n  (\n    includeConstructors &&\n    kind === vscode.SymbolKind.Constructor\n  );\n<\/code><\/pre>\n<p>\u0639\u0644\u0627\u0645\u062a\u06cc \u062f\u0631\u062e\u062a\u0648\u06ba \u06a9\u06cc \u0628\u0627\u0631 \u0628\u0627\u0631 \u062c\u0627\u0646\u0686 \u06a9\u06cc \u062c\u0627 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-ts\">  \/\/ Recursively collect functions, methods, and variables from a symbol tree\nfunction collectCandidates(\n  symbols: vscode.DocumentSymbol[],\n  isCallable: (\n    kind: vscode.SymbolKind\n  ) => boolean,\n  out: vscode.DocumentSymbol[] = []\n) {\n  for (const symbol of symbols) {\n    if (\n      isCallable(symbol.kind) ||\n      symbol.kind === vscode.SymbolKind.Variable\n    ) {\n      out.push(symbol);\n    } else if (\n      symbol.children.length\n    ) {\n      collectCandidates(\n        symbol.children,\n        isCallable,\n        out\n      );\n    }\n  }\n  return out;\n}\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0645\u062a\u063a\u06cc\u0631\u0627\u062a \u067e\u0631 \u063a\u0648\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0642\u0627\u0628\u0644 \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0627\u0646 \u06a9\u0648 \u062a\u0641\u0648\u06cc\u0636 \u06a9\u0631\u062f\u06c1 \u0641\u0646\u06a9\u0634\u0646\u0632 \u0632\u0628\u0627\u0646 \u06a9\u06d2 \u0622\u0644\u06d2 \u06a9\u06d2 \u0644\u062d\u0627\u0638 \u0633\u06d2 \u0645\u062e\u062a\u0644\u0641 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u0631\u067e\u0648\u0631\u0679 \u06a9\u06cc\u06d2 \u062c\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631:<\/p>\n<pre><code class=\"language-typescript\">const handler = () => {\n  \/\/ ...\n};\n<\/code><\/pre>\n<p>\u0639\u0644\u0627\u0645\u062a\u0648\u06ba \u06a9\u0648 \u0645\u062a\u063a\u06cc\u0631 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0631\u067e\u0648\u0631\u0679 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u0686\u0627\u06c1\u06d2 \u0648\u06c1 \u06a9\u0627\u0644\u0646\u06af \u06a9\u06d2 \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u0645\u06cc\u06ba \u0634\u0631\u06cc\u06a9 \u06c1\u0648\u06ba\u06d4<\/p>\n<h2 id=\"heading-5-finding-the-symbol-at-a-position\">5. \u06a9\u0633\u06cc \u0645\u062e\u0635\u0648\u0635 \u0645\u0642\u0627\u0645 \u067e\u0631 \u0639\u0644\u0627\u0645\u062a \u062a\u0644\u0627\u0634 \u06a9\u0631\u06cc\u06ba\u06d4<\/h2>\n<p>\u062c\u0628 \u06a9\u0648\u0626\u06cc \u0635\u0627\u0631\u0641 \u06a9\u0633\u06cc \u062e\u0627\u0635 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06af\u0631\u0627\u0641 \u06a9\u06be\u0648\u0644\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u06c1\u0645\u06cc\u06ba \u06cc\u06c1 \u062a\u0639\u06cc\u0646 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2 \u06a9\u06c1 \u06a9\u0648\u0646 \u0633\u06cc \u0639\u0644\u0627\u0645\u062a \u06a9\u0631\u0633\u0631 \u06a9\u06cc \u067e\u0648\u0632\u06cc\u0634\u0646 \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06c1\u06d2\u06d4 \u0686\u0648\u0646\u06a9\u06c1 \u062f\u0633\u062a\u0627\u0648\u06cc\u0632 \u06a9\u06cc \u0639\u0644\u0627\u0645\u062a\u06cc\u06ba \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u06a9\u06d2 \u0645\u0637\u0627\u0628\u0642 \u06c1\u0648\u062a\u06cc \u06c1\u06cc\u06ba\u060c \u0627\u0633 \u0644\u06cc\u06d2 \u06c1\u0645 \u0645\u0642\u0627\u0645 \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06af\u06c1\u0631\u06cc \u062a\u0631\u06cc\u0646 \u0639\u0644\u0627\u0645\u062a \u06a9\u0648 \u0628\u0627\u0631 \u0628\u0627\u0631 \u062a\u0644\u0627\u0634 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-typescript\">\/\/ Find the most specific symbol containing a given position.\nfunction symbolAt(\n  symbols: vscode.DocumentSymbol[],\n  position: vscode.Position\n) {\n  for (const symbol of symbols) {\n    if (symbol.range.contains(position)) {\n      return (\n        symbolAt(\n          symbol.children,\n          position\n        ) ?? symbol\n      );\n    }\n  }\n  return undefined;\n}\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0627\u06cc\u0688\u06cc\u0679\u0631 \u0627\u0648\u0631 \u06af\u0631\u0627\u0641 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0627\u06cc\u06a9 \u067e\u0644 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0635\u0627\u0631\u0641 \u0633\u0648\u0631\u0633 \u0641\u0627\u0626\u0644 \u0645\u06cc\u06ba \u062c\u06af\u06c1 \u06a9\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0639\u0644\u0627\u0645\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0645\u0642\u0627\u0645 \u06a9\u06cc \u062a\u0635\u062f\u06cc\u0642 \u06a9\u0631\u06cc\u06ba\u06d4 \u0627\u0633 \u06a9\u06d2 \u0628\u0639\u062f \u06cc\u06c1 \u0627\u0646 \u0639\u0644\u0627\u0645\u062a\u0648\u06ba \u06a9\u0648 \u06a9\u0627\u0644 \u0644\u06cc\u0626\u0631 \u0622\u0626\u0679\u0645\u0632 \u0633\u06d2 \u062a\u0639\u0628\u06cc\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-6-resolving-the-call-hierarchy\">6. \u06a9\u0631\u0646\u0633\u06cc \u06a9\u06d2 \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u06a9\u0648 \u062d\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/h2>\n<p>\u06a9\u0627\u0644 \u0644\u06cc\u0626\u0631 API \u062f\u0648 \u0645\u0631\u0627\u062d\u0644 \u0645\u06cc\u06ba \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2: \u067e\u06c1\u0644\u0627:<\/p>\n<pre><code class=\"language-text\">position \u2192 CallHierarchyItem\n<\/code><\/pre>\n<p>\u067e\u06be\u0631:<\/p>\n<pre><code class=\"language-text\">CallHierarchyItem \u2192 incoming\/outgoing calls\n<\/code><\/pre>\n<p>\u0622\u067e \u0627\u067e\u0646\u06cc \u0627\u0634\u06cc\u0627\u0621 \u06a9\u0648 \u0645\u0646\u062f\u0631\u062c\u06c1 \u0630\u06cc\u0644 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u062a\u06cc\u0627\u0631 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-ts\">async function prepare(\n  uri: vscode.Uri,\n  position: vscode.Position\n) {\n  \/\/ VS Code's language tooling already knows how to resolve\n  \/\/ symbols in a source file.\n  \/\/ So we can use it to prepare a call hierarchy for the symbol at this location.\n  const items =\n    await vscode.commands.executeCommand<\n      vscode.CallHierarchyItem[] | undefined\n    >(\n      'vscode.prepareCallHierarchy',\n      uri,\n      position\n    );\n\n  \/\/ The command returns an array of hierarchy items. In our case,\n  \/\/ we are interested in the symbol directly under the cursor,\n  \/\/ so we use the first result.\n  \/\/ Optional chaining also handles the case where no symbol\n  \/\/ could be resolved at the given position.\n  return items?.[0];\n}\n<\/code><\/pre>\n<p>\u0627\u06cc\u06a9 \u0628\u0627\u0631 \u062c\u0628 \u0622\u067e \u06a9\u06d2 \u067e\u0627\u0633 \u0622\u0626\u0679\u0645 \u06c1\u0648 \u062c\u0627\u0626\u06d2\u060c \u062a\u0648 \u0622\u067e \u06a9\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0633\u06d2 \u067e\u0648\u0686\u06be \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-ts\">async function callers(\n  item: vscode.CallHierarchyItem\n) {\n  \/\/ Ask VS Code for all symbols that call this item.\n  const calls =\n    await vscode.commands.executeCommand<\n      vscode.CallHierarchyIncomingCall[] | undefined\n    >(\n      'vscode.provideIncomingCalls',\n      item\n    );\n\n  \/\/ Return the calling symbols, defaulting to an empty list when none are found.\n  return (\n    calls ?? []\n  ).map(call => call.from);\n}\n<\/code><\/pre>\n<p>\u06cc\u0627 \u0648\u0635\u0648\u0644 \u06a9\u0646\u0646\u062f\u06c1:<\/p>\n<pre><code class=\"language-ts\">async function callees(\n  item: vscode.CallHierarchyItem\n) {\n  \/\/ Ask VS Code for all symbols called by this item.\n  const calls =\n    await vscode.commands.executeCommand<\n      vscode.CallHierarchyOutgoingCall[] | undefined\n    >(\n      'vscode.provideOutgoingCalls',\n      item\n    );\n\n  \/\/ Return the called symbols, defaulting to an empty list when none are found.\n  return (\n    calls ?? []\n  ).map(call => call.to);\n}\n<\/code><\/pre>\n<p>\u062f\u0631\u062c \u0630\u06cc\u0644 \u0635\u0648\u0631\u062a\u0648\u06ba \u0645\u06cc\u06ba:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/10\/1790961233_488_VS-\u06a9\u0648\u0688-\u06a9\u06cc-\u0632\u0628\u0627\u0646-API-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-TypeScript.png\" alt=\"\u0627\u06cc\u06a9 \u06a9\u0648\u0688 \u06af\u0631\u0627\u0641 \u0645\u06cc\u06ba \u0627\u06a9\u062b\u0631 \u0645\u062a\u0639\u062f\u062f \u06a9\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u06c1\u0648 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0622\u0646\u06d2 \u0648\u0627\u0644\u06cc \u06a9\u0627\u0644 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u0631\u06cc\u06ba\u06d4 <code>processPayment<\/code>\u0632\u0628\u0627\u0646 API \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-text\">checkout\nretryPayment\n<\/code><\/pre>\n<p>\u067e\u06be\u0631 \u06c1\u0645 \u0627\u0633 \u0646\u062a\u06cc\u062c\u06d2 \u06a9\u0648 \u062d\u0633\u0628 \u0630\u06cc\u0644 \u0645\u0639\u0645\u0648\u0644 \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-text\">checkout \u2192 processPayment\nretryPayment \u2192 processPayment\n<\/code><\/pre>\n<p>\u0644\u06c1\u0630\u0627\u060c \u0627\u06cc\u06a9 \u06c1\u06cc \u06af\u0631\u0627\u0641 \u0688\u06be\u0627\u0646\u0686\u06c1 \u0622\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0627\u0648\u0631 \u062c\u0627\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u062f\u0648\u0646\u0648\u06ba \u0679\u0631\u0627\u0648\u0631\u0633\u0644\u0632 \u06a9\u06cc \u0646\u0645\u0627\u0626\u0646\u062f\u06af\u06cc \u06a9\u0631\u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-7-building-a-symbol-registry\">7. \u0639\u0644\u0627\u0645\u062a\u06cc \u0631\u062c\u0633\u0679\u0631\u06cc \u0628\u0646\u0627\u0646\u0627<\/h2>\n<p>\u062c\u06cc\u0633\u0627 \u06a9\u06c1 \u0622\u067e \u06af\u0631\u0627\u0641 \u06a9\u0648 \u06a9\u0631\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0622\u067e \u06a9\u0648 \u0627\u06cc\u06a9 \u06c1\u06cc \u0639\u0644\u0627\u0645\u062a \u0628\u0627\u0631 \u0628\u0627\u0631 \u0646\u0638\u0631 \u0622 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4 \u063a\u0648\u0631 \u06a9\u0631\u06cc\u06ba:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/10\/1790961233_371_VS-\u06a9\u0648\u0688-\u06a9\u06cc-\u0632\u0628\u0627\u0646-API-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-TypeScript.png\" alt=\"\u0631\u062c\u0633\u0679\u0631\u06cc \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0628\u06c1\u062a\u0631 \u06af\u0631\u0627\u0641 \u0648\u06cc\u0698\u0648\u0644\u0627\u0626\u0632\u06cc\u0634\u0646 \u0688\u06cc\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 \u06a9\u0627 \u0646\u062a\u06cc\u062c\u06c1 \u06a9\u0645 \u0634\u0648\u0631 \u0627\u0648\u0631 \u0635\u0627\u0641 \u0633\u062a\u06be\u0631\u0627 \u0644\u0627\u0626\u0646\u0648\u06ba \u0645\u06cc\u06ba \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u06c1\u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0646\u0648\u0688 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4<code>C<\/code>\u062a\u06cc\u0646 \u0646\u06c1\u06cc\u06ba\u06d4 \u0631\u062c\u0633\u0679\u0631\u06cc \u0648\u06c1 \u0688\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 \u067e\u0631\u062a \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-typescript\">class Registry {\n  \/\/ Keep files and their symbols separately so they can be reused across the graph.\n  private readonly files =\n    new Map<string filenode=\"\">();\n\n  \/\/ Store symbols by ID for fast lookup and duplicate detection.\n  private readonly rows =\n    new Map<string symbolrow=\"\">();\n\n  get size() {\n    return this.rows.size;\n  }\n\n  has(id: string) {\n    return this.rows.has(id);\n  }\n\n  register(\n    uri: vscode.Uri,\n    name: string,\n    kind: vscode.SymbolKind,\n    position: vscode.Position\n  ): string {\n    \/\/ Generate a stable ID from the file and symbol position.\n    const id =\n      idOf(uri, position);\n\n    \/\/ Avoid registering the same symbol more than once.\n    if (this.rows.has(id)) {\n      return id;\n    }\n\n    const fileId =\n      uri.toString();\n\n    let file =\n      this.files.get(fileId);\n\n    \/\/ Create the file entry the first time we encounter it.\n    if (!file) {\n      file = {\n        id: fileId,\n        label:\n          vscode.workspace\n            .asRelativePath(uri),\n        file: uri.fsPath,\n        symbols: [],\n      };\n\n      this.files.set(\n        fileId,\n        file\n      );\n    }\n\n    \/\/ Normalize VS Code's symbol kind into the graph's simpler representation.\n    const row: SymbolRow = {\n      id,\n      name,\n      kind:\n        kind ===\n        vscode.SymbolKind.Method\n          ? 'method'\n          : 'function',\n      line: position.line,\n      character:\n        position.character,\n    };\n\n    \/\/ Store the symbol globally and under its containing file.\n    this.rows.set(id, row);\n    file.symbols.push(row);\n\n    return id;\n  }\n}Now the graph builder can repeatedly register symbols without worrying about duplicates.\n<\/string><\/string><\/code><\/pre>\n<h2 id=\"heading-8-traversing-the-graph-with-bfs\">8. BFS \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06af\u0631\u0627\u0641 \u06a9\u0648 \u0639\u0628\u0648\u0631 \u06a9\u0631\u0646\u0627<\/h2>\n<p>\u0627\u06cc\u06a9 \u0633\u0646\u06af\u0644 \u06a9\u0627\u0644 \u0644\u06cc\u0626\u0631 \u062a\u0644\u0627\u0634 \u0627\u06cc\u06a9 \u06c1\u0627\u067e \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u0645\u0641\u06cc\u062f \u06a9\u0648\u0688 \u06af\u0631\u0627\u0641 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u062a\u0639\u062f\u062f \u06c1\u0627\u067e\u0633 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4 \u0633\u06d2 \u062f\u06cc\u06a9\u06be\u0627 \u06af\u06cc\u0627\u06d4 <code>A()<\/code> \u0622\u067e \u06c1\u0645\u06cc\u06ba \u06cc\u06c1 \u0628\u06be\u06cc \u0628\u062a\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u06cc\u06c1 \u06a9\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>B()<\/code>\u0644\u06cc\u06a9\u0646 \u06cc\u06c1 \u06c1\u0645\u06cc\u06ba \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0686\u06cc\u0632 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u06a9\u0686\u06be \u0646\u06c1\u06cc\u06ba \u0628\u062a\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <code>B()<\/code> \u0627\u06af\u0644\u06cc \u0628\u0627\u0631 \u06a9\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p>\u0627\u06cc\u06a9 \u0645\u0641\u06cc\u062f \u06af\u0631\u0627\u0641 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u06c1\u0645 \u062a\u06a9\u0631\u0627\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631 \u062f\u0631\u062c \u0630\u06cc\u0644 \u0631\u0634\u062a\u0648\u06ba \u06a9\u06cc \u067e\u06cc\u0631\u0648\u06cc \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba: <code>A \u2192 B \u2192 C \u2192 D<\/code>. \u0686\u0648\u0646\u06a9\u06c1 \u06c1\u0631 \u062a\u0644\u0627\u0634 \u06af\u0631\u0627\u0641 \u06a9\u0648 \u0627\u06cc\u06a9 \u0645\u062e\u062a\u0644\u0641 \u0633\u0637\u062d \u062a\u06a9 \u0628\u0691\u06be\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0633 \u0644\u06cc\u06d2 \u0645\u062a\u0639\u062f\u062f \u06c1\u0627\u067e\u0633 \u06a9\u0648 \u0645\u0648\u062b\u0631 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u0639\u0628\u0648\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u0679\u0631\u0627\u0648\u0631\u0633\u0644 \u062d\u06a9\u0645\u062a \u0639\u0645\u0644\u06cc \u062c\u06cc\u0633\u06d2 BFS \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631:<\/p>\n<pre><code class=\"language-mermaid\">\/\/ Assuming a graph with 4 hops\nA --> B --> C --> D --> E\n<\/code><\/pre>\n<p>\u0627\u06af\u0631 \u06c1\u0645 \u0634\u0631\u0648\u0639 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba <code>A<\/code> \u0627\u0648\u0631 \u06cc\u06c1 3 (3 hops) \u06a9\u06cc \u06af\u06c1\u0631\u0627\u0626\u06cc \u0645\u0627\u0646\u06af\u062a\u0627 \u06c1\u06d2\u06d4 \u06c1\u0645 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-text\">Depth 0: A\nDepth 1: B\nDepth 2: C\nDepth 3: D\n<\/code><\/pre>\n<p>\u0686\u0648\u0691\u0627\u0626\u06cc-\u067e\u06c1\u0644\u06cc \u062a\u0644\u0627\u0634 (BFS) \u0627\u06cc\u06a9 \u0642\u062f\u0631\u062a\u06cc \u0641\u0679 \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u06af\u0631\u0627\u0641 \u0648\u0627\u0636\u062d \u0637\u0648\u0631 \u067e\u0631 \u06c1\u0627\u067e \u06a9\u06cc \u06af\u06c1\u0631\u0627\u0626\u06cc \u06a9\u06d2 \u0627\u0631\u062f \u06af\u0631\u062f \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4 \u0633\u0631\u06a9\u0679 \u0686\u0648\u06a9\u0633\u06cc \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-text\">current frontier\n      \u2193\ndiscover neighbors\n      \u2193\nnext frontier\n      \u2193\ndiscover neighbors\n<\/code><\/pre>\n<p>\u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0637\u06d2 \u0634\u062f\u06c1 \u0646\u0641\u0627\u0630 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-typescript\">const walk = async (\n  start: Handle,\n  direction: 'incoming' | 'outgoing',\n  limit: number\n) => {\n  \/\/ Traverse the call graph one level at a time, starting from the given symbol.\n  let frontier: Handle[] = [start];\n\n  for (\n    let depth = 0;\n    depth < limit &#038;&#038;\n    frontier.length > 0;\n    depth++\n  ) {\n    \/\/ Resolve the next level in parallel, limiting concurrency to six lookups.\n    const results =\n      await mapLimit(\n        frontier,\n        6,\n        handle =>\n          oneHop(\n            handle,\n            direction\n          )\n      );\n\n    const next: Handle[] = [];\n\n    frontier.forEach(\n      (handle, index) => {\n        for (\n          const other\n            of results[index]\n        ) {\n          \/\/ Register newly discovered symbols before adding their relationships.\n          if (\n            !registry.has(\n              other.node.id\n            )\n          ) {\n            registry.register(\n              other.node.uri,\n              other.node.name,\n              other.node.kind,\n              other.node.pos\n            );\n          }\n\n          \/\/ Preserve the direction of the call relationship in the graph.\n          if (\n            direction === 'outgoing'\n          ) {\n            addEdge(\n              handle.node.id,\n              other.node.id\n            );\n          } else {\n            addEdge(\n              other.node.id,\n              handle.node.id\n            );\n          }\n\n          next.push(other);\n        }\n      }\n    );\n\n    \/\/ Continue the traversal from the symbols discovered at this depth.\n    frontier = next;\n  }\n};\n<\/code><\/pre>\n<p>\u06a9\u06c1 <code>mapLimit<\/code> \u0645\u062f\u062f\u06af\u0627\u0631 \u06c1\u0645 \u0622\u06c1\u0646\u06af\u06cc \u0632\u0628\u0627\u0646 \u06a9\u06d2 \u0633\u0631\u0648\u0631 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u0648 \u06a9\u0646\u0679\u0631\u0648\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-ts\">async function mapLimit<t r=\"\">(\n  items: T[],\n  limit: number,\n  fn: (item: T) => Promise<r>\n): Promise<r> {\n  \/\/ Run at most `limit` async operations at the same time.\n  const results =\n    new Array<r>(items.length);\n\n  let next = 0;\n\n  \/\/ Create workers that share the next available item.\n  const workers =\n    Array.from(\n      {\n        length:\n          Math.min(\n            limit,\n            items.length\n          ),\n      },\n      async () => {\n        while (\n          next < items.length\n        ) {\n          const index = next++;\n\n          results[index] =\n            await fn(\n              items[index]\n            );\n        }\n      }\n    );\n  await Promise.all(workers);\n  return results;\n}\n<\/r><\/r><\/r><\/t><\/code><\/pre>\n<p>\u0627\u06c1\u0645 \u0641\u0631\u0642 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 BFS \u0635\u0631\u0641 \u0627\u06cc\u06a9 \u0645\u0642\u0627\u0645\u06cc \u062d\u0633\u0627\u0628 \u06c1\u06d2\u060c \u062c\u0628\u06a9\u06c1 \u0639\u0644\u0627\u0645\u062a\u0648\u06ba \u06a9\u0648 \u062d\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06a9\u062b\u0631 VS \u06a9\u0648\u0688 \u06a9\u06d2 \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0679\u0648\u0644\u0632 \u0633\u06d2 \u0627\u0635\u0644 \u06a9\u0627\u0645 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u06c1\u0631 \u0627\u06cc\u06a9 \u0639\u0644\u0627\u0645\u062a \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0648 \u06c1\u0645 \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u06a9\u0648\u0688 \u06af\u0631\u0627\u0641 \u0648\u06cc\u0648 \u06a9\u0648 \u0627\u0646\u06a9\u0645\u0646\u06af \u06cc\u0627 \u0622\u0624\u0679 \u06af\u0648\u0626\u0646\u06af \u06a9\u0627\u0644\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0633\u0631\u0648\u0633 \u0633\u06d2 \u0627\u0633\u062a\u0641\u0633\u0627\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u067e\u0691 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4 \u0627\u0646 \u0633\u0648\u0627\u0644\u0627\u062a \u0645\u06cc\u06ba \u0633\u0648\u0631\u0633 \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u0648 \u067e\u0627\u0631\u0633 \u06a9\u0631\u0646\u0627\u060c \u0639\u0644\u0627\u0645\u062a\u0648\u06ba \u06a9\u0648 \u062d\u0644 \u06a9\u0631\u0646\u0627\u060c \u0627\u0648\u0631 \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0633\u0631\u0648\u0631\u0632 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0628\u0627\u062a \u0686\u06cc\u062a \u0634\u0627\u0645\u0644 \u06c1\u0648 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4 \u062c\u06cc\u0633\u0627 \u06a9\u06c1 \u06af\u0631\u0627\u0641 \u0628\u0691\u06be\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0646 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u0645\u06cc\u06ba \u0628\u06be\u06cc \u0627\u0636\u0627\u0641\u06c1 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0644\u06c1\u0630\u0627 \u0627\u06af\u0631\u0686\u06c1 \u0679\u0631\u0627\u0648\u0631\u0633\u0644 \u0628\u0630\u0627\u062a \u062e\u0648\u062f \u0622\u0633\u0627\u0646 \u06c1\u06d2\u060c \u0627\u0633 \u062a\u0644\u0627\u0634 \u06a9\u0648 \u062a\u0631\u062a\u06cc\u0628 \u0648\u0627\u0631 \u06a9\u0631\u0646\u0627 \u0645\u062c\u0645\u0648\u0639\u06cc \u0639\u0645\u0644 \u06a9\u0648 \u0628\u06c1\u062a \u0633\u0633\u062a \u0628\u0646\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 <code>mapLimit<\/code> \u06c1\u0645 \u0627\u0633 \u0645\u0633\u0626\u0644\u06d2 \u06a9\u0648 \u062d\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0645\u062a\u0639\u062f\u062f \u0622\u0632\u0627\u062f \u0632\u0628\u0627\u0646 \u06a9\u06d2 \u0622\u0644\u06d2 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u06a9\u0648 \u0628\u06cc\u06a9 \u0648\u0642\u062a \u0639\u0645\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06d2 \u06a9\u0631\u060c \u062c\u0628 \u06a9\u06c1 \u0632\u0628\u0627\u0646 \u06a9\u06cc \u062e\u062f\u0645\u062a \u067e\u0631 \u0628\u06be\u0627\u0631\u06cc \u067e\u0691\u0646\u06d2 \u0633\u06d2 \u0628\u0686\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06c1\u0645 \u0622\u06c1\u0646\u06af\u06cc \u067e\u0631 \u062d\u062f\u06cc\u06ba \u0644\u06af\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-9-handling-cycles\">9. \u06c1\u06cc\u0646\u0688\u0644\u0646\u06af \u0633\u0627\u0626\u06cc\u06a9\u0644<\/h2>\n<p>\u0627\u0635\u0644 \u06a9\u0648\u0688 \u062f\u0631\u062e\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u06af\u0631\u0627\u0641 \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u06a9\u0627 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0646\u0627\u0631\u0645\u0644 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/10\/1790961233_634_VS-\u06a9\u0648\u0688-\u06a9\u06cc-\u0632\u0628\u0627\u0646-API-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-TypeScript.png\" alt=\"\u0686\u0648\u0646\u06a9\u06c1 \u06a9\u0648\u0688\u0628\u06cc\u0633 \u062f\u0631\u062e\u062a \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0627\u06cc\u06a9 \u06af\u0631\u0627\u0641 \u06c1\u06d2\u060c \u0627\u0633 \u0644\u06cc\u06d2 \u0633\u0631\u06a9\u0644\u0631 \u06a9\u0627\u0644\u06cc\u06ba \u06a9\u062b\u0631\u062a \u0633\u06d2 \u06c1\u0648\u062a\u06cc \u06c1\u06cc\u06ba\u06d4\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0627\u06cc\u06a9 \u0628\u0648\u0644\u06cc \u0628\u0627\u0631 \u0628\u0627\u0631 \u0686\u0644\u0646\u06d2 \u0648\u0627\u0644\u0627 \u0633\u0641\u0631 \u063a\u06cc\u0631 \u0645\u0639\u06cc\u0646\u06c1 \u0645\u062f\u062a \u062a\u06a9 \u062c\u0627\u0631\u06cc \u0631\u06c1 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u0644\u06c1\u0630\u0627 \u06c1\u0645\u06cc\u06ba \u0627\u0633 \u0628\u0627\u062a \u06a9\u0627 \u0633\u0631\u0627\u063a \u0644\u06af\u0627\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2 \u062c\u0648 \u06c1\u0645 \u0646\u06d2 \u067e\u06c1\u0644\u06d2 \u06c1\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u06cc\u0627 \u06c1\u06d2\u06d4 \u0644\u06cc\u06a9\u0646 \u0679\u06be\u06cc\u06a9 \u0679\u06be\u06cc\u06a9 \u062a\u0641\u0635\u06cc\u0644\u0627\u062a \u06c1\u06cc\u06ba. \u0633\u0627\u062f\u06c1:<\/p>\n<pre><code class=\"language-ts\">Set<string>\n<\/string><\/code><\/pre>\n<p>\u06cc\u06c1 \u06c1\u0645\u06cc\u0634\u06c1 \u06a9\u0627\u0641\u06cc \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u0627\u06af\u0631 \u0627\u06cc\u06a9 \u06c1\u06cc \u0646\u0648\u0688 \u06a9\u0648 \u0645\u062e\u062a\u0644\u0641 \u06af\u06c1\u0631\u0627\u0626\u06cc\u0648\u06ba \u0633\u06d2 \u067e\u06c1\u0646\u0686\u0627\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u06d2\u06d4 \u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u0627\u06cc\u06a9 \u0646\u0648\u0688 \u06a9\u0648 \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a\u060c \u0622\u067e \u0630\u062e\u06cc\u0631\u06c1 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u06a9\u062a\u0646\u06cc \u06af\u06c1\u0631\u0627\u0626\u06cc \u0628\u0627\u0642\u06cc \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-typescript\">const explored =\n  new Map<string number=\"\">();\n<\/string><\/code><\/pre>\n<p>\u067e\u06be\u0631:<\/p>\n<pre><code class=\"language-typescript\">\/\/ Track the deepest remaining traversal already performed for this node.\nconst key =\n  `${direction}:${node.id}`;\nif (\n  (explored.get(key) ?? -1)\n  < remainingDepth\n) {\n  \/\/ Revisit only when this traversal can explore deeper than before.\n  explored.set(\n    key,\n    remainingDepth\n  );\n  next.push(node);\n}\n<\/code><\/pre>\n<p>\u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0627\u06af\u0631 \u0622\u067e \u067e\u06c1\u0644\u06d2 \u0627\u06cc\u06a9 \u0646\u0648\u0688 \u067e\u0631 \u067e\u06c1\u0646\u0686 \u06af\u0626\u06d2 \u062c\u0633 \u0645\u06cc\u06ba 1 \u06c1\u0627\u067e \u0628\u0627\u0642\u06cc \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u0628\u0639\u062f \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0646\u0648\u0688 \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0631\u06cc\u06ba \u062c\u0633 \u0645\u06cc\u06ba 3 \u06c1\u0627\u067e\u0633 \u0628\u0627\u0642\u06cc \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0622\u067e \u0627\u0633 \u0646\u0648\u0688 \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0646\u0648\u0688 \u06a9\u0648 \"\u0645\u0644\u0627\u062d\u0638\u06c1 \u0634\u062f\u06c1\" \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0639\u0644\u0627\u062c \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u062f\u0631\u0633\u062a \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-10-bounding-the-graph\">10. \u06af\u0631\u0627\u0641 \u06a9\u06cc \u062d\u062f\u0648\u062f \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u06cc\u06ba\u06d4<\/h2>\n<p>\u06af\u0631\u0627\u0641 \u0628\u06c1\u062a \u062a\u06cc\u0632\u06cc \u0633\u06d2 \u0628\u0691\u06be \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u0646\u062a\u06c1\u0627\u0626\u06cc \u0645\u0646\u0633\u0644\u06a9 \u0641\u0646\u06a9\u0634\u0646\u0632 \u0645\u06cc\u06ba \u062f\u0631\u062c\u0646\u0648\u06ba \u06a9\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u06c1\u0648 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u0646 \u0628\u06be\u06cc\u062c\u0646\u06d2 \u0648\u0627\u0644\u0648\u06ba \u0645\u06cc\u06ba \u0633\u06d2 \u06c1\u0631 \u0627\u06cc\u06a9 \u06a9\u06d2 \u062f\u0631\u062c\u0646\u0648\u06ba \u0645\u0631\u0633\u0644 \u06c1\u0648 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u0633 \u0648\u062c\u06c1 \u0633\u06d2\u060c \u06af\u0631\u0627\u0641 \u0628\u0646\u0627\u0646\u06d2 \u0648\u0627\u0644\u0648\u06ba \u067e\u0631 \u0648\u0627\u0636\u062d \u067e\u0627\u0628\u0646\u062f\u06cc\u0627\u06ba \u06c1\u0648\u0646\u06cc \u0686\u0627\u06c1\u0626\u06cc\u06ba\u06d4<\/p>\n<p>\u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631:<\/p>\n<pre><code class=\"language-typescript\">const MAX_SYMBOLS = 400;\nconst MAX_CALLS_PER_SYMBOL = 50;\nconst HOP_CONCURRENCY = 6;\n<\/code><\/pre>\n<p>\u062c\u0628 \u06af\u0631\u0627\u0641 \u0627\u067e\u0646\u06cc \u062d\u062f \u062a\u06a9 \u067e\u06c1\u0646\u0686 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0622\u067e \u06cc\u06c1 \u062f\u06a9\u06be\u0627\u0648\u0627 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06a9\u06c1 \u06af\u0631\u0627\u0641 \u0645\u06a9\u0645\u0644 \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2:<\/p>\n<pre><code class=\"language-typescript\">let truncated = false;\n<\/code><\/pre>\n<p>\u0627\u0648\u0631:<\/p>\n<pre><code class=\"language-typescript\">if (\n  registry.size >=\n  MAX_SYMBOLS\n) {\n  truncated = true;\n  continue;\n}\n<\/code><\/pre>\n<p>\u0646\u062a\u06cc\u062c\u06c1 <code>GraphData<\/code> \u067e\u06be\u0631 \u0622\u067e \u0627\u067e\u0646\u06d2 UI \u06a9\u0648 \u0628\u062a\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-text\">This graph was truncated.\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0627\u06cc\u06a9 \u063a\u06cc\u0631 \u0645\u062a\u0648\u0642\u0639 \u0637\u0648\u0631 \u067e\u0631 \u0628\u0691\u06d2 \u06a9\u0648\u0688\u0628\u06cc\u0633 \u06a9\u0648 \u062a\u0648\u0633\u06cc\u0639 \u062f\u06cc\u0646\u06d2 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06cc\u0646\u06d2 \u0633\u06d2 \u0628\u06c1\u062a\u0631 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-11-filtering-files\">11. \u0641\u0627\u0626\u0644 \u0641\u0644\u0679\u0631\u0646\u06af<\/h2>\n<p>\u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0633\u0631\u0648\u0631 \u0627\u0646 \u0641\u0627\u0626\u0644\u0648\u06ba \u0633\u06d2 \u062a\u0639\u0644\u0642\u0627\u062a \u0648\u0627\u067e\u0633 \u06a9\u0631 \u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0627\u0633 \u0627\u06cc\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 \u06a9\u0627 \u062d\u0635\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba \u062c\u0633 \u06a9\u06cc \u06c1\u0645 \u062a\u0644\u0627\u0634 \u06a9\u0631 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0628\u0644\u0688 \u0641\u0627\u0626\u0644 \u06cc\u0627 \u0622\u0624\u0679 \u067e\u0679 \u06c1\u0648 \u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0627\u0646\u062d\u0635\u0627\u0631 \u0627\u0646\u0633\u0679\u0627\u0644 \u06cc\u0627 \u0632\u0628\u0627\u0646 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0645\u062e\u0635\u0648\u0635 \u0628\u0644\u0688\/\u0631\u0646 \u0679\u0627\u0626\u0645 \u0679\u0627\u0633\u06a9 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u062a\u06cc\u0627\u0631 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631\u060c \u0627\u06cc\u06a9 TypeScript \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u0627 \u0646\u062a\u06cc\u062c\u06c1 \u06c1\u0648 \u0633\u06a9\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-text\">node_modules\n<\/code><\/pre>\n<p>\u0627\u06cc\u06a9 \u0627\u0632\u06af\u0631 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u0627 \u0646\u062a\u06cc\u062c\u06c1 \u06c1\u0648 \u0633\u06a9\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-text\">site-packages\n<\/code><\/pre>\n<p>\u0622\u067e \u0627\u0646 \u0631\u0627\u0633\u062a\u0648\u06ba \u06a9\u0648 \u06af\u0631\u0627\u0641 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0641\u0644\u0679\u0631 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-typescript\">const DEPENDENCY_DIRS =\n  \/\/(node_modules|vendor|target|.venv|venv|site-packages|__pycache__|build|obj|.dart_tool)\/\/;\n\nfunction isWorkspaceFile(\n  uri: vscode.Uri\n): boolean {\n  if (\n    uri.scheme !== 'file' ||\n    DEPENDENCY_DIRS.test(uri.path)\n  ) {\n    return false;\n  }\n  return !!vscode.workspace\n    .getWorkspaceFolder(uri);\n}\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u06af\u0631\u0627\u0641 \u06a9\u0648 \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u06a9\u0627\u0645 \u06a9\u06cc \u062c\u06af\u06c1 \u067e\u0631 \u0645\u0631\u06a9\u0648\u0632 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0644\u0633\u0627\u0646\u06cc \u0630\u06c1\u0627\u0646\u062a \u0627\u0648\u0631 \u0627\u0637\u0644\u0627\u0642 \u06a9\u06d2 \u0631\u0648\u06cc\u06d2 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0627\u06c1\u0645 \u0641\u0631\u0642 \u06a9\u0648 \u0628\u06be\u06cc \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0633\u0631\u0648\u0631 \u0622\u067e \u06a9\u0648 \u0628\u062a\u0627\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u06cc\u06c1 \u06a9\u06cc\u0627 \u062d\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u06af\u0631\u0627\u0641 \u0628\u0644\u0688\u0631 \u0627\u0633 \u0628\u0627\u062a \u06a9\u0627 \u062a\u0639\u06cc\u0646 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u06af\u0631\u0627\u0641 \u06a9\u0627 \u062d\u0635\u06c1 \u06a9\u06cc\u0627 \u06c1\u0648\u06af\u0627\u06d4<\/p>\n<h2 id=\"heading-12-why-some-edges-silently-disappear\">12. \u06a9\u06cc\u0648\u06ba \u06a9\u0686\u06be \u06a9\u0646\u0627\u0631\u06d2 \u062e\u0627\u0645\u0648\u0634\u06cc \u0633\u06d2 \u063a\u0627\u0626\u0628 \u06c1\u0648 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u061f<\/h2>\n<p>\u0628\u0691\u06d2 \u06af\u0631\u0627\u0641 \u0645\u06cc\u06ba\u060c \u06a9\u0686\u06be \u0641\u0646\u06a9\u0634\u0646\u0632 \u062c\u0648 \u0648\u0627\u0636\u062d \u0637\u0648\u0631 \u067e\u0631 \u0627\u06cc\u06a9 \u062f\u0648\u0633\u0631\u06d2 \u06a9\u0648 \u06a9\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u0645\u0646\u0642\u0637\u0639 \u06c1\u0648 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u06a9\u0686\u06be \u0628\u06be\u06cc \u063a\u0644\u0637\u06cc \u06a9\u06cc \u0627\u0637\u0644\u0627\u0639 \u0646\u06c1\u06cc\u06ba \u062f\u06d2 \u06af\u0627\u06d4 \u0645\u0633\u0626\u0644\u06c1 \u06cc\u06c1 \u06c1\u06d2\u06d4 <code>CallHierarchyItem<\/code> \u0632\u0628\u0627\u0646 \u06a9\u06cc \u062e\u062f\u0645\u062a \u06a9\u06cc \u062d\u06cc\u062b\u06cc\u062a \u0633\u06d2 \u0645\u0646\u0633\u0644\u06a9\u06d4 \u0627\u06af\u0631 \u0648\u06c1 \u062d\u0627\u0644\u062a \u0628\u0627\u0633\u06cc \u06c1\u0648 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u060c \u062a\u0648 \u06a9\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u06cc\u0627 \u06a9\u0627\u0644\u06cc \u06a9\u0648 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u06cc\u06ba \u0627\u06cc\u06a9 \u062e\u0627\u0644\u06cc \u0635\u0641 \u0648\u0627\u067e\u0633 \u06a9\u0631 \u0633\u06a9\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u06af\u0631\u0627\u0641 \u0628\u0644\u0688\u0631 \u06a9\u06d2 \u0646\u0642\u0637\u06c1 \u0646\u0638\u0631 \u0633\u06d2\u060c \u06cc\u06c1 \u0628\u0627\u0644\u06a9\u0644 \u0627\u06cc\u0633\u0627 \u0644\u06af\u062a\u0627 \u06c1\u06d2 \u062c\u06cc\u0633\u06d2 \u06a9\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u06a9\u06d2 \u0628\u063a\u06cc\u0631\u06d4<\/p>\n<p>VS \u06a9\u0648\u0688 \u06a9\u06d2 \u0646\u0641\u0627\u0630 \u0645\u06cc\u06ba\u060c \u062d\u0627\u0644\u06cc\u06c1 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u06a9\u06cc \u0627\u06cc\u06a9 \u0645\u062d\u062f\u0648\u062f \u062a\u0639\u062f\u0627\u062f \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0627\u0644 \u0644\u06cc\u0626\u0631 \u0633\u06cc\u0634\u0646 \u06a9\u0648 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u0632\u06cc\u062f \u0628\u0631\u0622\u06ba\u060c \u06a9\u0631\u0627\u0644\u0631\u0632 \u062d\u0631\u06a9\u062a \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0633\u0627\u062a\u06be \u0645\u062a\u0639\u062f\u062f \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062c\u0633 \u06a9\u06cc \u0648\u062c\u06c1 \u0633\u06d2 \u06af\u0631\u0627\u0641 \u06a9\u06cc \u062a\u0644\u0627\u0634 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u067e\u0631\u0627\u0646\u06cc \u0627\u0634\u06cc\u0627\u0621 \u062f\u0633\u062a\u06cc\u0627\u0628 \u0646\u06c1\u06cc\u06ba \u06c1\u0648 \u0633\u06a9\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u06af\u0631\u0627\u0641 \u0628\u0644\u0688\u0631 \u0627\u0633\u06d2 \u062a\u06cc\u0646 \u0637\u0631\u06cc\u0642\u0648\u06ba \u0633\u06d2 \u0633\u0646\u0628\u06be\u0627\u0644\u062a\u0627 \u06c1\u06d2:<\/p>\n<h3 id=\"heading-1-it-stores-plain-data-not-live-items\">1. \u0631\u06cc\u06af\u0648\u0644\u0631 \u0688\u06cc\u0679\u0627 \u0627\u0633\u0679\u0648\u0631 \u06a9\u0631\u06cc\u06ba\u060c \u0644\u0627\u0626\u06cc\u0648 \u0622\u0626\u0679\u0645\u0632 \u0646\u06c1\u06cc\u06ba\u06d4<\/h3>\n<p>\u06c1\u0631 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0648 \u0627\u0633 \u0637\u0631\u062d \u062f\u06a9\u06be\u0627\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2: <code>NodeRef<\/code> ID\u060c URI\u060c \u0646\u0627\u0645\u060c \u0642\u0633\u0645 \u0627\u0648\u0631 \u0645\u0642\u0627\u0645 \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06c1\u06d2\u06d4 \u0633\u0646\u06af\u0644 \u06c1\u0627\u067e \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u0628\u06be\u06cc \u0627\u0633 \u0637\u0631\u062d \u0645\u062d\u0641\u0648\u0638 \u06a9\u06cc\u06d2 \u06af\u0626\u06d2 \u06c1\u06cc\u06ba: <code>NodeRef<\/code>S. \u06cc\u06c1 \u0636\u0631\u0648\u0631\u062a \u067e\u0691\u0646\u06d2 \u067e\u0631 \u06a9\u0627\u0644 \u067e\u0631\u062a \u06a9\u06d2 \u0627\u0646\u062f\u0631\u0627\u062c\u0627\u062a \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0627\u0641\u06cc \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-ts\">interface NodeRef {\n  id: string;\n  uri: vscode.Uri;\n  name: string;\n  kind: vscode.SymbolKind;\n  pos: vscode.Position;\n}\n<\/code><\/pre>\n<h3 id=\"heading-2-it-tracks-the-age-of-each-prepared-item\">2. \u06c1\u0631 \u062a\u06cc\u0627\u0631 \u0634\u062f\u06c1 \u0634\u06d2 \u06a9\u06cc \u0639\u0645\u0631 \u06a9\u0648 \u0679\u0631\u06cc\u06a9 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u0639\u0627\u0644\u0645\u06cc <code>epoch<\/code> \u062c\u0628 \u0628\u06be\u06cc \u0646\u0626\u06cc \u06a9\u0627\u0644 \u0644\u06cc\u0626\u0631 \u0627\u0646\u0679\u0631\u06cc \u062a\u06cc\u0627\u0631 \u06c1\u0648\u062a\u06cc \u06c1\u06d2 \u062a\u0648 \u06a9\u0627\u0624\u0646\u0679\u0631 \u0645\u06cc\u06ba \u0627\u0636\u0627\u0641\u06c1 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u06c1\u0631 \u06c1\u06cc\u0646\u0688\u0644 \u0627\u0633 \u062f\u0648\u0631 \u06a9\u0648 \u0631\u06cc\u06a9\u0627\u0631\u0688 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0633 \u0645\u06cc\u06ba \u0634\u06d2 \u0628\u0646\u0627\u0626\u06cc \u06af\u0626\u06cc \u062a\u06be\u06cc\u06d4 \u0627\u06af\u0631 \u0622\u0626\u0679\u0645 \u06a9\u0627\u0641\u06cc \u067e\u0631\u0627\u0646\u06cc \u06c1\u06d2\u060c \u062a\u0648 \u06a9\u0631\u0627\u0644\u0631 \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u062f\u06c1 \u0622\u0626\u0679\u0645\u0632 \u0633\u06d2 \u0627\u06cc\u06a9 \u0646\u06cc\u0627 \u0622\u0626\u0679\u0645 \u062a\u06cc\u0627\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>NodeRef<\/code>.<\/p>\n<h3 id=\"heading-3-it-retries-suspicious-empty-results\">3. \u0645\u0634\u06a9\u0648\u06a9 \u062e\u0627\u0644\u06cc \u0646\u062a\u0627\u0626\u062c \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062f\u0648\u0628\u0627\u0631\u06c1 \u06a9\u0648\u0634\u0634 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u0686\u06be\u0648\u0679\u0627 \u0648\u0631\u0698\u0646 <code>oneHop<\/code> \u06cc\u06c1 \u0645\u0646\u062f\u0631\u062c\u06c1 \u0630\u06cc\u0644 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-typescript\">const SESSION_WINDOW = 7;\n\n\/\/ Refresh stale language-tooling references and retry once if necessary.\nfor (let attempt = 0; attempt < 2; attempt++) {\n  const stale =\n    !current.item ||\n    epoch - current.epoch > SESSION_WINDOW;\n\n  if (stale) {\n    \/\/ Re-resolve the symbol before using an expired CallHierarchyItem.\n    const fresh = await prepareFresh(\n      current.node.uri,\n      current.node.pos\n    );\n\n    if (!fresh) {\n      return [];\n    }\n\n    current = fresh;\n  }\n\n  const items =\n    await lookup(\n      current.item!,\n      direction\n    );\n\n  \/\/ A stale reference may return nothing, so invalidate it and retry once.\n  if (\n    items.length === 0 &&\n    attempt === 0 &&\n    epoch - current.epoch > SESSION_WINDOW\n  ) {\n    current = {\n      node: current.node,\n      epoch: -1,\n    };\n\n    continue;\n  }\n\n  \/\/ Cache the resolved relationships to avoid repeating the language-tooling lookup.\n  hopCache.set(key, {\n    nodes: items.map(refOf),\n    at: Date.now(),\n  });\n\n  return items.map(child => ({\n    node: refOf(child),\n    item: child,\n    epoch: current.epoch,\n  }));\n}\n<\/code><\/pre>\n<p>\u06cc\u06c1\u0627\u06ba\u060c <code>lookup<\/code> ~ \u06a9\u0627 \u0645\u062e\u0641\u0641 \u06c1\u06d2\u06d4 <code>vscode.provideIncomingCalls<\/code> \u06cc\u0627 <code>vscode.provideOutgoingCalls<\/code> \u06a9\u0645\u0627\u0646\u0688 \u067e\u06c1\u0644\u06d2 \u0628\u06cc\u0627\u0646 \u06a9\u06cc \u06af\u0626\u06cc \u06c1\u06d2\u06d4 \u0633\u06cc\u0634\u0646 \u06a9\u06cc \u0642\u0637\u0639\u06cc \u062d\u062f VS \u06a9\u0648\u0688 \u0645\u06cc\u06ba \u0646\u0641\u0627\u0630 \u06a9\u06cc \u0627\u06cc\u06a9 \u062a\u0641\u0635\u06cc\u0644 \u06c1\u06d2\u060c \u0646\u06c1 \u06a9\u06c1 \u0627\u06cc\u0633\u06cc \u0686\u06cc\u0632 \u062c\u0633 \u067e\u0631 \u0622\u067e \u06a9\u06cc \u062a\u0648\u0633\u06cc\u0639 \u06a9\u0648 \u0627\u0646\u062d\u0635\u0627\u0631 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4 \u0644\u06c1\u0630\u0627\u060c \u06a9\u0631\u0627\u0644\u0631 \u06cc\u06c1 \u0646\u06c1\u06cc\u06ba \u0633\u0645\u062c\u06be\u062a\u0627 \u06a9\u06c1 \u06a9\u0686\u06be \u062d\u062f\u0648\u062f \u06c1\u0645\u06cc\u0634\u06c1 \u0645\u0648\u062c\u0648\u062f \u06c1\u06cc\u06ba\u06d4 \u06a9\u06c1 <code>SESSION_WINDOW<\/code> \u06cc\u06c1 \u067e\u0631\u0627\u0646\u06d2 \u06c1\u06cc\u0646\u0688\u0644\u0632 \u06a9\u0648 \u062a\u0631\u0648\u062a\u0627\u0632\u06c1 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u062d\u0636 \u0627\u06cc\u06a9 \u0642\u062f\u0627\u0645\u062a \u067e\u0633\u0646\u062f \u062d\u062f \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u06af\u0645\u0634\u062f\u06c1 \u06a9\u0646\u0627\u0631\u0648\u06ba \u06a9\u0648 \u06a9\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0644\u06cc\u06a9\u0646 \u0645\u06a9\u0645\u0644 \u06af\u0631\u0627\u0641 \u06a9\u06cc \u0636\u0645\u0627\u0646\u062a \u0646\u06c1\u06cc\u06ba \u062f\u06cc\u062a\u0627\u06d4 \u0632\u0628\u0627\u0646 \u06a9\u06d2 \u0627\u0648\u0632\u0627\u0631 \u0627\u0628 \u0628\u06be\u06cc \u0646\u0627\u0645\u06a9\u0645\u0644 \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0648\u0627\u067e\u0633 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u06cc\u0627 \u0628\u0639\u0636 \u0631\u0634\u062a\u0648\u06ba \u06a9\u0648 \u062d\u0644 \u06a9\u0631\u0646\u06d2 \u0645\u06cc\u06ba \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0648\u0633\u06cc\u0639 \u062a\u0631 \u0633\u0628\u0642 \u06a9\u0627 \u0627\u0637\u0644\u0627\u0642 \u06a9\u0627\u0644 \u06a9\u06d2 \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u0633\u06d2 \u0622\u06af\u06d2 \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0633\u0631\u0648\u0633 APIs \u067e\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u0639\u0646\u06cc\u060c \u06cc\u06c1 \u0627\u0633 \u0686\u06cc\u0632 \u06a9\u0648 \u0630\u062e\u06cc\u0631\u06c1 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0632\u0628\u0627\u0646 \u06a9\u06cc \u062e\u062f\u0645\u062a \u06a9\u0648 \u0622\u0628\u062c\u06cc\u06a9\u0679 \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062f\u0631\u06a9\u0627\u0631 \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u060c \u0646\u06c1 \u06a9\u06c1 \u062e\u0648\u062f \u0622\u0628\u062c\u06cc\u06a9\u0679\u06d4 \u062e\u0627\u0644\u06cc \u0646\u062a\u0627\u0626\u062c \u06a9\u0648 \u0628\u0627\u0633\u06cc \u062d\u0627\u0644\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u0648\u0626\u06cc \u0646\u06c1\u06cc\u06ba \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0639\u0644\u0627\u062c \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u0627\u0646\u06c1\u06cc\u06ba \u0645\u0645\u06a9\u0646\u06c1 \u0637\u0648\u0631 \u067e\u0631 \u0646\u0627\u0645\u0639\u0644\u0648\u0645 \u0646\u062a\u0627\u0626\u062c \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0633\u0645\u062c\u06be\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-13-connecting-the-graph-to-a-webview\">13. \u06af\u0631\u0627\u0641 \u06a9\u0648 Webview \u0633\u06d2 \u062c\u0648\u0691\u06cc\u06ba\u06d4<\/h2>\n<p>\u06af\u0631\u0627\u0641 \u06a9\u06cc \u062a\u0639\u0645\u06cc\u0631 \u06a9\u06d2 \u0628\u0639\u062f\u060c \u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646 \u06a9\u0648 \u06af\u0631\u0627\u0641 \u06a9\u0648 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u0645\u0642\u0627\u0645 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4 \u0648\u06cc \u0627\u06cc\u0633 \u06a9\u0648\u0688 \u0648\u06cc\u0628 \u0648\u06cc\u0648 \u0642\u062f\u0631\u062a\u06cc \u0641\u0679 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646 \u06c1\u0648\u0633\u0679 \u0627\u06cc\u06a9 \u067e\u06cc\u0646\u0644 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-ts\">const panel =\n  vscode.window.createWebviewPanel(\n    'codeGraphView',\n    'Code Graph',\n    vscode.ViewColumn.Beside,\n    {\n      enableScripts: true,\n      retainContextWhenHidden: true,\n    }\n  );\n<\/code><\/pre>\n<p>\u06af\u0631\u0627\u0641 \u06a9\u0648 \u0633\u06cc\u0631\u06cc\u0644\u0627\u0626\u0632 \u0688\u06cc\u0679\u0627 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0648\u06cc\u0628 \u0648\u06cc\u0648 \u06a9\u0648 \u0628\u06be\u06cc\u062c\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-ts\">panel.webview.postMessage({\n  command: 'graphData',\n  data: graphData,\n});\n<\/code><\/pre>\n<p>Webview \u067e\u06be\u0631 \u0627\u0633\u06d2 \u0633\u0646 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-ts\">window.addEventListener(\n  'message',\n  event => {\n    const message =\n      event.data;\n\n    if (\n      message.command !==\n      'graphData'\n    ) {\n      return;\n    }\n\n    renderGraph(\n      message.data\n    );\n  }\n);\n<\/code><\/pre>\n<p>\u0627\u0633 \u0648\u0642\u062a \u0645\u0633\u0626\u0644\u06c1 \u06a9\u06cc \u0632\u0628\u0627\u0646 \u0633\u0631\u0648\u0631 \u06a9\u06cc \u0637\u0631\u0641 \u0645\u06a9\u0645\u0644 \u06c1\u06d2.<\/p>\n<p>\u06c1\u0645 \u0646\u06d2 \u062f\u0631\u062c \u0630\u06cc\u0644 \u062a\u0628\u062f\u06cc\u0644\u06cc\u0627\u06ba \u06a9\u06cc \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-text\">source code\n<\/code><\/pre>\n<p>\u0645\u06cc\u06ba:<\/p>\n<pre><code class=\"language-text\">symbols + relationships\n<\/code><\/pre>\n<p>\u0627\u0648\u0631 \u067e\u06be\u0631:<\/p>\n<pre><code class=\"language-text\">GraphData\n<\/code><\/pre>\n<p>\u0627\u0628 \u0648\u06cc\u0698\u0648\u0644\u0627\u0626\u0632\u06cc\u0634\u0646 \u067e\u0631\u062a \u0627\u0633 \u0688\u06cc\u0679\u0627 \u06a9\u0648 \u06af\u0631\u0627\u0641 \u0631\u06cc\u0646\u0688\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>ELK \u062c\u06cc\u0633\u06cc \u0644\u0627\u0626\u0628\u0631\u06cc\u0631\u06cc\u0627\u06ba \u06af\u0631\u0627\u0641 \u06a9\u0648 \u0628\u0646\u0627\u0646\u06d2 \u0648\u0627\u0644\u06cc \u0645\u0646\u0637\u0642 \u06a9\u0648 \u0645\u062a\u0627\u062b\u0631 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 \u06af\u0631\u0627\u0641 \u0645\u06cc\u06ba \u067e\u0648\u0632\u06cc\u0634\u0646\u0648\u06ba \u06a9\u0627 \u062d\u0633\u0627\u0628 \u0644\u06af\u0627\u0646\u06d2 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06cc\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-14-testing-the-graph-builder\">14. \u06af\u0631\u0627\u0641 \u0628\u0644\u0688\u0631 \u0679\u06cc\u0633\u0679<\/h2>\n<p>\u0627\u0633 \u0642\u0633\u0645 \u06a9\u06cc \u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646 \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u0631\u0646\u0627 \u0645\u0634\u06a9\u0644 \u06c1\u0648 \u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u062c\u0628 \u06c1\u0631 \u0679\u06cc\u0633\u0679 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0686\u0644\u062a\u06d2 \u06c1\u0648\u0626\u06d2 VS \u06a9\u0648\u0688 \u06a9\u06cc \u0645\u062b\u0627\u0644 \u0627\u0648\u0631 \u062d\u0642\u06cc\u0642\u06cc \u0632\u0628\u0627\u0646 \u06a9\u06d2 \u0633\u0631\u0648\u0631 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u06d4 \u06af\u0631\u0627\u0641 \u062a\u062e\u0644\u06cc\u0642 \u06a9\u06cc \u0645\u0646\u0637\u0642 \u06a9\u0648 \u062e\u0648\u062f VS \u06a9\u0648\u0688 \u0633\u06d2 \u0627\u0644\u06af \u06a9\u0631\u0646\u0627 \u0627\u06cc\u06a9 \u0628\u06c1\u062a\u0631 \u0637\u0631\u06cc\u0642\u06c1 \u06c1\u06d2\u06d4 \u06a9\u0631\u0627\u0644\u0631 \u06a9\u0648 \u062f\u0631\u0627\u0635\u0644 \u0635\u0631\u0641 \u0686\u0646\u062f \u0622\u067e\u0631\u06cc\u0634\u0646\u0632 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-text\">prepareCallHierarchy\nprovideIncomingCalls\nprovideOutgoingCalls\n<\/code><\/pre>\n<p>\u0622\u067e \u0627\u0633 \u06a9\u0645\u0627\u0646\u0688 \u06a9\u0627 \u062c\u0639\u0644\u06cc \u0646\u0641\u0627\u0630 \u062a\u0634\u06a9\u06cc\u0644 \u062f\u06d2 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631:<\/p>\n<pre><code class=\"language-typescript\">const sessions = new Map();\n\nlet sessionCounter = 0;\n\nasync function executeCommand(\n  command,\n  ...args\n) {\n  \/\/ Simulate VS Code creating a session when resolving a symbol.\n  if (\n    command ===\n    'vscode.prepareCallHierarchy'\n  ) {\n    const id =\n      'session-' +\n      ++sessionCounter;\n\n    sessions.set(id, true);\n\n    return [\n      createFakeItem(\n        args,\n        id\n      ),\n    ];\n  }\n\n  \/\/ Simulate call lookups that depend on a still-valid session.\n  if (\n    command ===\n      'vscode.provideIncomingCalls' ||\n    command ===\n      'vscode.provideOutgoingCalls'\n  ) {\n    const item = args[0];\n\n    \/\/ Return nothing when the CallHierarchyItem belongs to an expired session.\n    if (\n      !sessions.has(\n        item.sessionId\n      )\n    ) {\n      return [];\n    }\n\n    return getFakeCalls(\n      item\n    );\n  }\n}\n<\/code><\/pre>\n<p>\u0645\u0648\u06a9\u0633 \u0627\u06cc\u062c \u06a9\u06cc\u0633\u0632 \u06a9\u0648 \u0645\u0627\u0688\u0644 \u0628\u0646\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u06cc\u0633\u06d2 \u06a9\u06c1 \u0645\u06cc\u0639\u0627\u062f \u062e\u062a\u0645 \u06c1\u0648\u0646\u06d2 \u0648\u0627\u0644\u06cc \u06a9\u0627\u0644 \u0644\u06cc\u0626\u0631 \u0633\u0679\u06cc\u0679\u06d4 \u0627\u06c1\u0645 \u0628\u0627\u062a \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0627\u06af\u0631 \u062c\u0639\u0644 \u0633\u0627\u0632 \u0633\u06cc\u0634\u0646 \u06a9\u06cc \u0645\u062e\u0635\u0648\u0635 \u062d\u062f \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062a\u0648 \u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2\u06d4 <strong>\u0679\u06cc\u0633\u0679 \u0645\u0627\u0688\u0644<\/strong>\u06cc\u06c1 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0633\u0631\u06a9\u0627\u0631\u06cc VS \u06a9\u0648\u0688 API \u06a9\u06cc \u062a\u0648\u062b\u06cc\u0642 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0646\u06c1\u06cc\u06ba \u0622\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0633 \u06a9\u06d2 \u0628\u0639\u062f \u0622\u067e \u0627\u06cc\u06a9 \u062a\u0639\u06cc\u06cc\u0646\u0627\u062a\u06cc \u06af\u0631\u0627\u0641 \u0628\u0646\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u06a9\u0631\u0627\u0644\u0631 \u06a9\u06d2 \u0622\u0624\u0679 \u067e\u0679 \u06a9\u0627 \u0627\u06cc\u06a9 \u0633\u0627\u062f\u06c1 \u062d\u0648\u0627\u0644\u06c1 BFS \u0633\u06d2 \u0645\u0648\u0627\u0632\u0646\u06c1 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631:<\/p>\n<pre><code class=\"language-mermaid\">flowchart LR\n    A[A] --> B[B]\n    A --> C[C]\n    B --> D[D]\n    C --> D\n    D --> E[E]\n<\/code><\/pre>\n<p>\u062d\u0648\u0627\u0644\u06c1 \u06a9\u0627 \u0646\u0641\u0627\u0630 \u0645\u062a\u0648\u0642\u0639 \u06a9\u0646\u0627\u0631\u0648\u06ba \u06a9\u0648 \u062c\u0627\u0646\u062a\u0627 \u06c1\u06d2\u06d4 \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u06a9\u0631\u0627\u0644\u0631 \u062c\u0639\u0644\u06cc \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0633\u0631\u0648\u0633 \u06a9\u06d2 \u062e\u0644\u0627\u0641 \u0686\u0644\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u062f\u0648\u0646\u0648\u06ba \u06a9\u06d2 \u0646\u062a\u0627\u0626\u062c \u0645\u062e\u062a\u0644\u0641 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0679\u06cc\u0633\u0679 \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0646\u0642\u0637\u06c1 \u0646\u0638\u0631 \u0622\u067e \u06a9\u0648 \u0627\u06cc\u0688\u06cc\u0679\u0631 \u06a9\u06d2 \u0631\u0646 \u0679\u0627\u0626\u0645 \u067e\u0631 \u0645\u06a9\u0645\u0644 \u0627\u0646\u062d\u0635\u0627\u0631 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 \u0645\u0634\u06a9\u0644 \u06af\u0631\u0627\u0641 \u0645\u0646\u0637\u0642 \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-15-the-limitations-of-a-code-graph\">15. \u06a9\u0648\u0688 \u06af\u0631\u0627\u0641 \u06a9\u06cc \u062d\u062f\u0648\u062f<\/h2>\n<p>\u0632\u0628\u0627\u0646 \u06a9\u06d2 \u0633\u0631\u0648\u0631 \u067e\u0631 \u0645\u0628\u0646\u06cc \u06a9\u0627\u0644 \u06af\u0631\u0627\u0641 \u0645\u0641\u06cc\u062f \u06c1\u06cc\u06ba\u060c \u0644\u06cc\u06a9\u0646 \u0648\u06c1 \u067e\u0631\u0648\u06af\u0631\u0627\u0645 \u06a9\u06d2 \u0639\u0645\u0644 \u06a9\u06cc \u0645\u06a9\u0645\u0644 \u0646\u0645\u0627\u0626\u0646\u062f\u06af\u06cc \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06a9\u0686\u06be \u0631\u0634\u062a\u0648\u06ba \u06a9\u0648 \u062c\u0627\u0645\u062f \u06a9\u0627\u0644 \u06a9\u06d2 \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u06a9\u06d2 \u062a\u062c\u0632\u06cc\u06c1 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062d\u0644 \u06a9\u0631\u0646\u0627 \u0645\u0634\u06a9\u0644 \u06cc\u0627 \u0646\u0627\u0645\u0645\u06a9\u0646 \u06c1\u0648 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u062b\u0627\u0644\u0648\u06ba \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06c1\u06cc\u06ba:<\/p>\n<p>\u063a\u0648\u0631 \u06a9\u0631\u06cc\u06ba:<\/p>\n<pre><code class=\"language-ts\">eventEmitter.on(\n  'payment.completed',\n  handlePayment\n);\n<\/code><\/pre>\n<p>\u0688\u0648\u06cc\u0644\u067e\u0631\u0632 \u0633\u0645\u062c\u06be \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0627\u0633 \u0633\u06d2 \u0648\u0627\u0642\u0639\u0627\u062a \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0631\u0646 \u0679\u0627\u0626\u0645 \u062a\u0639\u0644\u0642\u0627\u062a \u067e\u06cc\u062f\u0627 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>handlePayment<\/code>. \u0627\u06cc\u06a9 \u062c\u0627\u0645\u062f \u06a9\u0627\u0644 \u06af\u0631\u0627\u0641 \u0627\u067e\u0646\u06d2 \u062a\u0639\u0644\u0642\u0627\u062a \u06a9\u0648 \u0628\u0627\u0642\u0627\u0639\u062f\u06c1 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0627\u0644\u0632 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0638\u0627\u06c1\u0631 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u0644\u06c1\u0670\u0630\u0627 \u06af\u0631\u0627\u0641 \u06a9\u0627 \u0645\u0639\u06cc\u0627\u0631 \u062c\u0632\u0648\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0633\u0631\u0648\u0631 \u067e\u0631 \u0645\u0646\u062d\u0635\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u06cc\u06c1 \u06a9\u0633 \u0642\u0633\u0645 \u06a9\u06d2 \u062a\u0639\u0644\u0642\u0627\u062a \u06a9\u0648 \u062d\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1\u06cc \u0648\u062c\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u06af\u0631\u0627\u0641\u0633 \u06a9\u0648 \u0645\u06a9\u0645\u0644 \u0631\u0646 \u0679\u0627\u0626\u0645 \u0645\u0627\u0688\u0644\u0632 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0633\u06cc\u0645\u0646\u0679\u06a9 \u0642\u0631\u06cc\u0628\u0627\u064b \u0633\u0645\u062c\u06be\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4 \u0632\u0628\u0627\u0646 \u06a9\u06cc \u0627\u06cc\u06a9 \u0645\u062e\u0635\u0648\u0635 \u062c\u06c1\u062a \u0628\u06be\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u06af\u0631\u0627\u0641 \u0628\u0644\u0688\u0631 \u0628\u0630\u0627\u062a \u062e\u0648\u062f \u0628\u0691\u06cc \u062d\u062f \u062a\u06a9 \u0632\u0628\u0627\u0646 \u0633\u06d2 \u0645\u062a\u0639\u0644\u0642 \u0639\u0644\u0645\u06cc \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u0645\u062e\u062a\u0644\u0641 \u0632\u0628\u0627\u0646 \u06a9\u06cc \u062a\u0648\u0633\u06cc\u0639\u0627\u062a \u062f\u0633\u062a\u0627\u0648\u06cc\u0632 \u06a9\u06cc \u0639\u0644\u0627\u0645\u062a\u0648\u06ba \u0627\u0648\u0631 \u06a9\u0627\u0644 \u06a9\u06d2 \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u062e\u062a\u0644\u0641 \u0633\u0637\u062d\u0648\u06ba \u06a9\u06cc \u0645\u062f\u062f \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631 \u0633\u06a9\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-conclusion\">\u0646\u062a\u06cc\u062c\u06c1<\/h2>\n<p>\u06a9\u0648\u0688 \u06af\u0631\u0627\u0641 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0622\u067e \u06a9\u0648 \u06a9\u0645\u067e\u0627\u0626\u0644\u0631 \u0644\u06a9\u06be\u0646\u06d2 \u06cc\u0627 \u06a9\u0633\u06cc \u067e\u0627\u0631\u0633\u0631 \u06a9\u0648 \u0634\u0631\u0648\u0639 \u0633\u06d2 \u0644\u0627\u06af\u0648 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 VS \u06a9\u0648\u0688 \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u06c1\u06cc \u0627\u067e\u0646\u06cc \u0632\u0628\u0627\u0646 API \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0645\u0639\u0646\u0648\u06cc \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u06a9\u06cc \u0627\u06cc\u06a9 \u0627\u06c1\u0645 \u0645\u0642\u062f\u0627\u0631 \u06a9\u0648 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0628\u0646\u06cc\u0627\u062f\u06cc \u0639\u0645\u0644 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-mermaid\">Document -> Document Symbols -> Call Hierarchy -> Graph Nodes + Edges -> BFS Traversal -> GraphData -> Visualization\n<\/code><\/pre>\n<p>\u0627\u0646\u062c\u06cc\u0646\u0626\u0631\u0646\u06af \u06a9\u0627 \u0633\u0628 \u0633\u06d2 \u0627\u06c1\u0645 \u0641\u06cc\u0635\u0644\u06c1 \u06cc\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u06a9\u06c1 \u06a9\u06cc\u0627 \u06af\u0631\u0627\u0641 \u06a9\u06cc\u0627 \u062c\u0627\u0626\u06d2\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u06a9\u0627\u0631\u0622\u0645\u062f \u06af\u0631\u0627\u0641 \u0645\u0627\u0688\u0644 \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631\u0646\u06d2\u060c \u0645\u0633\u062a\u062d\u06a9\u0645 \u0639\u0644\u0627\u0645\u062a \u0622\u0626\u06cc \u0688\u06cc \u062a\u06cc\u0627\u0631 \u06a9\u0631\u0646\u06d2\u060c \u0622\u0646\u06d2 \u0648\u0627\u0644\u06cc \u0627\u0648\u0631 \u062c\u0627\u0646\u06d2 \u0648\u0627\u0644\u06cc \u06a9\u0627\u0644\u0648\u06ba \u06a9\u06cc \u0635\u062d\u06cc\u062d \u062a\u0631\u062c\u0645\u0627\u0646\u06cc \u06a9\u0631\u0646\u06d2\u060c \u0679\u0631\u0627\u0648\u0631\u0633\u0644 \u0688\u06cc\u067e\u062a\u06be \u0627\u0648\u0631 \u06a9\u0646\u06a9\u0631\u0646\u0633\u06cc \u06a9\u0648 \u06a9\u0646\u0679\u0631\u0648\u0644 \u06a9\u0631\u0646\u06d2\u060c \u0633\u0627\u0626\u06cc\u06a9\u0644\u0648\u06ba \u06a9\u0648 \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u0646\u06d2 \u0627\u0648\u0631 \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0633\u0631\u0648\u0631 \u06a9\u06cc \u062d\u0627\u0644\u062a \u06a9\u0648 \u0628\u062f\u0644\u0646\u06d2 \u06a9\u06d2 \u0642\u0627\u0628\u0644 \u0633\u0645\u062c\u06be\u0646\u06d2 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u06cc\u06a9 \u0628\u0627\u0631 \u062c\u0628 \u06cc\u06c1 \u0679\u06a9\u0691\u06d2 \u0627\u067e\u0646\u06cc \u062c\u06af\u06c1 \u067e\u0631 \u0622\u062c\u0627\u0626\u06cc\u06ba \u062a\u0648 \u062a\u0635\u0648\u0631 \u0627\u06cc\u06a9 \u0627\u0644\u06af \u0645\u0633\u0626\u0644\u06c1 \u0628\u0646 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0639\u0644\u06cc\u062d\u062f\u06af\u06cc \u0641\u0646 \u062a\u0639\u0645\u06cc\u0631 \u06a9\u0648 \u0627\u06cc\u06a9 \u0648\u0627\u062d\u062f VS \u06a9\u0648\u0688 \u062a\u0648\u0633\u06cc\u0639 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0645\u0641\u06cc\u062f \u0628\u0646\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u0648\u06c1\u06cc \u06af\u0631\u0627\u0641 \u0645\u0627\u0688\u0644 \u0622\u062e\u0631 \u06a9\u0627\u0631 \u0627\u0646\u062d\u0635\u0627\u0631 \u06a9\u06cc \u062a\u0644\u0627\u0634\u060c \u0627\u062b\u0631\u0627\u062a \u06a9\u06d2 \u062a\u062c\u0632\u06cc\u06d2\u060c \u062a\u0639\u0645\u06cc\u0631\u0627\u062a\u06cc \u062e\u06cc\u0627\u0644\u0627\u062a\u060c AI \u0633\u06cc\u0627\u0642 \u0648 \u0633\u0628\u0627\u0642 \u06a9\u06d2 \u0627\u0646\u062a\u062e\u0627\u0628\u060c \u0627\u0648\u0631 \u062a\u06cc\u0632\u06cc \u0633\u06d2 \u067e\u06cc\u0686\u06cc\u062f\u06c1 \u06a9\u0648\u0688 \u0628\u06cc\u0633\u0632 \u06a9\u0648 \u0646\u06cc\u0648\u06cc\u06af\u06cc\u0679 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u062f\u06cc\u06af\u0631 \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u06cc \u062d\u0645\u0627\u06cc\u062a \u06a9\u0631 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u06cc\u06ba \u0646\u06d2 \u0627\u0633 \u06a9\u06cc \u0628\u0646\u06cc\u0627\u062f \u067e\u0631 \u0627\u06cc\u06a9 \u0648\u0631\u06a9\u0646\u06af \u0648\u0631\u0698\u0646 \u0628\u0646\u0627\u06cc\u0627\u06d4 \u0627\u0633 \u062a\u06a9 \u0631\u0633\u0627\u0626\u06cc \u062d\u0627\u0635\u0644 \u06a9\u06cc \u062c\u0627 \u0633\u06a9\u062a\u06cc \u06c1\u06d2 https:\/\/github.com\/otobongfp\/code-graph-view\u06d4<\/p>\n<p>\u0645\u06cc\u06ba \u0627\u0646 \u062a\u0645\u0627\u0645 \u0639\u0645\u062f\u06c1 \u0686\u06cc\u0632\u0648\u06ba \u06a9\u0648 \u062f\u06cc\u06a9\u06be\u0646\u06d2 \u06a9\u0627 \u0645\u0646\u062a\u0638\u0631 \u06c1\u0648\u06ba \u062c\u0648 \u06c1\u0645 \u0633\u0627\u0641\u0679 \u0648\u06cc\u0626\u0631 \u0627\u0646\u062c\u06cc\u0646\u0626\u0631\u0646\u06af \u06a9\u06d2 \u0639\u0645\u0644 \u0645\u06cc\u06ba \u062d\u0635\u06c1 \u0688\u0627\u0644\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06af\u0631\u0627\u0641 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062a\u062e\u0644\u06cc\u0642 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u062c\u062f\u06cc\u062f \u06a9\u0648\u0688 \u0628\u06cc\u0633\u0632 \u067e\u0631 \u062a\u0634\u0631\u06cc\u0641 \u0644\u0627\u0646\u0627 \u0645\u0634\u06a9\u0644 \u06c1\u0648\u062a\u0627 \u062c\u0627 \u0631\u06c1\u0627 \u06c1\u06d2\u06d4 \u0636\u0631\u0648\u0631\u06cc \u0646\u06c1\u06cc\u06ba \u06a9\u06c1 \u06cc\u06c1 \u0633\u0686 \u06c1\u0648 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0688\u0648\u06cc\u0644\u067e\u0631 \u062e\u0648\u062f \u0632\u06cc\u0627\u062f\u06c1 \u06a9\u0648\u0688 \u0644\u06a9\u06be \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06a9\u062b\u0631 \u0627\u06cc\u0633\u0627 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u06a9\u0648\u0688\u0646\u06af \u0627\u0633\u0633\u0679\u0646\u0679 \u0646\u06d2 \u06a9\u0648\u0688 \u06a9\u06cc \u0633\u06cc\u06a9\u0691\u0648\u06ba \u06cc\u0627 \u06c1\u0632\u0627\u0631\u0648\u06ba \u0644\u0627\u0626\u0646\u06cc\u06ba \u062a\u06cc\u0627\u0631 \u06a9\u06cc \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0645\u0633\u0626\u0644\u06c1 \u06a9\u0648\u0688 \u06a9\u0627 \u062c\u0627\u0626\u0632\u06c1 \u0628\u0646 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4 \u0627\u06cc\u0644 \u0627\u06cc\u0644 \u0627\u06cc\u0645 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":30253,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-30252","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/posts\/30252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/comments?post=30252"}],"version-history":[{"count":1,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/posts\/30252\/revisions"}],"predecessor-version":[{"id":30254,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/posts\/30252\/revisions\/30254"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/media\/30253"}],"wp:attachment":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/media?parent=30252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/categories?post=30252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/tags?post=30252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}