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

Commit

Permalink
Update the TypeScript type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
austincunningham committed Jun 9, 2017
1 parent 09edc3c commit ee79841
Showing 1 changed file with 5 additions and 6 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

0 comments on commit ee79841

Please sign in to comment.