提交 a571be2a 编写于 作者: M Matt Bierner

Fixing/supressing more implict index errors

#76442
上级 f7a36ce0
......@@ -212,7 +212,7 @@ export const win32: IPath = {
// absolute path, get cwd for that drive, or the process cwd if
// the drive cwd is not available. We're sure the device is not
// a UNC path at this points, because UNC paths are always absolute.
path = process.env['=' + resolvedDevice] || process.cwd();
path = (process.env as any)['=' + resolvedDevice] || process.cwd();
// Verify that a cwd was found and that it actually points
// to our drive. If not, default to the drive's root.
......
......@@ -395,7 +395,7 @@ export async function resolveTerminalEncoding(verbose?: boolean): Promise<string
exec('chcp', (err, stdout, stderr) => {
if (stdout) {
const windowsTerminalEncodingKeys = Object.keys(windowsTerminalEncodings);
const windowsTerminalEncodingKeys = Object.keys(windowsTerminalEncodings) as Array<keyof typeof windowsTerminalEncodings>;
for (const key of windowsTerminalEncodingKeys) {
if (stdout.indexOf(key) >= 0) {
return resolve(windowsTerminalEncodings[key]);
......
......@@ -59,8 +59,8 @@ suite('Gridview', function () {
];
gridview.addView(views[0] as IView, 200, [0]);
gridview.addView(views[1][0] as IView, 200, [1]);
gridview.addView(views[1][1] as IView, 200, [1, 1]);
gridview.addView((views[1] as TestView[])[0] as IView, 200, [1]);
gridview.addView((views[1] as TestView[])[1] as IView, 200, [1, 1]);
assert.deepEqual(nodesToArrays(gridview.getViews()), views);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册