taskConfiguration.ts ×16

Frontier kind: Code frontier

unlabeled · c_88a644ddd384

44 tests · 21144 LOC · 80 files · introduces 0 tests · 48 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
16 ranges48 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2431 ranges21144 lines · 80 files · Browse complete extent
All tests (intent)
44 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.

1 file ranked by introduced lines: 48 introduced LOC across 16 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/tasks/common/taskConfiguration.ts 48 introduced LOC · 16 ranges

Open complete file

572 }
573
574 > function fillProperty<T, K extends keyof T>(target: T, source: Partial<T>, key: K) { taskConfiguration.ts
575 > const sourceAtKey = source[key];
576 > if (target[key] === undefined && sourceAtKey !== undefined) {
577 > target[key] = sourceAtKey!;
578 > }
579 > }
580
581
636
637 // eslint-disable-next-line @typescript-eslint/no-explicit-any -- IMetaData array holds heterogeneous parser types
638 > function _fillProperties<T>(this: void, target: T | undefined, source: T | undefined, properties: IMetaData<T, any>[] | undefined, allowEmptyArray: boolean = false): T | undefined { taskConfiguration.ts
639 > if (!source || _isEmpty(source, properties)) {
640 return target;
641 }
642 > if (!target || _isEmpty(target, properties, allowEmptyArray)) { taskConfiguration.ts
643 > return source;
644 > }
645 for (const meta of properties!) {
646 const property = meta.property;
661 function _fillDefaults<T>(this: void, target: T | undefined, defaults: T | undefined, properties: IMetaData<T, any>[], context: IParseContext): T | undefined {
662 if (target && Object.isFrozen(target)) {
663 > return target; taskConfiguration.ts
664 > }
665 if (target === undefined || target === null || defaults === undefined || defaults === null) {
666 if (defaults !== undefined && defaults !== null) {
690
691 // eslint-disable-next-line @typescript-eslint/no-explicit-any -- IMetaData array holds heterogeneous parser types
692 > function _freeze<T>(this: void, target: T, properties: IMetaData<T, any>[]): Readonly<T> | undefined { taskConfiguration.ts
693 > if (target === undefined || target === null) {
694 return undefined;
695 }
696 > if (Object.isFrozen(target)) { taskConfiguration.ts
697 return target;
698 }
699 > for (const meta of properties) { taskConfiguration.ts
700 > if (meta.type) {
701 > const value = target[meta.property];
702 > if (value) {
703 > meta.type.freeze(value);
704 > }
705 > }
706 > }
707 > Object.freeze(target);
708 > return target;
709 > }
710
711 export namespace RunOnOptions {
882
883 export function fillProperties(target: Tasks.CommandOptions | undefined, source: Tasks.CommandOptions | undefined): Tasks.CommandOptions | undefined {
884 > return _fillProperties(target, source, properties); taskConfiguration.ts
885 > }
886
887 export function fillDefaults(value: Tasks.CommandOptions | undefined, context: IParseContext): Tasks.CommandOptions | undefined {
890
891 export function freeze(value: Tasks.CommandOptions): Readonly<Tasks.CommandOptions> | undefined {
892 > return _freeze(value, properties); taskConfiguration.ts
893 > }
894 }
895
968
969 export function fillProperties(target: Tasks.IPresentationOptions, source: Tasks.IPresentationOptions | undefined): Tasks.IPresentationOptions | undefined {
970 > return _fillProperties(target, source, properties); taskConfiguration.ts
971 > }
972
973 export function fillDefaults(value: Tasks.IPresentationOptions, context: IParseContext): Tasks.IPresentationOptions | undefined {
977
978 export function freeze(value: Tasks.IPresentationOptions): Readonly<Tasks.IPresentationOptions> | undefined {
979 > return _freeze(value, properties); taskConfiguration.ts
980 > }
981
982 export function isEmpty(this: void, value: Tasks.IPresentationOptions): boolean {
1137 return target;
1138 }
1139 > target = target || { taskConfiguration.ts
1140 name: undefined,
1141 runtime: undefined,
1159 target.args = args;
1160 }
1161 > fillProperty(target, source, 'runtime'); taskConfiguration.ts
1162 >
1163 > target.presentation = PresentationOptions.fillProperties(target.presentation!, source.presentation)!;
1164 > target.options = CommandOptions.fillProperties(target.options, source.options);
1165 >
1166 > return target;
1167 }
1168
1187
1188 export function freeze(value: Tasks.ICommandConfiguration): Readonly<Tasks.ICommandConfiguration> | undefined {
1189 > return _freeze(value, properties); taskConfiguration.ts
1190 > }
1191 }
1192
1892 const command = CommandConfiguration.from(config, context);
1893 if (command) {
1894 > result.command = command; taskConfiguration.ts
1895 > }
1896 Globals.fillDefaults(result, context);
1897 Globals.freeze(result);
1945 Object.freeze(value);
1946 if (value.command) {
1947 > CommandConfiguration.freeze(value.command); taskConfiguration.ts
1948 > }
1949 }
1950 }