Skip to content

Commit b967260

Browse files
committed
Merge branch 'main' of https://github.com/Bashamega/TypeScript-DOM-lib-generator into method-signature
2 parents 19a7eeb + 7179603 commit b967260

File tree

11 files changed

+15586
-15584
lines changed

11 files changed

+15586
-15584
lines changed

baselines/dom.generated.d.ts

Lines changed: 523 additions & 521 deletions
Large diffs are not rendered by default.

baselines/ts5.5/dom.generated.d.ts

Lines changed: 523 additions & 521 deletions
Large diffs are not rendered by default.

baselines/ts5.6/dom.generated.d.ts

Lines changed: 523 additions & 521 deletions
Large diffs are not rendered by default.

baselines/ts5.9/dom.generated.d.ts

Lines changed: 523 additions & 521 deletions
Large diffs are not rendered by default.

inputfiles/mdn.json

Lines changed: 13205 additions & 13205 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 282 additions & 265 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/fetch-mdn.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ const data = await res.json();
1414
// Filter and map the data
1515
const filtered = Object.values(data)
1616
.filter((entry) => {
17-
const path = entry.mdn_url.toLowerCase();
17+
const path = entry.mdn_url;
1818
return (
19-
path.startsWith("/en-us/docs/web/api/") ||
20-
path.startsWith("/en-us/docs/webassembly/reference/javascript_interface/")
19+
path.startsWith("/en-US/docs/Web/API/") ||
20+
path.startsWith("/en-US/docs/WebAssembly/Reference/JavaScript_interface/")
2121
);
2222
})
2323
.map(({ mdn_url, pageType, summary }) => ({

src/build/mdn-comments.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const inputFile = new URL("../../inputfiles/mdn.json", import.meta.url);
44

55
// Valid subdirectories for our use case
66
const subdirectories = [
7-
"web/api/",
8-
"webassembly/reference/javascript_interface/",
7+
"Web/API/",
8+
"WebAssembly/Reference/JavaScript_interface/",
99
];
1010

1111
const paths: Record<string, string[]> = {
@@ -24,7 +24,7 @@ const paths: Record<string, string[]> = {
2424

2525
function extractSlug(mdnUrl: string): string[] {
2626
for (const subdirectory of subdirectories) {
27-
if (!mdnUrl.toLowerCase().startsWith(subdirectory)) {
27+
if (!mdnUrl.startsWith(subdirectory)) {
2828
continue;
2929
}
3030
return mdnUrl

src/build/utils/css.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,3 @@ export function hyphenToCamelCase(name: string): string {
44
.replace(/-(\w)/g, (_, c) => c.toUpperCase());
55
return camel === "float" ? "_float" : camel;
66
}
7-
8-
export function camelToHyphenCase(name: string): string {
9-
const dashPrefix = name.startsWith("webkit") ? "-" : "";
10-
return dashPrefix + name.replace(/[A-Z]/g, (c) => "-" + c.toLowerCase());
11-
}

src/build/utils/fs.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)