Skip to content

Commit 99d6cbd

Browse files
committed
chore: fix type
1 parent a70af54 commit 99d6cbd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export default defineNuxtModule<ModuleOptions>({
165165
level >= maxLevel || // if recursive call is more than desired
166166
typeof value !== 'object' || // if its not an object, no more recursion required
167167
Array.isArray(value) || // arrays are objects in JS, but we can't break it down
168-
Object.keys(value).find(k => !k.match(/^[0-9a-z]+$/i)) // object has non-alphanumeric property (unsafe var name)
168+
Object.keys(value as any).find(k => !k.match(/^[0-9a-z]+$/i)) // object has non-alphanumeric property (unsafe var name)
169169
) {
170170
addTemplate({
171171
filename: `tailwind.config/${path.concat(key).join('/')}.mjs`,
@@ -175,10 +175,10 @@ export default defineNuxtModule<ModuleOptions>({
175175
// recurse through nested objects
176176
populateMap(value, path.concat(key), level + 1, maxLevel)
177177

178-
const values = Object.keys(value)
178+
const values = Object.keys(value as any)
179179
addTemplate({
180180
filename: `tailwind.config/${path.concat(key).join('/')}.mjs`,
181-
getContents: () => `${Object.keys(value).map(v => `import _${v} from "./${key}/${v}.mjs"`).join('\n')}\nconst config = { ${values.map(k => `"${k}": _${k}`).join(', ')} }\nexport { config as default${values.length > 0 ? ', _' : ''}${values.join(', _')} }`
181+
getContents: () => `${Object.keys(value as any).map(v => `import _${v} from "./${key}/${v}.mjs"`).join('\n')}\nconst config = { ${values.map(k => `"${k}": _${k}`).join(', ')} }\nexport { config as default${values.length > 0 ? ', _' : ''}${values.join(', _')} }`
182182
})
183183
}
184184
})

0 commit comments

Comments
 (0)