Skip to content

Commit

Permalink
Extend list of known error numbers (#84)
Browse files Browse the repository at this point in the history
* Extend list of known error numbers

* sort list

* Update URL
  • Loading branch information
bennycode committed Jan 6, 2024
1 parent dd8e522 commit addbb3a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
34 changes: 18 additions & 16 deletions src/components/consts/knownErrorNumbers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@ import { Diagnostic } from "vscode-languageserver-types";
export const KNOWN_ERROR_NUMBERS: Set<Diagnostic["code"]> = new Set([
1002, 1005, 1006, 1015, 1016, 1029, 1036, 1038, 1039, 1046, 1055, 1056, 1064,
1066, 1068, 1070, 1095, 1103, 1109, 1117, 1127, 1128, 1149, 1155, 1160, 1183,
1192, 1196, 1202, 1208, 1218, 1219, 1225, 1228, 1243, 1244, 1254, 1259, 1308,
1337, 1357, 1361, 1363, 1371, 1375, 1378, 1385, 1389, 1431, 1432, 1434, 1471,
2300, 2304, 2305, 2306, 2307, 2314, 2315, 2322, 2335, 2339, 2344, 2345, 2348,
2349, 2351, 2352, 2355, 2361, 2362, 2364, 2365, 2366, 2367, 2368, 2369, 2370,
2371, 2372, 2377, 2378, 2390, 2391, 2394, 2395, 2403, 2411, 2420, 2428, 2430,
2440, 2445, 2448, 2451, 2454, 2456, 2459, 2475, 2476, 2488, 2497, 2503, 2507,
2511, 2512, 2515, 2528, 2531, 2532, 2533, 2538, 2550, 2551, 2552, 2554, 2556,
2558, 2559, 2564, 2567, 2571, 2574, 2577, 2580, 2582, 2583, 2584, 2588, 2595,
2611, 2613, 2616, 2652, 2654, 2656, 2661, 2663, 2664, 2665, 2668, 2669, 2677,
2678, 2680, 2683, 2684, 2686, 2687, 2689, 2691, 2693, 2694, 2695, 2706, 2709,
2715, 2717, 2720, 2722, 2724, 2730, 2732, 2739, 2740, 2741, 2742, 2749, 2769,
2774, 2779, 2786, 2792, 2794, 2813, 2814, 4020, 4025, 4060, 4063, 4075, 4081,
4104, 4112, 4113, 4114, 5023, 5024, 5025, 5054, 5055, 5058, 5069, 5070, 5083,
5087, 5101, 6053, 6059, 6133, 6138, 6196, 6198, 6504, 7006, 7008, 7009, 7010,
7016, 7017, 7022, 7023, 7026, 7027, 7030, 7031, 7034, 7041, 7044, 7053, 8020,
17000, 17004, 17009, 18004, 18016, 80005,
1192, 1196, 1202, 1208, 1218, 1219, 1225, 1228, 1232, 1243, 1244, 1254, 1259,
1308, 1337, 1341, 1355, 1357, 1361, 1363, 1368, 1371, 1375, 1378, 1385, 1389,
1431, 1432, 1434, 1471, 2300, 2304, 2305, 2306, 2307, 2314, 2315, 2322, 2335,
2339, 2344, 2345, 2348, 2349, 2351, 2352, 2355, 2361, 2362, 2364, 2365, 2366,
2367, 2368, 2369, 2370, 2371, 2372, 2377, 2378, 2390, 2391, 2393, 2394, 2395,
2403, 2411, 2420, 2428, 2430, 2440, 2445, 2448, 2451, 2454, 2456, 2459, 2475,
2476, 2488, 2497, 2498, 2503, 2507, 2511, 2512, 2515, 2528, 2531, 2532, 2533,
2536, 2538, 2539, 2540, 2550, 2551, 2552, 2554, 2556, 2558, 2559, 2564, 2567,
2571, 2574, 2577, 2580, 2582, 2583, 2584, 2588, 2595, 2611, 2613, 2614, 2616,
2617, 2632, 2636, 2637, 2652, 2654, 2656, 2661, 2663, 2664, 2665, 2668, 2669,
2677, 2678, 2680, 2683, 2684, 2686, 2687, 2689, 2691, 2693, 2694, 2695, 2706,
2709, 2713, 2715, 2717, 2720, 2722, 2724, 2730, 2732, 2739, 2740, 2741, 2742,
2749, 2769, 2774, 2779, 2786, 2790, 2792, 2794, 2802, 2813, 2814, 4020, 4025,
4060, 4063, 4075, 4081, 4104, 4112, 4113, 4114, 5023, 5024, 5025, 5042, 5054,
5055, 5058, 5069, 5070, 5083, 5087, 5101, 6053, 6059, 6133, 6138, 6192, 6196,
6198, 6504, 7006, 7008, 7009, 7010, 7016, 7017, 7022, 7023, 7026, 7027, 7030,
7031, 7034, 7041, 7044, 7053, 8020, 17000, 17004, 17009, 18004, 18016, 18046,
18048, 80005,
]);
2 changes: 1 addition & 1 deletion src/components/title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const title = (diagnostic: Diagnostic) => d/*html*/ `
export const errorCodeExplanationLink = (errorCode: Diagnostic["code"]) =>
KNOWN_ERROR_NUMBERS.has(errorCode)
? d/*html*/ `
<a title="See detailed explanation" href="https://typescript.tv/errors/#TS${errorCode}">
<a title="See detailed explanation" href="https://typescript.tv/errors/#ts${errorCode}">
<span class="codicon codicon-link-external">
</span>
</a>`
Expand Down

0 comments on commit addbb3a

Please sign in to comment.