@@ -72,7 +72,7 @@ function createBackupFilename(filename: string): string {
7272 */
7373export function createTauriFileSystemAdapter < T extends { id : ID } & Record < string , any > , ID = string > (
7474 filename : string ,
75- options ?: AdapterOptions
75+ options ?: AdapterOptions < T >
7676) : PersistenceAdapter < T , ID > {
7777 // Validate filename for security
7878 validateFilename ( filename ) ;
@@ -118,7 +118,7 @@ export function createTauriFileSystemAdapter<T extends { id: ID } & Record<strin
118118
119119 try {
120120 if ( options ?. encrypt ) {
121- initial_data = await options . encrypt < T [ ] > ( [ ] ) ;
121+ initial_data = await options . encrypt ( [ ] ) ;
122122 } else {
123123 initial_data = JSON . stringify ( [ ] ) ;
124124 }
@@ -160,7 +160,7 @@ export function createTauriFileSystemAdapter<T extends { id: ID } & Record<strin
160160
161161 if ( options ?. decrypt ) {
162162 try {
163- decrypted_data = await options . decrypt < T [ ] > ( text_content ) ;
163+ decrypted_data = await options . decrypt ( text_content ) ;
164164
165165 // Validate decrypted data structure if validation is enabled
166166 if ( security . validateDecryptedData ) {
@@ -298,7 +298,7 @@ export function createTauriFileSystemAdapter<T extends { id: ID } & Record<strin
298298
299299 if ( options ?. encrypt ) {
300300 try {
301- data_to_save = await options . encrypt < T [ ] > ( updated_items ) ;
301+ data_to_save = await options . encrypt ( updated_items ) ;
302302 } catch ( error ) {
303303 throw new Error ( `Failed to encrypt data for ${ filename } ` , { cause : error } ) ;
304304 }
0 commit comments