Skip to content

Commit

Permalink
Merge branch 'main' into daily-js-releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Daily Autobot committed Apr 12, 2023
2 parents 5ef64b8 + 007997b commit 709a646
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@daily-co/react-native-daily-js",
"private": true,
"//": "^ COMMENT OUT 'private: true' BEFORE RUNNING NPM PUBLISH",
"version": "0.39.0",
"version": "0.40.0",
"description": "React Native library for making video calls using Daily",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -28,7 +28,7 @@
"baseUrl": "https://github.com/daily-co/react-native-daily-js"
},
"dependencies": {
"@daily-co/daily-js": "^0.41.0",
"@daily-co/daily-js": "^0.42.2",
"@types/react-native-background-timer": "^2.0.0",
"react-native-url-polyfill": "^1.1.2"
},
Expand Down
16 changes: 8 additions & 8 deletions type-overrides/@daily-co/daily-js/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,17 +494,17 @@ export type DailyCameraError = {
export interface DailyCamPermissionsError extends DailyCameraError {
type: Extract<DailyCameraErrorType, 'permissions'>;
blockedBy: 'user' | 'browser';
blockedMedia: Set<'video' | 'audio'>;
blockedMedia: Array<'video' | 'audio'>;
}

export interface DailyCamDeviceNotFoundError extends DailyCameraError {
type: Extract<DailyCameraErrorType, 'not-found'>;
missingMedia: Set<'video' | 'audio'>;
missingMedia: Array<'video' | 'audio'>;
}

export interface DailyCamConstraintsError extends DailyCameraError {
type: Extract<DailyCameraErrorType, 'constraints'>;
reason: Set<'invalid' | 'none-specified'>;
reason: 'invalid' | 'none-specified';
}

export interface DailyCamInUseError extends DailyCameraError {
Expand All @@ -522,7 +522,7 @@ export interface DailyCamUnknownError extends DailyCameraError {
type: Extract<DailyCameraErrorType, 'unknown'>;
}

export type DailyCameraErrorObject<T extends DailyCameraError = any> =
export type DailyCameraErrorObject<T extends DailyCameraErrorType> =
T extends DailyCamPermissionsError['type']
? DailyCamPermissionsError
: T extends DailyCamDeviceNotFoundError['type']
Expand All @@ -544,7 +544,7 @@ export interface DailyEventObjectCameraError {
audioOk?: boolean;
videoOk?: boolean;
};
error: DailyCameraErrorObject;
error: DailyCameraErrorObject<DailyCameraErrorType>;
}

export type DailyFatalError = {
Expand All @@ -553,21 +553,21 @@ export type DailyFatalError = {
};

export interface DailyFatalConnectionError extends DailyFatalError {
type: Extract<DailyFatalConnectionError, 'connection-error'>;
type: Extract<DailyFatalErrorType, 'connection-error'>;
details: {
on: 'join' | 'reconnect';
sourceError: Error;
uri?: string;
};
}

export type DailyFatalErrorObject<T extends DailyFatalError = any> =
export type DailyFatalErrorObject<T extends DailyFatalErrorType> =
T extends DailyFatalConnectionError['type'] ? DailyFatalConnectionError : any;

export interface DailyEventObjectFatalError {
action: Extract<DailyEvent, 'error'>;
errorMsg: string;
error?: DailyFatalErrorObject;
error?: DailyFatalErrorObject<DailyFatalErrorType>;
}

export interface DailyEventObjectNonFatalError {
Expand Down

0 comments on commit 709a646

Please sign in to comment.