Skip to content

Commit a571be2

Browse files
committed
Fixing/supressing more implict index errors
microsoft#76442
1 parent f7a36ce commit a571be2

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/vs/base/common/path.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export const win32: IPath = {
212212
// absolute path, get cwd for that drive, or the process cwd if
213213
// the drive cwd is not available. We're sure the device is not
214214
// a UNC path at this points, because UNC paths are always absolute.
215-
path = process.env['=' + resolvedDevice] || process.cwd();
215+
path = (process.env as any)['=' + resolvedDevice] || process.cwd();
216216

217217
// Verify that a cwd was found and that it actually points
218218
// to our drive. If not, default to the drive's root.

src/vs/base/node/encoding.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ export async function resolveTerminalEncoding(verbose?: boolean): Promise<string
395395

396396
exec('chcp', (err, stdout, stderr) => {
397397
if (stdout) {
398-
const windowsTerminalEncodingKeys = Object.keys(windowsTerminalEncodings);
398+
const windowsTerminalEncodingKeys = Object.keys(windowsTerminalEncodings) as Array<keyof typeof windowsTerminalEncodings>;
399399
for (const key of windowsTerminalEncodingKeys) {
400400
if (stdout.indexOf(key) >= 0) {
401401
return resolve(windowsTerminalEncodings[key]);

src/vs/base/test/browser/ui/grid/gridview.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ suite('Gridview', function () {
5959
];
6060

6161
gridview.addView(views[0] as IView, 200, [0]);
62-
gridview.addView(views[1][0] as IView, 200, [1]);
63-
gridview.addView(views[1][1] as IView, 200, [1, 1]);
62+
gridview.addView((views[1] as TestView[])[0] as IView, 200, [1]);
63+
gridview.addView((views[1] as TestView[])[1] as IView, 200, [1, 1]);
6464

6565
assert.deepEqual(nodesToArrays(gridview.getViews()), views);
6666

0 commit comments

Comments
 (0)