Skip to content

Commit 82f9275

Browse files
committed
fix(mapper): ts errors
1 parent 5e71f1c commit 82f9275

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/mapper/for-type/collection.mapper.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ function collectionFromDb(
3131
// if [L]ist
3232
if ('L' in attributeValue) {
3333
if (hasGenericType(propertyMetadata)) {
34-
arr = (<ListAttribute>attributeValue).L.map(item => fromDb((<MapAttribute>item).M, propertyMetadata.typeInfo.genericType))
34+
arr = attributeValue.L.map(item => fromDb((<MapAttribute>item).M, propertyMetadata.typeInfo.genericType))
3535
} else {
3636
// tslint:disable-next-line:no-unnecessary-callback-wrapper
37-
arr = (<ListAttribute>attributeValue).L.map(v => fromDbOne(v))
37+
arr = attributeValue.L.map(v => fromDbOne(v))
3838
}
3939
return explicitType && explicitType === Set ? new Set(arr) : arr
4040
}
4141

4242
// if [(N|S|B)S]et
4343
if ('SS' in attributeValue) {
44-
arr = (<StringSetAttribute>attributeValue).SS
44+
arr = attributeValue.SS
4545
} else if ('NS' in attributeValue) {
46-
arr = (<NumberSetAttribute>attributeValue).NS.map(parseFloat)
46+
arr = attributeValue.NS.map(parseFloat)
4747
} else if ('BS' in attributeValue) {
48-
arr = (<BinarySetAttribute>attributeValue).BS
48+
arr = attributeValue.BS
4949
} else {
5050
throw new Error('No Collection Data (SS | NS | BS | L) was found in attribute data')
5151
}

src/mapper/mapper.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,6 @@ describe('Mapper', () => {
800800
}
801801

802802
const toDbValue = toDb(model, ModelWithEmptyValues)
803-
console.log(toDbValue)
804803

805804
// expect(Object.keys(toDbValue).length).toBe(4)
806805

0 commit comments

Comments
 (0)