Describe the bug
Given the following component code:
/**
* The description of the component goes here.
*
* @displayName my-element
* @status alpha
*
*/
export default class MyElement extends Elena(HTMLElement) {
static tagName = "my-element";
myMethod() {
console.log('cool', this.element);
}
}
MyElement.define();
The generated .d.ts file looks like this:
export type { MyElementProps } from './custom-elements.js';
declare class MyElement extends HTMLElement {
/** The text content of the element, captured from light DOM before the first render. */
text?: string;
}
export default MyElement;
My expectation/need would be for the class file to include the myMethod() method in the typing so that I can get autocomplete throughout the rest of my code. Elena seems to suppress method types even if I explicitly include them in JSDoc tags.
Affected area
CEM TypeScript plugin
How to reproduce
See above.
Configuration file (if applicable)
No response
Codepen link
No response
Logs
System Info
Before submitting
Describe the bug
Given the following component code:
The generated .d.ts file looks like this:
My expectation/need would be for the class file to include the
myMethod()method in the typing so that I can get autocomplete throughout the rest of my code. Elena seems to suppress method types even if I explicitly include them in JSDoc tags.Affected area
CEM TypeScript plugin
How to reproduce
See above.
Configuration file (if applicable)
No response
Codepen link
No response
Logs
System Info
Before submitting