Fix addon lint

This commit is contained in:
Daniel Imms
2018-01-17 10:20:04 -08:00
parent 5888cd7938
commit 70236f6818
13 changed files with 94 additions and 97 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
import { assert, expect } from 'chai';
import * as fullscreen from './fullscreen'
import * as fullscreen from './fullscreen';
class MockTerminal {}
+6 -6
View File
@@ -8,10 +8,10 @@
* @param {Terminal} term - The terminal to toggle full screen mode
* @param {boolean} fullscreen - Toggle fullscreen on (true) or off (false)
*/
export function toggleFullScreen(term, fullscreen) {
var fn;
export function toggleFullScreen(term: any, fullscreen: boolean): void {
let fn;
if (typeof fullscreen == 'undefined') {
if (typeof fullscreen === 'undefined') {
fn = (term.element.classList.contains('fullscreen')) ? 'remove' : 'add';
} else if (!fullscreen) {
fn = 'remove';
@@ -22,8 +22,8 @@ export function toggleFullScreen(term, fullscreen) {
term.element.classList[fn]('fullscreen');
};
export function apply(terminalConstructor) {
terminalConstructor.prototype.toggleFullScreen = function (fullscreen) {
return toggleFullScreen(this, fullscreen);
export function apply(terminalConstructor: any): void {
terminalConstructor.prototype.toggleFullScreen = function (fullscreen: boolean): void {
toggleFullScreen(this, fullscreen);
};
}