Closed
Description
I want to write a custom ParseConfigHost
that uses a custom file system.
To implement ParseConfigHost.readDirectory
I need to duplicate the whole logic of ts.matchFiles
(in core.ts). Alternatively I can use ts.matchFiles
directly although it is not exposed through the type declarations.
I propose to add an optional parameter getFileSystemEntries
to ts.sys.readDirectory
that is then passed to ts.matchFiles
and falls back to getAccessibleFileSystemEntries
if not provided.
That means the declaration of DirectoryStructureHost.readDirectory
needs to be changed, too.
Alternatively you could just expose ts.matchFiles
.