SaveResult — @gj-kit/expo-workouts
A public type from @gj-kit/expo-workouts/core. The signature below is taken directly from the 0.1.1 release declaration.
Verified import example
Section titled “Verified import example”import { SaveResult } from '@gj-kit/expo-workouts/core';Signature, parameters, and return type
Section titled “Signature, parameters, and return type”/** * A discriminated union, so `nativeId` does not EXIST on the `pendingUnlock` branch. That branch * only ever appears on a locked device, i.e. never during development, so a type that merely made * `nativeId` optional would be forgotten by everyone. */type SaveResult = { readonly status: 'saved'; /** Echo of `WorkoutWrite.id`. */ readonly id: string; /** The platform's own id for the stored workout. */ readonly nativeId: string; readonly route: Exclude<RouteWriteOutcome, 'deferred'>; /** How many points actually reached the store. Compare it against what you sent to see how * much our mandatory hygiene removed. */ readonly routePointsWritten: number;} | { /** * The store accepted the workout but cannot confirm it while the device is locked. * **Do not re-save blindly.** Call `saveWorkout` again with the SAME `id` and `version` once * the device is unlocked; that call is idempotent and completes the route. */ readonly status: 'pendingUnlock'; readonly id: string; readonly route: 'deferred'; readonly routePointsWritten: 0;};This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.
Release context
Section titled “Release context”- Package:
@gj-kit/expo-workouts - Version:
0.1.1 - Public entry:
./core - Source: GitHub