mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 12:33:35 +01:00
Build VS Code using TS 4.4 (#127823)
* Build VS Code using TS 4.4 * Remove usages of deprecated `ClientRectList` * Add any casts for missing `caretRangeFromPoint` * Add temporary any casts for `zoom` css propery This non-standard css property no longer exists in lib.dom.d.ts * MouseWheelEvent -> WheelEvent * Pick up new TS nightly Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
This commit is contained in:
@@ -305,9 +305,7 @@ function readLineBreaks(range: Range, lineDomNode: HTMLDivElement, lineContent:
|
||||
return breakOffsets;
|
||||
}
|
||||
|
||||
type MaybeRects = ClientRectList | DOMRectList | null;
|
||||
|
||||
function discoverBreaks(range: Range, spans: HTMLSpanElement[], charOffsets: number[], low: number, lowRects: MaybeRects, high: number, highRects: MaybeRects, result: number[]): void {
|
||||
function discoverBreaks(range: Range, spans: HTMLSpanElement[], charOffsets: number[], low: number, lowRects: DOMRectList | null, high: number, highRects: DOMRectList | null, result: number[]): void {
|
||||
if (low === high) {
|
||||
return;
|
||||
}
|
||||
@@ -333,7 +331,7 @@ function discoverBreaks(range: Range, spans: HTMLSpanElement[], charOffsets: num
|
||||
discoverBreaks(range, spans, charOffsets, mid, midRects, high, highRects, result);
|
||||
}
|
||||
|
||||
function readClientRect(range: Range, spans: HTMLSpanElement[], startOffset: number, endOffset: number): ClientRectList | DOMRectList {
|
||||
function readClientRect(range: Range, spans: HTMLSpanElement[], startOffset: number, endOffset: number): DOMRectList {
|
||||
range.setStart(spans[(startOffset / Constants.SPAN_MODULO_LIMIT) | 0].firstChild!, startOffset % Constants.SPAN_MODULO_LIMIT);
|
||||
range.setEnd(spans[(endOffset / Constants.SPAN_MODULO_LIMIT) | 0].firstChild!, endOffset % Constants.SPAN_MODULO_LIMIT);
|
||||
return range.getClientRects();
|
||||
|
||||
Reference in New Issue
Block a user