Sekrab Garage

The close-all-windows-and-restart trick

Add FileSystemAccess support to Angular

AngularTip August 20, 21
Subscribe to Sekrab Parts newsletter.

To start using the amazing File System Access API in Angular, or typescript project, you will be faced first, with unrecognized type error. Head to Typescript website and search for File System Access. The first result is the newest. @types/wicg-file-system-access.


npm install --save @types/wicg-file-system-access

That would make development time errors go away, but not compilation errors. To make Angular understand those types, I tried multiple ways, like adding the typeRoot to, then adding explicit types array with wicg-file-system-access. Something eventually worked. But then, I just restarted vscode. And that just did the trick! Sometimes, I could swear a genie lives in my computer.