@@ -40,15 +40,11 @@ import {
40
40
Bytes as BytesExp
41
41
} from '../../exp/index' ;
42
42
import { UntypedFirestoreDataConverter } from '../../src/api/user_data_reader' ;
43
- import {
44
- isPlainObject ,
45
- validateSetOptions
46
- } from '../../src/util/input_validation' ;
43
+ import { isPlainObject } from '../../src/util/input_validation' ;
47
44
import { Compat } from '../../src/compat/compat' ;
48
45
import {
49
46
Firestore ,
50
47
DocumentReference ,
51
- DocumentSnapshot ,
52
48
QuerySnapshot ,
53
49
wrapObserver ,
54
50
extractSnapshotOptions
@@ -62,72 +58,6 @@ export { GeoPoint, Timestamp } from '../index';
62
58
// of the experimental SDK. This shim is used to run integration tests against
63
59
// both SDK versions.
64
60
65
- export class Transaction
66
- extends Compat < exp . Transaction >
67
- implements legacy . Transaction {
68
- constructor (
69
- private readonly _firestore : Firestore ,
70
- delegate : exp . Transaction
71
- ) {
72
- super ( delegate ) ;
73
- }
74
-
75
- get < T > ( documentRef : DocumentReference < T > ) : Promise < DocumentSnapshot < T > > {
76
- return this . _delegate
77
- . get ( documentRef . _delegate )
78
- . then ( result => new DocumentSnapshot ( this . _firestore , result ) ) ;
79
- }
80
-
81
- set < T > (
82
- documentRef : DocumentReference < T > ,
83
- data : T ,
84
- options ?: legacy . SetOptions
85
- ) : Transaction {
86
- if ( options ) {
87
- validateSetOptions ( 'Transaction.set' , options ) ;
88
- this . _delegate . set ( documentRef . _delegate , unwrap ( data ) , options ) ;
89
- } else {
90
- this . _delegate . set ( documentRef . _delegate , unwrap ( data ) ) ;
91
- }
92
- return this ;
93
- }
94
-
95
- update (
96
- documentRef : DocumentReference < any > ,
97
- data : legacy . UpdateData
98
- ) : Transaction ;
99
- update (
100
- documentRef : DocumentReference < any > ,
101
- field : string | FieldPath ,
102
- value : any ,
103
- ...moreFieldsAndValues : any [ ]
104
- ) : Transaction ;
105
- update (
106
- documentRef : DocumentReference < any > ,
107
- dataOrField : any ,
108
- value ?: any ,
109
- ...moreFieldsAndValues : any [ ]
110
- ) : Transaction {
111
- if ( arguments . length === 2 ) {
112
- this . _delegate . update ( documentRef . _delegate , unwrap ( dataOrField ) ) ;
113
- } else {
114
- this . _delegate . update (
115
- documentRef . _delegate ,
116
- unwrap ( dataOrField ) ,
117
- unwrap ( value ) ,
118
- ...unwrap ( moreFieldsAndValues )
119
- ) ;
120
- }
121
-
122
- return this ;
123
- }
124
-
125
- delete ( documentRef : DocumentReference < any > ) : Transaction {
126
- this . _delegate . delete ( documentRef . _delegate ) ;
127
- return this ;
128
- }
129
- }
130
-
131
61
export class Query < T = legacy . DocumentData >
132
62
extends Compat < exp . Query < T > >
133
63
implements legacy . Query < T > {
0 commit comments