Skip to content

missing deleteFile function in VirtualTypeScriptEnvironment #2799

Description

@flurrux

the VirtualTypeScriptEnvironment interface has two file-related functions createFile and updateFile, but seemingly no deleteFile.

createFile: (fileName: string, content: string) => void
updateFile: (fileName: string, content: string, replaceTextSpan?: import("typescript").TextSpan) => void

is this intended?
i've tried using the VirtualTypeScriptEnvironment.sys.deleteFile function, but it is undefined.

my current workaround is to set the file contents to a single-space string (completely empty strings currently throw errors as reported here: #2713).
it's not too big an issue for me right now since my virtual files are not directly visible and their names are auto-incremented, but i figured this would be worth posting here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions