Why does fs.writeFile not save file?

I see that DataAdapter is in the interface section. Why do you say it’s a class? I see that in the Vault class, there is an adapter property with the DataAdapter type:

Is it correct that in Typescript, interface is a collection of methods to work with properties?

An interface defines the contract of a class, so there is one class that implements DataAdapter for Windows, one for Mac and so on (because each OS implements file operations slightly differently, but we don’t need to care about that because the APi takes care of that).

I just said class because I messed up.

1 Like