Skip to content

Commit a858519

Browse files
chore: narrow ParamsDeviceTracker type to 'android' only
ws-scrcpy-web is goog-only — iOS support was intentionally dropped long before this fork (related to WdaStatus.ts, removed in the dead-code sweep earlier this session). The 'android' | 'ios' union was vestigial upstream-compat typing. Narrowing to 'android' also collapses the dead branch in BaseDeviceTracker.parseParameters that accepted 'ios' and would have fed it into code that only handles 'android'. 0 tsc errors, 89/89 tests pass.
1 parent f9f06fc commit a858519

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/app/client/BaseDeviceTracker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export abstract class BaseDeviceTracker<DD extends BaseDeviceDescriptor, TE exte
102102
public static parseParameters(params: URLSearchParams): ParamsDeviceTracker {
103103
const typedParams = super.parseParameters(params);
104104
const type = Util.parseString(params, 'type', true);
105-
if (type !== 'android' && type !== 'ios') {
105+
if (type !== 'android') {
106106
throw Error('Incorrect type');
107107
}
108108
return { ...typedParams, type };

src/types/ParamsDeviceTracker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ParamsBase } from './ParamsBase';
22

33
export interface ParamsDeviceTracker extends ParamsBase {
4-
type: 'android' | 'ios';
4+
type: 'android';
55
}

0 commit comments

Comments
 (0)