Skip to content

Commit 47887b2

Browse files
committed
adjust for 8.0
1 parent 37b7cee commit 47887b2

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

src/build/utils/map.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@ export function addToArrayMap<T>(
88
map.set(name, array);
99
}
1010

11-
export function addToStringMap(
12-
map: Map<string, string>,
13-
name: string,
14-
value: string,
15-
): void {
16-
const old = map.get(name) || "";
17-
map.set(name, `${old}\n${value}\n`);
18-
}
19-
2011
export function addToNestedMap(
2112
map: Map<string, Map<string, string>>,
2213
name: string,

src/build/webref/idl.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { listAll as listAllIdl } from "@webref/idl";
22
import { listAll as listAllCss } from "@webref/css";
33
import { generateWebIdlFromCssProperties } from "./css.js";
4-
import { addToStringMap } from "../utils/map.js";
54

65
export async function getWebidls(): Promise<Map<string, string>> {
76
const idl = await listAllIdl();
@@ -12,11 +11,9 @@ export async function getWebidls(): Promise<Map<string, string>> {
1211
const text = await file.text();
1312
map.set(key, text);
1413
}
15-
for (const [key, data] of Object.entries(css)) {
16-
const properties = data.properties.map((p) => p.name);
17-
if (properties.length) {
18-
addToStringMap(map, key, generateWebIdlFromCssProperties(properties));
19-
}
14+
const properties = css.properties.map((p) => p.name);
15+
if (properties.length) {
16+
map.set("css", generateWebIdlFromCssProperties(properties));
2017
}
2118
return map;
2219
}

src/build/webref/webref-css.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ declare module "@webref/css" {
55
interface Data {
66
properties: Property[];
77
}
8-
function listAll(): Promise<Record<string, Data>>;
8+
function listAll(): Promise<Data>;
99
}

0 commit comments

Comments
 (0)