File tree 2 files changed +1452
-3
lines changed
2 files changed +1452
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export class EncryptionTransformer implements ValueTransformer {
59
59
export class JSONEncryptionTransformer implements ValueTransformer {
60
60
constructor ( private options : EncryptionOptions ) { }
61
61
62
- public from ( value ?: string | null | object ) : string | undefined {
62
+ public from ( value ?: string | null | object ) : Object | undefined {
63
63
if ( ! value ) {
64
64
return ;
65
65
}
@@ -72,12 +72,12 @@ export class JSONEncryptionTransformer implements ValueTransformer {
72
72
return JSON . parse ( decrypted ) ;
73
73
}
74
74
75
- public to ( value ?: string | FindOperator < any > | null ) : string | FindOperator < any > | undefined {
75
+ public to ( value ?: any | FindOperator < any > | null ) : string | FindOperator < any > | undefined {
76
76
if ( ( value ?? null ) === null ) {
77
77
return ;
78
78
}
79
79
80
- if ( typeof value === 'object' && ! value . type ) {
80
+ if ( typeof value === 'object' && ! value ? .type ) {
81
81
return encryptData (
82
82
Buffer . from ( JSON . stringify ( value ) as string , 'utf8' ) ,
83
83
this . options
You can’t perform that action at this time.
0 commit comments