Fix error on undefined path of desktop app interfaces
This commit is contained in:
parent
2358aac775
commit
fb9f8adb21
@ -1,6 +1,6 @@
|
|||||||
import { requestedCameraState, requestedMicrophoneState, silentStore } from "../../Stores/MediaStore";
|
import { requestedCameraState, requestedMicrophoneState, silentStore } from "../../Stores/MediaStore";
|
||||||
import { get } from "svelte/store";
|
import { get } from "svelte/store";
|
||||||
import { WorkAdventureDesktopApi } from "@wa-preload-app";
|
import { WorkAdventureDesktopApi } from "../../Interfaces/DesktopAppInterfaces";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
showDesktopCapturerSourcePicker,
|
showDesktopCapturerSourcePicker,
|
||||||
} from "../../Stores/ScreenSharingStore";
|
} from "../../Stores/ScreenSharingStore";
|
||||||
import { onDestroy, onMount } from "svelte";
|
import { onDestroy, onMount } from "svelte";
|
||||||
import type { DesktopCapturerSource } from "@wa-preload-app";
|
import type { DesktopCapturerSource } from "../../Interfaces/DesktopAppInterfaces";
|
||||||
|
|
||||||
let desktopCapturerSources: DesktopCapturerSource[] = [];
|
let desktopCapturerSources: DesktopCapturerSource[] = [];
|
||||||
let interval: ReturnType<typeof setInterval>;
|
let interval: ReturnType<typeof setInterval>;
|
||||||
|
21
front/src/Interfaces/DesktopAppInterfaces.ts
Normal file
21
front/src/Interfaces/DesktopAppInterfaces.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// copy of Electron.SourcesOptions to avoid Electron dependency in front
|
||||||
|
export interface SourcesOptions {
|
||||||
|
types: string[];
|
||||||
|
thumbnailSize?: { height: number; width: number };
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DesktopCapturerSource {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
thumbnailURL: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type WorkAdventureDesktopApi = {
|
||||||
|
desktop: boolean;
|
||||||
|
isDevelopment: () => Promise<boolean>;
|
||||||
|
getVersion: () => Promise<string>;
|
||||||
|
notify: (txt: string) => void;
|
||||||
|
onMuteToggle: (callback: () => void) => void;
|
||||||
|
onCameraToggle: (callback: () => void) => void;
|
||||||
|
getDesktopCapturerSources: (options: SourcesOptions) => Promise<DesktopCapturerSource[]>;
|
||||||
|
};
|
@ -2,7 +2,7 @@ import { derived, Readable, readable, writable } from "svelte/store";
|
|||||||
import { peerStore } from "./PeerStore";
|
import { peerStore } from "./PeerStore";
|
||||||
import type { LocalStreamStoreValue } from "./MediaStore";
|
import type { LocalStreamStoreValue } from "./MediaStore";
|
||||||
import { myCameraVisibilityStore } from "./MyCameraStoreVisibility";
|
import { myCameraVisibilityStore } from "./MyCameraStoreVisibility";
|
||||||
import type { DesktopCapturerSource } from "@wa-preload-app";
|
import type { DesktopCapturerSource } from "../Interfaces/DesktopAppInterfaces";
|
||||||
|
|
||||||
declare const navigator: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
declare const navigator: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
// "include": ["src/**/*"],
|
// "include": ["src/**/*"],
|
||||||
|
|
||||||
"extends": "@tsconfig/svelte/tsconfig.json",
|
"extends": "@tsconfig/svelte/tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./dist/",
|
"outDir": "./dist/",
|
||||||
@ -14,23 +13,17 @@
|
|||||||
"jsx": "react",
|
"jsx": "react",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
|
|
||||||
"importsNotUsedAsValues": "remove",
|
"importsNotUsedAsValues": "remove",
|
||||||
|
"strict": true, /* Enable all strict type-checking options. */
|
||||||
"strict": true, /* Enable all strict type-checking options. */
|
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||||
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
"strictNullChecks": true, /* Enable strict null checks. */
|
||||||
"strictNullChecks": true, /* Enable strict null checks. */
|
"strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||||
"strictFunctionTypes": true, /* Enable strict checking of function types. */
|
"strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
||||||
"strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
"strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||||
"strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||||
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||||
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||||
|
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
||||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
||||||
"paths": {
|
|
||||||
"@wa-preload-app": ["../desktop/electron/src/preload-app/types.ts"],
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
Loading…
Reference in New Issue
Block a user