Updating @types/node

Needs some minor code changes too to support the new typings
This commit is contained in:
Matt Bierner
2025-03-24 13:02:28 -07:00
parent 0dcae01c07
commit 8225b496b1
27 changed files with 160 additions and 130 deletions

View File

@@ -24,7 +24,7 @@ export async function createRandomFile(contents: string | Uint8Array = '', dir:
} else {
fakeFile = vscode.Uri.parse(`${testFs.scheme}:/${rndName() + ext}`);
}
testFs.writeFile(fakeFile, Buffer.from(contents), { create: true, overwrite: true });
testFs.writeFile(fakeFile, typeof contents === 'string' ? Buffer.from(contents) : Buffer.from(contents), { create: true, overwrite: true });
return fakeFile;
}