File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/util-dynamodb/src Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ describe("convertToAttr", () => {
6363
6464 expect ( ( ) => {
6565 convertToAttr ( num , { convertClassInstanceToMap } ) ;
66- } ) . toThrowError ( `${ errorPrefix } Use BigInt .` ) ;
66+ } ) . toThrowError ( `${ errorPrefix } Use NumberValue, which is introduced from @aws-sdk/lib-dynamodb .` ) ;
6767
6868 const BigIntConstructor = BigInt ;
6969 ( BigInt as any ) = undefined ;
@@ -81,7 +81,7 @@ describe("convertToAttr", () => {
8181
8282 expect ( ( ) => {
8383 convertToAttr ( num , { convertClassInstanceToMap } ) ;
84- } ) . toThrowError ( `${ errorPrefix } Use BigInt .` ) ;
84+ } ) . toThrowError ( `${ errorPrefix } Use NumberValue, which is introduced from @aws-sdk/lib-dynamodb .` ) ;
8585
8686 const BigIntConstructor = BigInt ;
8787 ( BigInt as any ) = undefined ;
Original file line number Diff line number Diff line change @@ -156,8 +156,8 @@ const convertToBinaryAttr = (data: NativeAttributeBinary): { B: NativeAttributeB
156156const convertToStringAttr = ( data : string | String ) : { S : string } => ( { S : data . toString ( ) } ) ;
157157const convertToBigIntAttr = ( data : bigint ) : { N : string } => ( { N : data . toString ( ) } ) ;
158158
159- const validateBigIntAndThrow = ( errorPrefix : string ) => {
160- throw new Error ( `${ errorPrefix } ${ typeof BigInt === "function" ? "Use BigInt ." : "Pass string value instead." } ` ) ;
159+ const validateBigIntAndThrow = ( errorPrefix : string ) => {
160+ throw new Error ( `${ errorPrefix } ${ typeof BigInt === "function" ? "Use NumberValue, which is introduced from @aws-sdk/lib-dynamodb ." : "Pass string value instead." } ` ) ;
161161} ;
162162
163163const convertToNumberAttr = ( num : number | Number ) : { N : string } => {
You can’t perform that action at this time.
0 commit comments