Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(plugin-meetings): update tsconfig for plugin-meetings #3663

Open
wants to merge 12 commits into
base: next
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ type AnnotationInfo = {

interface IAnnotationChannel {
// === below is for presenter
acceptRequest: (approval) => undefined | Promise<void>;
declineRequest: (approval) => undefined | Promise<void>;
acceptRequest: (approval: any) => undefined | Promise<void>;
declineRequest: (approval: any) => undefined | Promise<void>;
closeAnnotation: (requestData: RequestData) => undefined | Promise<void>;
// === below is for attendee
approveAnnotation: (requestData: RequestData) => undefined | Promise<void>;
cancelApproveAnnotation: (requestData: RequestData, approval) => undefined | Promise<void>;
cancelApproveAnnotation: (requestData: RequestData, approval: any) => undefined | Promise<void>;
sendStrokeData: (strokeData: StrokeData) => void;
// =====
approvalUrlUpdate: (approvalUrl: string) => void;
Expand Down
23 changes: 11 additions & 12 deletions packages/@webex/plugin-meetings/src/annotation/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import uuid from 'uuid';
// eslint-disable-next-line import/no-extraneous-dependencies
import {WebexPlugin, config} from '@webex/webex-core';
import TriggerProxy from '../common/events/trigger-proxy';

Expand All @@ -24,16 +23,16 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {

private seqNum: number;

hasSubscribedToEvents: boolean;
hasSubscribedToEvents: boolean | undefined;

approvalUrl: string;
locusUrl: string;
deviceUrl: string;
approvalUrl: string | undefined;
locusUrl: string | undefined;
deviceUrl: string | undefined;

/**
* Initializes annotation module
*/
constructor(...args) {
constructor(...args: unknown[]) {
super(...args);
this.seqNum = 1;
}
Expand All @@ -43,7 +42,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
* @param {object} data
* @returns {void}
*/
private processStrokeMessage(data) {
private processStrokeMessage(data: any) {
const {request} = data;
this.decryptContent(request.value.encryptionKeyUrl, request.value.content).then(
(decryptedContent) => {
Expand All @@ -67,7 +66,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
* @param {Object} e
* @returns {undefined}
*/
private eventCommandProcessor(e) {
private eventCommandProcessor(e: any) {
if (
e?.data?.eventType === 'locus.approval_request' &&
e?.data?.approval?.resourceType === ANNOTATION_RESOURCE_TYPE &&
Expand All @@ -92,7 +91,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
* @param {Object} e
* @returns {undefined}
*/
private eventDataProcessor(e) {
private eventDataProcessor(e: any) {
switch (e?.data?.relayType) {
case ANNOTATION_RELAY_TYPES.ANNOTATION_CLIENT:
this.processStrokeMessage(e.data);
Expand Down Expand Up @@ -144,7 +143,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
* @param {object} approval
* @returns {Promise}
*/
public acceptRequest(approval) {
public acceptRequest(approval: any) {
// @ts-ignore
return this.request({
method: HTTP_VERBS.PUT,
Expand All @@ -161,7 +160,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
* @param {approval} approval
* @returns {Promise}
*/
public declineRequest(approval) {
public declineRequest(approval: any) {
// @ts-ignore
return this.request({
method: HTTP_VERBS.PUT,
Expand All @@ -188,7 +187,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
* @param {object} approval
* @returns {Promise}
*/
public cancelApproveAnnotation(requestData: RequestData, approval) {
public cancelApproveAnnotation(requestData: RequestData, approval: any) {
const body: CommandRequestBody = {
actionType: ANNOTATION_ACTION_TYPE.CANCELED,
resourceType: 'AnnotationOnShare',
Expand Down
10 changes: 5 additions & 5 deletions packages/@webex/plugin-meetings/src/breakouts/breakout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ const Breakout = WebexPlugin.extend({
* If the breakout has no name, assume it is the main session
* @returns {boolean}
*/
fn() {
return this.sessionType === 'MAIN';
fn(): boolean {
return (this as Record<string, any>).sessionType === 'MAIN';
},
},
},
Expand Down Expand Up @@ -99,7 +99,7 @@ const Breakout = WebexPlugin.extend({
throw new Error('Cannot leave the main session');
}

const mainSession = this.parent.breakouts.filter((breakout) => breakout.isMain)[0];
const mainSession = this.parent.breakouts.filter((breakout: any) => breakout.isMain)[0];

if (!mainSession) {
throw new Error('Cannot leave, no main session found');
Expand Down Expand Up @@ -157,7 +157,7 @@ const Breakout = WebexPlugin.extend({
* @param {Object} locus Locus object
* @returns {void}
*/
parseRoster(locus) {
parseRoster(locus: any) {
if (!this.members) {
this.initMembers();
}
Expand All @@ -174,7 +174,7 @@ const Breakout = WebexPlugin.extend({
* @param {Object} options
* @returns {Promise}
*/
broadcast(message, options) {
broadcast(message: any, options: any) {
return this.breakoutRequest.broadcast({
url: this.url,
message,
Expand Down
9 changes: 4 additions & 5 deletions packages/@webex/plugin-meetings/src/breakouts/events.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// eslint-disable-next-line import/prefer-default-export
import {ClientEvent} from '@webex/internal-plugin-metrics';

const breakoutEvent: {
onBreakoutMoveRequest: (eventInfo: any, submitClientEvent: any) => void;
onBreakoutMoveResponse: (eventInfo: any, submitClientEvent: any) => void;
onBreakoutJoinResponse: (eventInfo: any, submitClientEvent: any) => void;
onBreakoutMoveRequest: (eventInfo: unknown, submitClientEvent: unknown) => void;
onBreakoutMoveResponse: (eventInfo: unknown, submitClientEvent: unknown) => void;
onBreakoutJoinResponse: (eventInfo: unknown, submitClientEvent: unknown) => void;
postMoveCallAnalyzer: (
event: ClientEvent['name'],
eventInfo: any,
eventInfo: unknown,
submitClientEvent: any
) => void;
} = {
Expand Down
Loading
Loading