Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #13 from austincunningham/RAINCATCH-912
Browse files Browse the repository at this point in the history
Update the TypeScript type definitions
  • Loading branch information
wtrocki authored Jun 9, 2017
2 parents 09edc3c + 4648c1e commit efecce1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions fh-sync-js.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ declare module SyncClient {
*
* @param {Function} callback
*/
function notify(callback: NotifyCallback);

function notify(dataset_id:string, callback:NotifyCallback);
/**
* Put a dataset under the management of the sync service.
*
Expand Down Expand Up @@ -182,7 +181,7 @@ declare module SyncClient {
* @param {Function} success
* @param {Function} failure
*/
function startSync(datasetId: string, success: () => void, failure: Function);
function startSync(datasetId: string, success: () => void, failure?: (obj: any) => void);

/**
* Stop the sync loop for a dataset.
Expand All @@ -191,7 +190,7 @@ declare module SyncClient {
* @param {Function} [success]
* @param {Function} [failure]
*/
function stopSync(datasetId: string, success?: () => void, failure?: (err: string, datasetId: string) => void);
function stopSync(datasetId: string, success?: () => void, failure?: (obj: any) => void);

/**
* Run the sync loop almost immediately (within next 500 ms) if `sync_active` is true.
Expand All @@ -218,7 +217,7 @@ declare module SyncClient {
* @param {Function} success
* @param {Function} failure
*/
function listCollisions(datasetId: string, success: (res: any) => void, failure: (msg: string, err: any) => void);
function listCollisions(datasetId: string, success: (res: any) => void, failure?: (msg: string, err: any) => void);

/**
* Remove a collision in sync
Expand Down Expand Up @@ -315,7 +314,7 @@ declare module SyncClient {
/**
* Sets default cloud call handler for sync. Required to make any sync requests to the cloud
*/
function setCloudHandler(handler: (params: any, success: function, failure: function) );
function setCloudHandler(handler: (params: any, success: Function, failure: Function) => 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": "fh-sync-js",
"version": "1.0.0-pre4",
"version": "1.0.0",
"description": "Javascript client for fh-sync offline synchronization library",
"main": "src/index.js",
"types": "./fh-js-sdk.d.ts",
Expand Down

0 comments on commit efecce1

Please sign in to comment.