Repository navigation
HTMX 2.0 jsdoc typehints not working in typescript files. #2453
|
I'm using neovim with the tsserver lsp, and I get type hints and autocompletion with other libraries. I think either I'm doing something wrong or htmx is misconfigured. Or should this even work? I'm using htmx v2.0.0-beta2 This is my import: import { htmx } from 'htmx.org/dist/htmx.esm.js'this is the lsp diagnostic error I get: If I add the module declaration in my d.ts file, the error goes away but my htmx variable is still Here is my tsconfig JIC: {
"compilerOptions": {
// Enable latest features
"lib": ["ESNext", "DOM"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,
// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false
}
} |
Answered by
MattTaylorQuodd
Apr 1, 2024
Replies: 2 comments
|
So I added This is not really an HTMX issue, So I'm going to close it. |
0 replies
Answer selected by
MattTaylorQuodd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

So I added
"maxNodeModuleJsDepth": 1,to my tsconfig compiler options and now it works importing from node_modules.This is not really an HTMX issue, So I'm going to close it.