Skip to content

Commit b686046

Browse files
committed
refactor
1 parent 8a15343 commit b686046

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2401,5 +2401,5 @@ import IInstanceConfig = instanceAdmin.spanner.admin.instance.v1.IInstanceConfig
24012401
import {RunTransactionOptions} from './transaction-runner';
24022402
export {v1, protos};
24032403
export default {Spanner};
2404-
export {UUID, Float32, Float, Int, Struct, Numeric, PGNumeric, SpannerDate, Interval};
2404+
export {Float32, Float, Int, Struct, Numeric, PGNumeric, SpannerDate, Interval};
24052405
export {ObservabilityOptions};

src/transaction.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,14 +1729,12 @@ export class Snapshot extends EventEmitter {
17291729
Object.keys(typeMap).forEach(param => {
17301730
const type = typeMap[param];
17311731
const typeObject = codec.createTypeObject(type);
1732-
if (type.child) {
1733-
if (
1732+
if (
1733+
(type.child &&
17341734
typeObject.code === 'ARRAY' &&
1735-
typeObject.arrayElementType?.code !== 'TYPE_CODE_UNSPECIFIED'
1736-
) {
1737-
paramTypes[param] = codec.createTypeObject(type);
1738-
}
1739-
} else if (typeObject.code !== 'TYPE_CODE_UNSPECIFIED') {
1735+
typeObject.arrayElementType?.code !== 'TYPE_CODE_UNSPECIFIED') ||
1736+
(!type.child && typeObject.code !== 'TYPE_CODE_UNSPECIFIED')
1737+
) {
17401738
paramTypes[param] = codec.createTypeObject(type);
17411739
}
17421740
});

0 commit comments

Comments
 (0)