In the process of developing a web application with Angular 4 and Typescript, I encountered an issue while attempting to retrieve the date of a file for upload. Specifically, when trying to access the lastModified property of a File object, Typescript returned an error:
Property 'lastModified' does not exist on type 'File'.
Upon inspecting the definition, I noticed that it only includes the lastModifiedDate property instead. While this property is marked as deprecated according to https://developer.mozilla.org/en-US/docs/Web/API/File/lastModifiedDate, I found that it functions correctly in Chrome but encounters issues in Safari.
My primary question at this point is: How can I access the File's lastModified property using Typescript?