documents - expose encoding as proposed API (part of #824) (#240790)

This commit is contained in:
Benjamin Pasero
2025-02-14 15:31:51 +01:00
committed by GitHub
parent 134b01a8eb
commit a870e67290
26 changed files with 159 additions and 24 deletions

View File

@@ -16,7 +16,7 @@ export function rndName() {
export const testFs = new TestFS('fake-fs', true);
vscode.workspace.registerFileSystemProvider(testFs.scheme, testFs, { isCaseSensitive: testFs.isCaseSensitive });
export async function createRandomFile(contents = '', dir: vscode.Uri | undefined = undefined, ext = ''): Promise<vscode.Uri> {
export async function createRandomFile(contents: string | Uint8Array = '', dir: vscode.Uri | undefined = undefined, ext = ''): Promise<vscode.Uri> {
let fakeFile: vscode.Uri;
if (dir) {
assert.strictEqual(dir.scheme, testFs.scheme);