Skip to content

Commit b7afe21

Browse files
committed
chore(types): update BodyLengthCalculator to return number
1 parent 813ff8a commit b7afe21

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/middleware-flexible-checksums/src/configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface PreviouslyResolved {
1010
/**
1111
* A function that can calculate the length of a body.
1212
*/
13-
bodyLengthChecker: (body: any) => number | undefined;
13+
bodyLengthChecker: (body: any) => number;
1414

1515
/**
1616
* A function that returns Readable Stream which follows aws-chunked encoding stream.

packages/types/src/stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Encoder } from "./util";
33

44
export interface GetAwsChunkedEncodingStreamOptions {
55
base64Encoder?: Encoder;
6-
bodyLengthChecker: (body: any) => number | undefined;
6+
bodyLengthChecker: (body: any) => number;
77
checksumAlgorithmFn?: HashConstructor;
88
checksumLocationName?: string;
99
streamHasher?: StreamHasher;

packages/types/src/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export interface Provider<T> {
5151
* the size of the file.
5252
*/
5353
export interface BodyLengthCalculator {
54-
(body: any): number | undefined;
54+
(body: any): number;
5555
}
5656

5757
/**

0 commit comments

Comments
 (0)