Within a module, I have this function declaration:
declare module 'picoapp' {
export function component(node?: HTMLElement): void
}
Later on, I am using it in a .ts file like this:
export default component((node: HTMLElement) => {
// Various TS/JS code here
})
I encountered a warning in VSCode saying:
Argument of type '(node: HTMLElement) => void' is not assignable to parameter of type 'HTMLElement'
.
The question arises about the return type of the function. What should it be? I am not returning a value, just utilizing the node as a reference.