1{"name":"expo-task-manager","kind":1,"kindString":"Project","originalName":"","children":[{"name":"TaskManagerError","kind":256,"kindString":"Interface","comment":{"shortText":"Error object that can be received through [`TaskManagerTaskBody`](#taskmanagertaskbody) when the\ntask fails."},"children":[{"name":"code","kind":1024,"kindString":"Property","type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"}]}},{"name":"message","kind":1024,"kindString":"Property","type":{"type":"intrinsic","name":"string"}}]},{"name":"TaskManagerTask","kind":256,"kindString":"Interface","comment":{"shortText":"Represents an already registered task."},"children":[{"name":"options","kind":1024,"kindString":"Property","comment":{"shortText":"Provides `options` that the task was registered with."},"type":{"type":"intrinsic","name":"any"}},{"name":"taskName","kind":1024,"kindString":"Property","comment":{"shortText":"Name that the task is registered with."},"type":{"type":"intrinsic","name":"string"}},{"name":"taskType","kind":1024,"kindString":"Property","comment":{"shortText":"Type of the task which depends on how the task was registered."},"type":{"type":"intrinsic","name":"string"}}]},{"name":"TaskManagerTaskBody","kind":256,"kindString":"Interface","comment":{"shortText":"Represents the object that is passed to the task executor."},"children":[{"name":"data","kind":1024,"kindString":"Property","comment":{"shortText":"An object of data passed to the task executor. Its properties depends on the type of the task."},"type":{"type":"reference","name":"T"}},{"name":"error","kind":1024,"kindString":"Property","comment":{"shortText":"Error object if the task failed or `null` otherwise."},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","name":"TaskManagerError"}]}},{"name":"executionInfo","kind":1024,"kindString":"Property","comment":{"shortText":"Additional details containing unique ID of task event and name of the task."},"type":{"type":"reference","name":"TaskManagerTaskBodyExecutionInfo"}}],"typeParameter":[{"name":"T","kind":131072,"kindString":"Type parameter","default":{"type":"intrinsic","name":"object"}}]},{"name":"TaskManagerTaskBodyExecutionInfo","kind":256,"kindString":"Interface","comment":{"shortText":"Additional details about execution provided in `TaskManagerTaskBody`."},"children":[{"name":"appState","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"shortText":"State of the application.","tags":[{"tag":"platform","text":"ios\n"}]},"type":{"type":"union","types":[{"type":"literal","value":"active"},{"type":"literal","value":"background"},{"type":"literal","value":"inactive"}]}},{"name":"eventId","kind":1024,"kindString":"Property","comment":{"shortText":"Unique ID of task event."},"type":{"type":"intrinsic","name":"string"}},{"name":"taskName","kind":1024,"kindString":"Property","comment":{"shortText":"Name of the task."},"type":{"type":"intrinsic","name":"string"}}]},{"name":"TaskManagerTaskExecutor","kind":4194304,"kindString":"Type alias","type":{"type":"reflection","declaration":{"name":"__type","kind":65536,"kindString":"Type literal","signatures":[{"name":"__type","kind":4096,"kindString":"Call signature","comment":{"shortText":"Type of task executor – a function that handles the task."},"parameters":[{"name":"body","kind":32768,"kindString":"Parameter","type":{"type":"reference","name":"TaskManagerTaskBody"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"name":"defineTask","kind":64,"kindString":"Function","signatures":[{"name":"defineTask","kind":4096,"kindString":"Call signature","comment":{"shortText":"Defines task function. It must be called in the global scope of your JavaScript bundle.\nIn particular, it cannot be called in any of React lifecycle methods like `componentDidMount`.\nThis limitation is due to the fact that when the application is launched in the background,\nwe need to spin up your JavaScript app, run your task and then shut down — no views are mounted\nin this scenario."},"parameters":[{"name":"taskName","kind":32768,"kindString":"Parameter","comment":{"shortText":"Name of the task. It must be the same as the name you provided when registering the task."},"type":{"type":"intrinsic","name":"string"}},{"name":"taskExecutor","kind":32768,"kindString":"Parameter","comment":{"shortText":"A function that will be invoked when the task with given `taskName` is executed.\n"},"type":{"type":"reference","name":"TaskManagerTaskExecutor"}}],"type":{"type":"intrinsic","name":"void"}}]},{"name":"getRegisteredTasksAsync","kind":64,"kindString":"Function","signatures":[{"name":"getRegisteredTasksAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"Provides information about tasks registered in the app.","returns":"A promise which fulfills with an array of tasks registered in the app. Example:\n```json\n[\n  {\n    taskName: 'location-updates-task-name',\n    taskType: 'location',\n    options: {\n      accuracy: Location.Accuracy.High,\n      showsBackgroundLocationIndicator: false,\n    },\n  },\n  {\n    taskName: 'geofencing-task-name',\n    taskType: 'geofencing',\n    options: {\n      regions: [...],\n    },\n  },\n]\n```\n"},"type":{"type":"reference","typeArguments":[{"type":"array","elementType":{"type":"reference","name":"TaskManagerTask"}}],"qualifiedName":"Promise","package":"typescript","name":"Promise"}}]},{"name":"getTaskOptionsAsync","kind":64,"kindString":"Function","signatures":[{"name":"getTaskOptionsAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"Retrieves `options` associated with the task, that were passed to the function registering the task\n(eg. `Location.startLocationUpdatesAsync`).","returns":"A promise which fulfills with the `options` object that was passed while registering task\nwith given name or `null` if task couldn't be found.\n"},"typeParameter":[{"name":"TaskOptions","kind":131072,"kindString":"Type parameter"}],"parameters":[{"name":"taskName","kind":32768,"kindString":"Parameter","comment":{"shortText":"Name of the task."},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","name":"TaskOptions"}],"qualifiedName":"Promise","package":"typescript","name":"Promise"}}]},{"name":"isAvailableAsync","kind":64,"kindString":"Function","signatures":[{"name":"isAvailableAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"Determine if the `TaskManager` API can be used in this app.","returns":"A promise fulfills with `true` if the API can be used, and `false` otherwise.\nOn the web it always returns `false`.\n"},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"qualifiedName":"Promise","package":"typescript","name":"Promise"}}]},{"name":"isTaskDefined","kind":64,"kindString":"Function","signatures":[{"name":"isTaskDefined","kind":4096,"kindString":"Call signature","comment":{"shortText":"Checks whether the task is already defined."},"parameters":[{"name":"taskName","kind":32768,"kindString":"Parameter","comment":{"shortText":"Name of the task.\n"},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"intrinsic","name":"boolean"}}]},{"name":"isTaskRegisteredAsync","kind":64,"kindString":"Function","signatures":[{"name":"isTaskRegisteredAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"Determine whether the task is registered. Registered tasks are stored in a persistent storage and\npreserved between sessions.","returns":"A promise which fulfills with a `boolean` value whether or not the task with given name\nis already registered.\n"},"parameters":[{"name":"taskName","kind":32768,"kindString":"Parameter","comment":{"shortText":"Name of the task."},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"qualifiedName":"Promise","package":"typescript","name":"Promise"}}]},{"name":"unregisterAllTasksAsync","kind":64,"kindString":"Function","signatures":[{"name":"unregisterAllTasksAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"Unregisters all tasks registered for the running app. You may want to call this when the user is\nsigning out and you no longer need to track his location or run any other background tasks.","returns":"A promise which fulfills as soon as all tasks are completely unregistered.\n"},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"qualifiedName":"Promise","package":"typescript","name":"Promise"}}]},{"name":"unregisterTaskAsync","kind":64,"kindString":"Function","signatures":[{"name":"unregisterTaskAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"Unregisters task from the app, so the app will not be receiving updates for that task anymore.\n_It is recommended to use methods specialized by modules that registered the task, eg.\n[`Location.stopLocationUpdatesAsync`](./location/#expolocationstoplocationupdatesasynctaskname)._","returns":"A promise which fulfills as soon as the task is unregistered.\n"},"parameters":[{"name":"taskName","kind":32768,"kindString":"Parameter","comment":{"shortText":"Name of the task to unregister."},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"qualifiedName":"Promise","package":"typescript","name":"Promise"}}]}]}