We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef01701 commit 485c5e5Copy full SHA for 485c5e5
scripts/npm.ts
@@ -20,15 +20,15 @@ const keywords = readme.map((s) => s.match(/^\!\[(.*)\]\((.*)\)$/))
20
21
const entryPoints = [];
22
let types: string | undefined;
23
-const typed: { [s: string]: string[] } = {};
+let typed: { [s: string]: string[] } | null = null;
24
for (const [name, path] of Object.entries(denoJson.exports)) {
25
const d = path.replace(/^(\.\/)?(.*)(\.[^.]+)$/i, './esm/$2.d$3');
26
if (name === '.') {
27
entryPoints.unshift(path);
28
types = d;
29
} else {
30
entryPoints.push({ name, path });
31
- typed[name.replace(/^\.\//, '')] = [d];
+ (typed ??= {})[name.replace(/^\.\//, '')] = [d];
32
}
33
34
0 commit comments