Skip to content

API: allow custom getFileSystemEntries in DirectoryStructureHost.readDirectory #20878

Closed
@ajafff

Description

@ajafff

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIRelates to the public API for TypeScriptDeclinedThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions