@@ -509,8 +509,6 @@ class Datastore extends DatastoreRequest {
509509 this . auth = new GoogleAuth ( this . options ) ;
510510 }
511511
512- export ( config : ExportEntitiesConfig ) : Promise < LongRunningResponse > ;
513- export ( config : ExportEntitiesConfig , callback : LongRunningCallback ) : void ;
514512 /**
515513 * Export entities from this project to a Google Cloud Storage bucket.
516514 *
@@ -527,6 +525,8 @@ class Datastore extends DatastoreRequest {
527525 * @param {Operation } callback.operation An operation object that can be used
528526 * to check the status of the request.
529527 */
528+ export ( config : ExportEntitiesConfig ) : Promise < LongRunningResponse > ;
529+ export ( config : ExportEntitiesConfig , callback : LongRunningCallback ) : void ;
530530 export (
531531 config : ExportEntitiesConfig ,
532532 callback ?: LongRunningCallback
@@ -581,9 +581,6 @@ class Datastore extends DatastoreRequest {
581581 ) ;
582582 }
583583
584- getIndexes ( options ?: GetIndexesOptions ) : Promise < GetIndexesResponse > ;
585- getIndexes ( options : GetIndexesOptions , callback : GetIndexesCallback ) : void ;
586- getIndexes ( callback : GetIndexesCallback ) : void ;
587584 /**
588585 * Get all of the indexes in this project.
589586 *
@@ -597,6 +594,9 @@ class Datastore extends DatastoreRequest {
597594 * @param {object } callback.apiResponse The full API response.
598595 * @return {void | Promise<GetIndexesResponse> }
599596 */
597+ getIndexes ( options ?: GetIndexesOptions ) : Promise < GetIndexesResponse > ;
598+ getIndexes ( options : GetIndexesOptions , callback : GetIndexesCallback ) : void ;
599+ getIndexes ( callback : GetIndexesCallback ) : void ;
600600 getIndexes (
601601 optionsOrCallback ?: GetIndexesOptions | GetIndexesCallback ,
602602 cb ?: GetIndexesCallback
@@ -687,8 +687,6 @@ class Datastore extends DatastoreRequest {
687687 return this . auth . getProjectId ( ) ;
688688 }
689689
690- import ( config : ImportEntitiesConfig ) : Promise < LongRunningResponse > ;
691- import ( config : ImportEntitiesConfig , callback : LongRunningCallback ) : void ;
692690 /**
693691 * Import entities into this project from a remote file.
694692 *
@@ -705,6 +703,8 @@ class Datastore extends DatastoreRequest {
705703 * @param {Operation } callback.operation An operation object that can be used
706704 * to check the status of the request.
707705 */
706+ import ( config : ImportEntitiesConfig ) : Promise < LongRunningResponse > ;
707+ import ( config : ImportEntitiesConfig , callback : LongRunningCallback ) : void ;
708708 import (
709709 config : ImportEntitiesConfig ,
710710 callback ?: LongRunningCallback
@@ -769,8 +769,6 @@ class Datastore extends DatastoreRequest {
769769 return new Index ( this , id ) ;
770770 }
771771
772- insert ( entities : Entities ) : Promise < InsertResponse > ;
773- insert ( entities : Entities , callback : InsertCallback ) : void ;
774772 /**
775773 * Maps to {@link Datastore#save}, forcing the method to be `insert`.
776774 *
@@ -785,6 +783,8 @@ class Datastore extends DatastoreRequest {
785783 * @param {?error } callback.err An error returned while making this request
786784 * @param {object } callback.apiResponse The full API response.
787785 */
786+ insert ( entities : Entities ) : Promise < InsertResponse > ;
787+ insert ( entities : Entities , callback : InsertCallback ) : void ;
788788 insert (
789789 entities : Entities ,
790790 callback ?: InsertCallback
@@ -799,13 +799,6 @@ class Datastore extends DatastoreRequest {
799799 this . save ( entities , callback ! ) ;
800800 }
801801
802- save ( entities : Entities , gaxOptions ?: CallOptions ) : Promise < SaveResponse > ;
803- save (
804- entities : Entities ,
805- gaxOptions : CallOptions ,
806- callback : SaveCallback
807- ) : void ;
808- save ( entities : Entities , callback : SaveCallback ) : void ;
809802 /**
810803 * Insert or update the specified object(s). If a key is incomplete, its
811804 * associated object is inserted and the original Key object is updated to
@@ -1041,6 +1034,13 @@ class Datastore extends DatastoreRequest {
10411034 * });
10421035 * ```
10431036 */
1037+ save ( entities : Entities , gaxOptions ?: CallOptions ) : Promise < SaveResponse > ;
1038+ save (
1039+ entities : Entities ,
1040+ gaxOptions : CallOptions ,
1041+ callback : SaveCallback
1042+ ) : void ;
1043+ save ( entities : Entities , callback : SaveCallback ) : void ;
10441044 save (
10451045 entities : Entities ,
10461046 gaxOptionsOrCallback ?: CallOptions | SaveCallback ,
@@ -1178,8 +1178,6 @@ class Datastore extends DatastoreRequest {
11781178 ) ;
11791179 }
11801180
1181- update ( entities : Entities ) : Promise < UpdateResponse > ;
1182- update ( entities : Entities , callback : UpdateCallback ) : void ;
11831181 /**
11841182 * Maps to {@link Datastore#save}, forcing the method to be `update`.
11851183 *
@@ -1194,6 +1192,8 @@ class Datastore extends DatastoreRequest {
11941192 * @param {?error } callback.err An error returned while making this request
11951193 * @param {object } callback.apiResponse The full API response.
11961194 */
1195+ update ( entities : Entities ) : Promise < UpdateResponse > ;
1196+ update ( entities : Entities , callback : UpdateCallback ) : void ;
11971197 update (
11981198 entities : Entities ,
11991199 callback ?: UpdateCallback
@@ -1208,8 +1208,6 @@ class Datastore extends DatastoreRequest {
12081208 this . save ( entities , callback ! ) ;
12091209 }
12101210
1211- upsert ( entities : Entities ) : Promise < UpsertResponse > ;
1212- upsert ( entities : Entities , callback : UpsertCallback ) : void ;
12131211 /**
12141212 * Maps to {@link Datastore#save}, forcing the method to be `upsert`.
12151213 *
@@ -1224,6 +1222,8 @@ class Datastore extends DatastoreRequest {
12241222 * @param {?error } callback.err An error returned while making this request
12251223 * @param {object } callback.apiResponse The full API response.
12261224 */
1225+ upsert ( entities : Entities ) : Promise < UpsertResponse > ;
1226+ upsert ( entities : Entities , callback : UpsertCallback ) : void ;
12271227 upsert (
12281228 entities : Entities ,
12291229 callback ?: UpsertCallback
@@ -1450,10 +1450,6 @@ class Datastore extends DatastoreRequest {
14501450 static NO_MORE_RESULTS = 'NO_MORE_RESULTS' ;
14511451 NO_MORE_RESULTS = Datastore . NO_MORE_RESULTS ;
14521452
1453- createQuery ( kind ?: string ) : Query ;
1454- createQuery ( kind ?: string [ ] ) : Query ;
1455- createQuery ( namespace : string , kind : string ) : Query ;
1456- createQuery ( namespace : string , kind : string [ ] ) : Query ;
14571453 /**
14581454 * Create a query for the specified kind. See {@link Query} for all
14591455 * of the available methods.
@@ -1472,6 +1468,10 @@ class Datastore extends DatastoreRequest {
14721468 * const query = datastore.createQuery('Company');
14731469 * ```
14741470 */
1471+ createQuery ( kind ?: string ) : Query ;
1472+ createQuery ( kind ?: string [ ] ) : Query ;
1473+ createQuery ( namespace : string , kind : string ) : Query ;
1474+ createQuery ( namespace : string , kind : string [ ] ) : Query ;
14751475 createQuery (
14761476 namespaceOrKind ?: string | string [ ] ,
14771477 kind ?: string | string [ ]
@@ -1484,9 +1484,6 @@ class Datastore extends DatastoreRequest {
14841484 return new Query ( this , namespace , arrify ( kind ) as string [ ] ) ;
14851485 }
14861486
1487- key ( options : entity . KeyOptions ) : entity . Key ;
1488- key ( path : PathType [ ] ) : entity . Key ;
1489- key ( path : string ) : entity . Key ;
14901487 /**
14911488 * Helper to create a Key object, scoped to the instance's namespace by
14921489 * default.
@@ -1567,6 +1564,9 @@ class Datastore extends DatastoreRequest {
15671564 * const key = datastore.key(['Company', 'Google', 'Employee']);
15681565 * ```
15691566 */
1567+ key ( options : entity . KeyOptions ) : entity . Key ;
1568+ key ( path : PathType [ ] ) : entity . Key ;
1569+ key ( path : string ) : entity . Key ;
15701570 key ( options : string | entity . KeyOptions | PathType [ ] ) : entity . Key {
15711571 const keyOptions = is . object ( options )
15721572 ? ( options as entity . KeyOptions )
@@ -1598,16 +1598,6 @@ class Datastore extends DatastoreRequest {
15981598 return Datastore . isKey ( value ) ;
15991599 }
16001600
1601- keyToLegacyUrlSafe ( key : entity . Key , locationPrefix ?: string ) : Promise < string > ;
1602- keyToLegacyUrlSafe (
1603- key : entity . Key ,
1604- callback : KeyToLegacyUrlSafeCallback
1605- ) : void ;
1606- keyToLegacyUrlSafe (
1607- key : entity . Key ,
1608- locationPrefix : string ,
1609- callback : KeyToLegacyUrlSafeCallback
1610- ) : void ;
16111601 /**
16121602 * Helper to create a URL safe key.
16131603 *
@@ -1660,6 +1650,16 @@ class Datastore extends DatastoreRequest {
16601650 * });
16611651 * ```
16621652 */
1653+ keyToLegacyUrlSafe ( key : entity . Key , locationPrefix ?: string ) : Promise < string > ;
1654+ keyToLegacyUrlSafe (
1655+ key : entity . Key ,
1656+ callback : KeyToLegacyUrlSafeCallback
1657+ ) : void ;
1658+ keyToLegacyUrlSafe (
1659+ key : entity . Key ,
1660+ locationPrefix : string ,
1661+ callback : KeyToLegacyUrlSafeCallback
1662+ ) : void ;
16631663 keyToLegacyUrlSafe (
16641664 key : entity . Key ,
16651665 locationPrefixOrCallback ?: string | KeyToLegacyUrlSafeCallback ,
0 commit comments