IntelliSense for config
See original GitHub issuePackages that ship with TypeScript typings can leverage IDE’s intellisense with jsdoc type hints in JS files.
/**
* @type {import('vite').UserConfig}
*/
const config = {
// ...
}
export default config
SvelteKit
/**
* @type {import('@sveltejs/kit').Config}
*/
const config = {
// ...
};
export default config;
/** @type {import("@types/tailwindcss/tailwind-config").TailwindConfig } */
Unfortunately I cannot get this working with MDsveX:
/**
* @type {import('mdsvex').MdsvexOptions}
**/
const config = {
extensions: ['.svx', '.md']
};
module.exports = config;
config
is still any
I noticed when typing out the path for the others the types/ts files are listed:
But when doing the same for mdsvex no typescript files are shown:
Perhaps its an issue how the types are being bundled? (I have no idea how the npm packaging works but just a guess)
Its not majorly important but it is nice 😄
_Originally posted by @michael0liver in https://github.com/pngwn/MDsveX/discussions/280_
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
IntelliSense in Visual Studio Code
You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.)...
Read more >VSCode Intellisense Autocomplete for Webpack Config Files
How to easily enable VSCode Intellisense and autocomplete within Webpack config JS or JSON files.
Read more >Configure a C++ project for IntelliSense - Microsoft Learn
Learn how to manually configure your C++ project to get IntelliSense working properly by using the Visual Studio IDE to help you identify ......
Read more >Get Intellisense for Web.config and App.config in Visual Studio ...
This article provides a schema definition for .NET configuration files such as Web.config and App.config . The schema makes Visual Studio .NET help...
Read more >tailwindlabs/tailwindcss-intellisense: Intelligent Tailwind CSS ...
Install via the Visual Studio Code Marketplace → ; Configure glob patterns to exclude from all IntelliSense features. Inherits all glob patterns from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not actually using it, it is probably just a leftover from my struggles to generate types the way I wanted to. I’m using
rollup-plugin-dts
to generate type iirc. This is because I want to bundle types together as much as possible and not require that a bunch of transitory dependencies have to be installed just for types. The TS compiler does not support this out of the box.V1 is being worked and will support both:
And a config function that provides types:
This is similar to how
vite
works.