Is your feature request related to a problem? Please describe.
It's often unclear what configuration options are available, and it would be great to have documentation available on hover in my editor.
Describe the solution you'd like
By distributing TypeScript types, config files can use TypeScript's JSDoc checking to verify their configuration is set up properly.
/** @type {import('@11ty/eleventy').LocalConfig} */
const config = (eleventyConfig) => {
// Add a filter using the Config API
eleventyConfig.addFilter( "myFilter", function() {});
// You can return your Config object (optional).
return {
dir: {
input: "views"
}
};
};
module.exports = config
Describe alternatives you've considered
The types could alternatively be distributed by DefinetlyTyped instead. Consumers would install a @types package in addition to Eleventy.
Additional context
I have a type file already written! I'm happy to send a PR with tests if you're OK with this change.
My PR https://github.com/11ty/eleventy/pull/720 is still awaiting going forward.
Related to #814
Most helpful comment
My PR https://github.com/11ty/eleventy/pull/720 is still awaiting going forward.
Related to #814