Skip to content

Commit

Permalink
chore(release): 2.3.0 [skip ci]
Browse files Browse the repository at this point in the history
# [2.3.0](v2.2.0...v2.3.0) (2020-09-02)

### Features

* **Android:** Add updateNotification() method ([#37](#37)) ([7582ed7](7582ed7))
  • Loading branch information
semantic-release-bot committed Sep 2, 2020
1 parent 7582ed7 commit b94d711
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [2.3.0](https://github.com/Rapsssito/react-native-background-actions/compare/v2.2.0...v2.3.0) (2020-09-02)


### Features

* **Android:** Add updateNotification() method ([#37](https://github.com/Rapsssito/react-native-background-actions/issues/37)) ([7582ed7](https://github.com/Rapsssito/react-native-background-actions/commit/7582ed7141c9d65b08038cbe5f7946413027b8b9))

# [2.2.0](https://github.com/Rapsssito/react-native-background-actions/compare/v2.1.0...v2.2.0) (2020-02-24)


Expand Down
40 changes: 33 additions & 7 deletions lib/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,46 @@ export type BackgroundTaskOptions = {
package?: string | undefined;
};
color?: string | undefined;
parameters?: any;
};
declare const backgroundServer: BackgroundServer;
/**
* @typedef {{taskName: string,
* taskTitle: string,
* taskDesc: string,
* taskIcon: {name: string, type: string, package?: string},
* color?: string,
* parameters?: any}} BackgroundTaskOptions
* color?: string}} BackgroundTaskOptions
*/
declare class BackgroundServer {
_runnedTasks: number;
_stopTask: () => void;
_isRunning: boolean;
/** @private */
private _runnedTasks;
/** @private */
private _stopTask;
/** @private */
private _isRunning;
/** @private @type {BackgroundTaskOptions} */
private _currentOptions;
/**
* **ANDROID ONLY**
*
* Updates the task notification.
*
* *On iOS this method will return immediately*
*
* @param {{taskTitle?: string,
* taskDesc?: string,
* taskIcon?: {name: string, type: string, package?: string},
* color?: string}} taskData
*/
async updateNotification(taskData: {
taskTitle?: string | undefined;
taskDesc?: string | undefined;
taskIcon?: {
name: string;
type: string;
package?: string | undefined;
} | undefined;
color?: string | undefined;
}): Promise<void>;
/**
* Returns if the current background task is running.
*
Expand All @@ -34,7 +59,7 @@ declare class BackgroundServer {
isRunning(): boolean;
/**
* @param {(taskData: any) => Promise<void>} task
* @param {BackgroundTaskOptions} options
* @param {BackgroundTaskOptions & {parameters?: any}} options
* @returns {Promise<void>}
*/
async start(task: (taskData: any) => Promise<void>, options: {
Expand All @@ -47,6 +72,7 @@ declare class BackgroundServer {
package?: string | undefined;
};
color?: string | undefined;
} & {
parameters?: any;
}): Promise<void>;
/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-background-actions",
"version": "2.2.0",
"version": "2.3.0",
"description": "React Native background service library for running background tasks forever in Android & iOS",
"keywords": [
"react-native",
Expand Down

0 comments on commit b94d711

Please sign in to comment.