Skip to content

Commit 06ac1f6

Browse files
authored
fix(core/cbor): set explicit return type to de-genericize alloc fn (#1676)
1 parent 33dc34a commit 06ac1f6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/swift-garlics-notice.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@smithy/core": patch
3+
---
4+
5+
set explicit return type for cbor alloc

packages/core/src/submodules/cbor/cbor-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const extendedFloat64 = 27; // 0b11011
6464

6565
export const minorIndefinite = 31; // 0b11111
6666

67-
export function alloc(size: number) {
67+
export function alloc(size: number): Uint8Array {
6868
return typeof Buffer !== "undefined" ? Buffer.alloc(size) : new Uint8Array(size);
6969
}
7070

0 commit comments

Comments
 (0)