1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Chore: shim.mobilePlatform: Use a stronger return type (#13415)

This commit is contained in:
Henry Heino
2025-10-09 13:46:04 -07:00
committed by GitHub
parent 191775310e
commit d096a90c0e
8 changed files with 29 additions and 20 deletions

View File

@@ -54,6 +54,13 @@ export interface ShowMessageBoxOptions {
cancelId?: number;
}
export enum MobilePlatform {
None = '',
Android = 'android',
Ios = 'ios',
Web = 'web',
}
let isTestingEnv_ = false;
// We need to ensure that there's only one instance of React being used by all
@@ -190,8 +197,8 @@ const shim = {
},
// "ios" or "android", or "" if not on mobile
mobilePlatform: () => {
return ''; // Default if we're not on mobile (React Native)
mobilePlatform: (): MobilePlatform => {
return MobilePlatform.None; // Default if we're not on mobile (React Native)
},
// https://github.com/cheton/is-electron