1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
Ignore these type mismatches
Thanks to Xavier Guimard
--- a/src/Terminal.ts
+++ b/src/Terminal.ts
@@ -1636,7 +1636,9 @@
*/
public log(text: string, data?: any): void {
if (!this.options.debug) return;
+ // @ts-ignore
if (!this._context.console || !this._context.console.log) return;
+ // @ts-ignore
this._context.console.log(text, data);
}
@@ -1645,7 +1647,9 @@
*/
public error(text: string, data?: any): void {
if (!this.options.debug) return;
+ // @ts-ignore
if (!this._context.console || !this._context.console.error) return;
+ // @ts-ignore
this._context.console.error(text, data);
}
--- a/src/renderer/ColorManager.test.ts
+++ b/src/renderer/ColorManager.test.ts
@@ -15,6 +15,7 @@
beforeEach(() => {
dom = new jsdom.JSDOM('');
+ // @ts-ignore
window = dom.window;
document = window.document;
(<any>window).HTMLCanvasElement.prototype.getContext = () => ({
--- a/src/ui/CharMeasure.test.ts
+++ b/src/ui/CharMeasure.test.ts
@@ -17,6 +17,7 @@
beforeEach(() => {
dom = new jsdom.JSDOM('');
+ // @ts-ignore
window = dom.window;
document = window.document;
container = document.createElement('div');
--- a/src/utils/MouseHelper.test.ts
+++ b/src/utils/MouseHelper.test.ts
@@ -21,6 +21,7 @@
beforeEach(() => {
dom = new jsdom.JSDOM('');
+ // @ts-ignore
window = dom.window;
document = window.document;
charMeasure = new MockCharMeasure();
--- a/src/Linkifier.test.ts
+++ b/src/Linkifier.test.ts
@@ -62,6 +62,7 @@
terminal.buffer.lines.push(stringToRow(text));
}
+ // @ts-ignore
function assertLinkifiesRow(rowText: string, linkMatcherRegex: RegExp, links: {x: number, length: number}[], done: MochaDone): void {
addRow(rowText);
linkifier.registerLinkMatcher(linkMatcherRegex, () => {});
@@ -80,6 +81,7 @@
}, 0);
}
+ // @ts-ignore
function assertLinkifiesMultiLineLink(rowText: string, linkMatcherRegex: RegExp, links: {x1: number, y1: number, x2: number, y2: number}[], done: MochaDone): void {
addRow(rowText);
linkifier.registerLinkMatcher(linkMatcherRegex, () => {});
@@ -252,6 +254,7 @@
linkifier.attachToDom(mouseZoneManager);
});
+ // @ts-ignore
function assertLinkifiesInTerminal(rowText: string, linkMatcherRegex: RegExp, links: {x1: number, y1: number, x2: number, y2: number}[], done: MochaDone): void {
terminal.writeSync(rowText);
linkifier.registerLinkMatcher(linkMatcherRegex, () => {});
|