mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 11:20:54 +00:00
editor/code: Enable TypeScript's --useUnknownInCatchVariables
option
see: https://www.typescriptlang.org/tsconfig#useUnknownInCatchVariables
This commit is contained in:
parent
a66b7e3eba
commit
444bc5b3ba
@ -373,7 +373,7 @@ export function ssr(ctx: CtxInit): Cmd {
|
|||||||
selections,
|
selections,
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return e.toString();
|
return String(e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
@ -1156,7 +1156,7 @@ export function viewMemoryLayout(ctx: CtxInit): Cmd {
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Document</title>
|
<title>Document</title>
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import * as assert from "node:assert/strict";
|
||||||
import { readdir } from "fs/promises";
|
import { readdir } from "fs/promises";
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
|
|
||||||
@ -30,6 +31,7 @@ class Suite {
|
|||||||
await test.promise;
|
await test.promise;
|
||||||
ok(` ✔ ${test.name}`);
|
ok(` ✔ ${test.name}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
assert.ok(e instanceof Error);
|
||||||
error(` ✖︎ ${test.name}\n ${e.stack}`);
|
error(` ✖︎ ${test.name}\n ${e.stack}`);
|
||||||
failed += 1;
|
failed += 1;
|
||||||
}
|
}
|
||||||
@ -50,6 +52,7 @@ export class Context {
|
|||||||
await ctx.run();
|
await ctx.run();
|
||||||
ok(`✔ ${name}`);
|
ok(`✔ ${name}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
assert.ok(e instanceof Error);
|
||||||
error(`✖︎ ${name}\n ${e.stack}`);
|
error(`✖︎ ${name}\n ${e.stack}`);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
"newLine": "LF",
|
"newLine": "LF",
|
||||||
// These disables some enhancement type checking options
|
// These disables some enhancement type checking options
|
||||||
// to update typescript version without any code change.
|
// to update typescript version without any code change.
|
||||||
"useUnknownInCatchVariables": false,
|
|
||||||
"exactOptionalPropertyTypes": false
|
"exactOptionalPropertyTypes": false
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules", ".vscode-test"],
|
"exclude": ["node_modules", ".vscode-test"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user