fix: lint and build errors
This commit is contained in:
parent
87ab924e65
commit
cc90d46f43
2 changed files with 7 additions and 6 deletions
|
@ -9,7 +9,7 @@ import {
|
||||||
import * as vsls from 'vsls/vscode';
|
import * as vsls from 'vsls/vscode';
|
||||||
import Activity from '../structures/Activity';
|
import Activity from '../structures/Activity';
|
||||||
import Logger from '../structures/Logger';
|
import Logger from '../structures/Logger';
|
||||||
const clipboardy = require('clipboardy');
|
const clipboardy = require('clipboardy'); // tslint:disable-line
|
||||||
|
|
||||||
let activityTimer: NodeJS.Timer;
|
let activityTimer: NodeJS.Timer;
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ export default class RPCClient implements Disposable {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this._rpc.subscribe('ACTIVITY_JOIN_REQUEST', async ({ user }: { user: { username: string, discriminator: string } }) => {
|
this._rpc.subscribe('ACTIVITY_JOIN_REQUEST', async ({ user }: { user: { username: string, discriminator: string } }) => {
|
||||||
window.showInformationMessage(`${user.username}#${user.discriminator} wants to join your session`, { title: 'Accept' }, { title: 'Decline' })
|
window.showInformationMessage(`${user.username}#${user.discriminator} wants to join your session`, { title: 'Accept' }, { title: 'Decline' })
|
||||||
.then(async val => {
|
.then(async (val: { title: string } | undefined) => {
|
||||||
if (val && val.title === 'Accept') await this._rpc.sendJoinInvite(user);
|
if (val && val.title === 'Accept') await this._rpc.sendJoinInvite(user);
|
||||||
else await this._rpc.closeJoinRequest(user);
|
else await this._rpc.closeJoinRequest(user);
|
||||||
});
|
});
|
||||||
|
@ -133,11 +133,11 @@ export default class RPCClient implements Disposable {
|
||||||
|
|
||||||
const liveshare = await vsls.getApi();
|
const liveshare = await vsls.getApi();
|
||||||
if (!liveshare) return;
|
if (!liveshare) return;
|
||||||
liveshare.onDidChangeSession(({ session }) => {
|
liveshare.onDidChangeSession(({ session }: { session: vsls.Session }) => {
|
||||||
if (session.id) return this._activity.changePartyId(session.id);
|
if (session.id) return this._activity.changePartyId(session.id);
|
||||||
else return this._activity.changePartyId();
|
else return this._activity.changePartyId();
|
||||||
});
|
});
|
||||||
liveshare.onDidChangePeers(({ added, removed }) => {
|
liveshare.onDidChangePeers(({ added, removed }: { added: vsls.Peer[], removed: vsls.Peer[] }) => {
|
||||||
if (added.length) return this._activity.increasePartySize();
|
if (added.length) return this._activity.increasePartySize();
|
||||||
else if (removed.length) return this._activity.decreasePartySize();
|
else if (removed.length) return this._activity.decreasePartySize();
|
||||||
});
|
});
|
||||||
|
@ -158,6 +158,7 @@ export default class RPCClient implements Disposable {
|
||||||
this._activity.dispose();
|
this._activity.dispose();
|
||||||
try {
|
try {
|
||||||
await this._rpc.destroy();
|
await this._rpc.destroy();
|
||||||
|
// tslint:disable-next-line
|
||||||
} catch {}
|
} catch {}
|
||||||
this._rpc = null;
|
this._rpc = null;
|
||||||
this.statusBarIcon.tooltip = '';
|
this.statusBarIcon.tooltip = '';
|
||||||
|
|
|
@ -251,11 +251,11 @@ export default class Activity implements Disposable {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (str.includes('{currentline}')) {
|
if (str.includes('{currentline}')) {
|
||||||
fileDetail.currentLine = (window.activeTextEditor.selection.active.line + 1).toLocaleString();
|
fileDetail.currentLine = (window.activeTextEditor.selection.active.line + 1).toLocaleString(); // tslint:disable-line
|
||||||
}
|
}
|
||||||
|
|
||||||
if (str.includes('{currentcolumn}')) {
|
if (str.includes('{currentcolumn}')) {
|
||||||
fileDetail.currentColumn = (window.activeTextEditor.selection.active.character + 1).toLocaleString();
|
fileDetail.currentColumn = (window.activeTextEditor.selection.active.character + 1).toLocaleString(); // tslint:disable-line
|
||||||
}
|
}
|
||||||
|
|
||||||
if (str.includes('{filesize}')) {
|
if (str.includes('{filesize}')) {
|
||||||
|
|
Loading…
Reference in a new issue