MCPcopy
hub / github.com/microsoft/pyright / extend

Method extend

server/src/common/textRange.ts:33–50  ·  view source on GitHub ↗
(range: TextRange | TextRange[] | undefined)

Source from the content-addressed store, hash-verified

31 }
32
33 extend(range: TextRange | TextRange[] | undefined) {
34 if (range) {
35 if (Array.isArray(range)) {
36 range.forEach(r => {
37 this.extend(r);
38 });
39 } else {
40 if (range.start < this.start) {
41 this.length += this.start - range.start;
42 this.start = range.start;
43 }
44
45 if (range.end > this.end) {
46 this.length += range.end - this.end;
47 }
48 }
49 }
50 }
51}

Callers 15

constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80

Calls 1

forEachMethod · 0.80

Tested by

no test coverage detected