ipc.ts ×3

Frontier kind: Code frontier

unlabeled · c_57ebd83573ac

7 tests · 8651 LOC · 37 files · introduces 0 tests · 26 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges26 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1326 ranges8651 lines · 37 files · Browse complete extent
All tests (intent)
7 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 26 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/base/parts/ipc/common/ipc.ts 22 introduced LOC · 3 ranges

Open complete file

1142
1143 export function fromService<TContext>(service: unknown, disposables: DisposableStore, options?: ICreateServiceChannelOptions): IServerChannel<TContext> {
1144 > const handler = service as { [key: string]: unknown }; ipc.ts
1145 > const disableMarshalling = options?.disableMarshalling;
1146 >
1147 > // Buffer any event that should be supported by
1148 > // iterating over all property keys and finding them
1149 > // However, this will not work for services that
1150 > // are lazy and use a Proxy within. For that we
1151 > // still need to check later (see below).
1152 > const mapEventNameToEvent = new Map<string, Event<unknown>>();
1153 > for (const key in handler) {
1154 > if (propertyIsEvent(key)) {
1155 > mapEventNameToEvent.set(key, Event.buffer(handler[key] as Event<unknown>, key, true, undefined, disposables));
1156 > }
1157 > }
1158 >
1159 > return new class implements IServerChannel {
1160 >
1161 > listen<T>(_: unknown, event: string, arg: any): Event<T> {
1162 const eventImpl = mapEventNameToEvent.get(event);
1163 if (eventImpl) {
1180 throw new ErrorNoTelemetry(`Event not found: ${event}`);
1181 }
1182 > ipc.ts
1183 > call(_: unknown, command: string, args?: any[]): Promise<any> {
1184 const target = handler[command];
1185 if (typeof target === 'function') {
1201 throw new ErrorNoTelemetry(`Method not found: ${command}`);
1202 }
1203 > }; ipc.ts
1204 > }
1205
1206 export interface ICreateProxyServiceOptions extends IProxyOptions {
src/vs/base/common/event.ts 4 introduced LOC · 2 ranges

Open complete file

556
557 if (disposable) {
558 > disposable.add(listener); event.ts
559 > }
560
561 const flush = () => {
595
596 if (disposable) {
597 > disposable.add(emitter); event.ts
598 > }
599
600 return emitter.event;