@bobfrankston/extractids 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -52,13 +52,11 @@ function generateTypes(ids, classes) {
|
|
|
52
52
|
const idType = ids.length > 0
|
|
53
53
|
? `export type htmlIDs = ${ids.map(id => `"${id}"`).join(' |\n')};\n`
|
|
54
54
|
: `export type htmlIDs = never;\n`;
|
|
55
|
-
const queryType =
|
|
56
|
-
? `export type queryIDs = ${ids.map(id => `"#${id}"`).join(' |\n')};\n`
|
|
57
|
-
: `export type queryIDs = never;\n`;
|
|
55
|
+
const queryType = `export type queryIDs = \`#\${htmlIDs}\`;\n`;
|
|
58
56
|
const classType = classes.length > 0
|
|
59
57
|
? `export type cssClasses = ${classes.map(cls => `"${cls}"`).join(' |\n')};\n`
|
|
60
58
|
: `export type cssClasses = never;\n`;
|
|
61
|
-
return idType
|
|
59
|
+
return `${idType}\n\n${queryType}\n\n${classType}`;
|
|
62
60
|
}
|
|
63
61
|
function updateTypesFile(specifiedHtmlFile) {
|
|
64
62
|
let htmlFile;
|
|
@@ -143,4 +141,3 @@ if (watchMode) {
|
|
|
143
141
|
else {
|
|
144
142
|
updateTypesFile(specifiedHtmlFile);
|
|
145
143
|
}
|
|
146
|
-
//# sourceMappingURL=index.js.map
|