Closed d3v1an7 closed 1 month ago
Hey thanks for this, I actually updated the types in beta.12
yesterday. Working on making a small update there again and will release beta.13
shortly (wanted to expose transformers in events but that's not really useful since they can all just be imported anyway).
Hmm just noticed build.components
is mistyped, this has moved to the root of the config so you'd do:
/** @type {import('@maizzle/framework').Config} */
export default {
components: {
folders: [
'netlify/functions/foo/config/components',
],
},
}
Will fix that one as well in beta.13
.
Actually can you share your jsconfig.json
? Just tried it and not getting autocomplete anymore, must be something I'm configuring wrong.
Sure thing! But fair warning, this is my first dive into this stuff, so if something looks off or weird, that's probably me misunderstanding something :)
{
"compilerOptions": {
"target": "es2017",
"module": "esnext",
"moduleResolution": "bundler",
"lib": ["dom", "es2022"],
"checkJs": true,
"resolveJsonModule": true
},
"include": ["global.d.ts", "src/**/*", "netlify/functions/**/*"],
"exclude": ["node_modules"]
}
Hehe no worries I'm really not into TS myself, just trying to provide some nice DX for the config through these type defs :)
Thanks, I'll test it out and see if there's anything I can do š
5.0.0-beta.14 solves a bunch of the issues above -- but I'm wondering if in config.d.ts
, does it make sense for the following to be optional?
I'm not sure about the internals and what is actually mandatory for Maizzle to run, but perhaps even also:
Yes you're right those should all be optional, will fix that sorry š
Hey! Just upgraded to 5 and noticed
maizzle.config.js
was complaining. I'm using VSCode and my project is vanilla JS but withjsconfig.json
and"checkJs": true
.Original code
Error
Fix
I checked the type definitions and just added empty/no-op stuff for now:
Additional note
I noticed the code example for
beforeCreate
has the params wrapped in{}
:But the actual type in events.d.ts is missing the wrapping
{}