hupf opened a new issue, #563:
URL: https://github.com/apache/cordova-plugin-file/issues/563

   Hi! 👋 
         
   Firstly, thanks for your work on this project! 🙂
   
   Today I used [patch-package](https://github.com/ds300/patch-package) to 
patch `[email protected]` for the project I'm working on.
   
   Apparently the type definitions provided by this plugin don't work with 
newer TypeScript versions (I'm using 4.8). The result is a mismatch of the 
types with the TypeScript internal types, causing a `Subsequent property 
declarations must have the same type` error.
   
   Here is the diff that solved my problem by align the types to [TypeScript's 
ones](https://github.com/microsoft/TypeScript/blob/main/src/lib/dom.generated.d.ts#L5867):
   
   ```diff
   diff --git a/node_modules/cordova-plugin-file/types/index.d.ts 
b/node_modules/cordova-plugin-file/types/index.d.ts
   index 469d862..c8b1b86 100644
   --- a/node_modules/cordova-plugin-file/types/index.d.ts
   +++ b/node_modules/cordova-plugin-file/types/index.d.ts
   @@ -44,9 +44,9 @@ interface Window {
    /** This interface represents a file system. */
    interface FileSystem {
        /* The name of the file system, unique across the list of exposed file 
systems. */
   -    name: string;
   +    readonly name: string;
        /** The root directory of the file system. */
   -    root: DirectoryEntry;
   +    readonly root: FileSystemDirectoryEntry;
    }
    
    /**
   ```
   
   <em>This issue body was [partially generated by 
patch-package](https://github.com/ds300/patch-package/issues/296).</em>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to