mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-28 23:50:08 +00:00
fix(native): strict types in the address screen, Prettier on the native-auth e2e suite, file-local exports
The address screen's element helper returns the plain element instead of Object.assign's intersection, which strict mode could not represent; the haptics test reads an optional argument as optional; three exports only their own file used are local now.
This commit is contained in:
@@ -19,7 +19,7 @@ describe('toastHaptic', () => {
|
||||
toastHaptic('success')
|
||||
toastHaptic('warning')
|
||||
toastHaptic('error')
|
||||
expect(vi.mocked(Haptics.notification).mock.calls.map(([o]) => o.type)).toEqual([
|
||||
expect(vi.mocked(Haptics.notification).mock.calls.map(([o]) => o?.type)).toEqual([
|
||||
NotificationType.Success, NotificationType.Warning, NotificationType.Error,
|
||||
])
|
||||
})
|
||||
|
||||
@@ -16,10 +16,10 @@ import { isNativeIos } from './platform'
|
||||
* the app.
|
||||
*/
|
||||
|
||||
export const OFFLINE_SCHEME = 'trek-offline'
|
||||
const OFFLINE_SCHEME = 'trek-offline'
|
||||
const PREFIX = `${OFFLINE_SCHEME}://`
|
||||
|
||||
export function offlineTilesActive(): boolean {
|
||||
function offlineTilesActive(): boolean {
|
||||
return isNativeIos() && typeof caches !== 'undefined'
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
export type ProbeFailure = 'invalid' | 'unreachable' | 'notTrek' | 'tooOld'
|
||||
export type ProbeResult =
|
||||
type ProbeResult =
|
||||
| { ok: true; url: string; reason?: undefined }
|
||||
| { ok: false; reason: ProbeFailure; url?: undefined }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user