Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "none",
"area": "improvement",
"workstream": "",
"comment": "Enable noImplicitAny for calling stateful packages",
"packageName": "@azure/communication-react",
"email": "2684369+JamesBurnside@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "minor",
"area": "fix",
"workstream": "",
"comment": "Fix function type signature of StatefulCallClient.selectCamera",
"packageName": "@azure/communication-react",
"email": "2684369+JamesBurnside@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "none",
"area": "improvement",
"workstream": "",
"comment": "Enable noImplicitAny for calling stateful packages",
"packageName": "@azure/communication-react",
"email": "2684369+JamesBurnside@users.noreply.github.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "minor",
"area": "fix",
"workstream": "",
"comment": "Fix function type signature of StatefulCallClient.selectCamera",
"packageName": "@azure/communication-react",
"email": "2684369+JamesBurnside@users.noreply.github.com",
"dependentChangeType": "patch"
}
4 changes: 2 additions & 2 deletions packages/acs-ui-common/src/telemetry.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import * as telemetryVersion from './telemetryVersion';
import telemetryVersion from './telemetryVersion';

/**
* @private
Expand Down Expand Up @@ -64,6 +64,6 @@ export const _getApplicationId = (telemetryImplementationHint: _TelemetryImpleme
const highLevelArtifact = 1;
const specificImplementation = getTelemetryImplementationHint(telemetryImplementationHint);
const implementationDetails = 0;
const version = telemetryVersion['default'];
const version = telemetryVersion;
return sanitize(`acr${highLevelArtifact}${specificImplementation}${implementationDetails}/${version}`);
};
2 changes: 1 addition & 1 deletion packages/acs-ui-common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../common/config/tsc/tsconfig.json",
"compilerOptions": {
"noImplicitAny": false, // TODO: MAKE THIS true
"noImplicitAny": true,
"outDir": "./dist/dist-esm"
},
"typeRoots": ["./node_modules/@types"],
Expand Down
2 changes: 1 addition & 1 deletion packages/acs-ui-common/tsconfig.preprocess.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../common/config/tsc/tsconfig.json",
"compilerOptions": {
"baseUrl": "./preprocessed",
"noImplicitAny": false, // TODO: MAKE THIS true
"noImplicitAny": true,
"outDir": "./dist/dist-esm"
},
"typeRoots": ["./node_modules/@types"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ const convertRemoteParticipantsToParticipantListParticipants = (
isHideAttendeeNamesEnabled?: boolean,
localUserRole?: ParticipantRole
): CallParticipantListParticipant[] => {
/* eslint-disable @typescript-eslint/explicit-function-return-type */
const conversionCallback = (memoizeFn) => {
const conversionCallback = (
memoizeFn: (...args: any[]) => CallParticipantListParticipant
): CallParticipantListParticipant[] => {
return (
remoteParticipants
// Filter out MicrosoftBot participants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const videoGallerySelector: VideoGallerySelector = createSelector(
const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);
const dominantSpeakersMap: Record<string, number> = {};
dominantSpeakerIds?.forEach((speaker, idx) => (dominantSpeakersMap[speaker] = idx));
const noRemoteParticipants = [];
const noRemoteParticipants: RemoteParticipantState[] = [];

return {
screenShareParticipant: screenShareRemoteParticipant
Expand Down
2 changes: 1 addition & 1 deletion packages/calling-component-bindings/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../common/config/tsc/tsconfig.json",
"compilerOptions": {
"noImplicitAny": false, // TODO: MAKE THIS true
"noImplicitAny": true,
"outDir": "./dist/dist-esm"
},
"typeRoots": ["./node_modules/@types"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ export type StatefulCallClientOptions = {
// @public
export interface StatefulDeviceManager extends DeviceManager {
getUnparentedVideoStreams: () => LocalVideoStream[];
selectCamera: (VideoDeviceInfo: any) => void;
selectCamera: (device: VideoDeviceInfo) => void;
}

// @beta (undocumented)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export type StatefulCallClientOptions = {
// @public
export interface StatefulDeviceManager extends DeviceManager {
getUnparentedVideoStreams: () => LocalVideoStream[];
selectCamera: (VideoDeviceInfo: any) => void;
selectCamera: (device: VideoDeviceInfo) => void;
}

// @beta (undocumented)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
} from '@azure/communication-calling';
/* @conditional-compile-remove(calling-beta-sdk) */
import {
CallAgentFeature,
MeetingLocator,
GroupChatCallLocator,
PushNotificationData,
Expand Down Expand Up @@ -78,7 +79,10 @@ class MockCallAgent implements CallAgent {
connectionState = 'Disconnected' as ConnectionState;
kind = 'CallAgent' as CallAgentKind;
emitter = new EventEmitter();
feature;
/* @conditional-compile-remove(calling-beta-sdk) */
feature<TFeature extends CallAgentFeature>(): TFeature {
throw new Error('Method not implemented.');
}
startCall(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
participants: (CommunicationUserIdentifier | PhoneNumberIdentifier | UnknownIdentifier)[],
Expand Down
4 changes: 2 additions & 2 deletions packages/calling-stateful-client/src/Converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function convertSdkRemoteStreamToDeclarativeRemoteStream(
export function convertSdkParticipantToDeclarativeParticipant(
participant: SdkRemoteParticipant
): DeclarativeRemoteParticipant {
const declarativeVideoStreams = {};
const declarativeVideoStreams: { [key: number]: DeclarativeRemoteVideoStream } = {};
for (const videoStream of participant.videoStreams) {
declarativeVideoStreams[videoStream.id] = convertSdkRemoteStreamToDeclarativeRemoteStream(videoStream);
}
Expand All @@ -105,7 +105,7 @@ export function convertSdkParticipantToDeclarativeParticipant(
* Note at the time of writing only one LocalVideoStream is supported by the SDK.
*/
export function convertSdkCallToDeclarativeCall(call: CallCommon): CallState {
const declarativeRemoteParticipants = {};
const declarativeRemoteParticipants: { [key: string]: DeclarativeRemoteParticipant } = {};
call.remoteParticipants.forEach((participant: SdkRemoteParticipant) => {
declarativeRemoteParticipants[toFlatCommunicationIdentifier(participant.identifier)] =
convertSdkParticipantToDeclarativeParticipant(participant);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ const createStatefulCallClientWithDeviceManager = (deviceManager: MockDeviceMana
};

interface MockDeviceManager extends Mutable<DeviceManager> {
emit(event: any, data?: any);
emit(eventName: string | symbol, ...args: any[]): boolean;
}

const createMockDeviceManagerWithCameras = (cameras: VideoDeviceInfo[]): MockDeviceManager => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface StatefulDeviceManager extends DeviceManager {
* any way to {@link @azure/communication-calling#DeviceManager}. It is entirely contained in
* {@link StatefulDeviceManager}. See also {@link DeviceManagerState.selectedCamera}.
*/
selectCamera: (VideoDeviceInfo) => void;
selectCamera: (device: VideoDeviceInfo) => void;

/* @conditional-compile-remove(video-background-effects) */
/**
Expand Down
12 changes: 6 additions & 6 deletions packages/calling-stateful-client/src/TestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ import { CallContext } from './CallContext';
import { InternalCallContext } from './InternalCallContext';
import { createStatefulCallClientWithDeps, StatefulCallClient } from './StatefulCallClient';

let backupFreezeFunction;
let backupFreezeFunction: typeof Object.freeze;

/**
* @private
*/
export function mockoutObjectFreeze(): void {
beforeEach(() => {
backupFreezeFunction = Object.freeze;
Object.freeze = function (obj) {
Object.freeze = function <T>(obj: T): T {
return obj;
};
});
Expand All @@ -56,7 +56,7 @@ export function mockoutObjectFreeze(): void {
*/
export interface MockEmitter {
emitter: EventEmitter;
emit(event: any, data?: any);
emit(eventName: string | symbol, ...args: any[]): boolean;
}

/**
Expand Down Expand Up @@ -95,7 +95,7 @@ export const stubCommunicationTokenCredential = (): CommunicationTokenCredential
export class MockRecordingCallFeatureImpl implements RecordingCallFeature {
public name = 'Recording';
public isRecordingActive = false;
public recordings;
public recordings: RecordingInfo[] = [];
public emitter = new EventEmitter();
on(event: 'isRecordingActiveChanged', listener: PropertyChangedEvent): void;
on(event: 'recordingsUpdated', listener: CollectionUpdatedEvent<RecordingInfo>): void;
Expand Down Expand Up @@ -240,7 +240,7 @@ export function addMockEmitter(object: any): any {
* @private
*/
export interface MockCall extends Mutable<Call>, MockEmitter {
testHelperPushRemoteParticipant(participant: RemoteParticipant);
testHelperPushRemoteParticipant(participant: RemoteParticipant): void;
testHelperPopRemoteParticipant(): RemoteParticipant;
testHelperPushLocalVideoStream(stream: LocalVideoStream): void;
testHelperPopLocalVideoStream(): LocalVideoStream;
Expand Down Expand Up @@ -290,7 +290,7 @@ export function createMockCall(mockCallId = 'defaultCallID'): MockCall {
* @private
*/
export interface MockRemoteParticipant extends Mutable<RemoteParticipant> {
emit(event: string, data?: any);
emit(eventName: string | symbol, ...args: any[]): boolean;
testHelperPushVideoStream(stream: RemoteVideoStream): void;
testHelperPopVideoStream(): RemoteVideoStream;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/calling-stateful-client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../common/config/tsc/tsconfig.json",
"compilerOptions": {
"noImplicitAny": false, // TODO: MAKE THIS true
"noImplicitAny": true,
"outDir": "./dist/dist-esm"
},
"typeRoots": ["./node_modules/@types"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3837,7 +3837,7 @@ export type StatefulChatClientOptions = {
// @public
export interface StatefulDeviceManager extends DeviceManager {
getUnparentedVideoStreams: () => LocalVideoStream[];
selectCamera: (VideoDeviceInfo: any) => void;
selectCamera: (device: VideoDeviceInfo) => void;
}

// @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3060,7 +3060,7 @@ export type StatefulChatClientOptions = {
// @public
export interface StatefulDeviceManager extends DeviceManager {
getUnparentedVideoStreams: () => LocalVideoStream[];
selectCamera: (VideoDeviceInfo: any) => void;
selectCamera: (device: VideoDeviceInfo) => void;
}

// @public
Expand Down