Closed kwivix closed 11 months ago
Thanks for the PR! I'm OK with this as a last resort, but since these are generated I wonder if we can co-locate the types to make them easier to maintain.
Would JSDoc comments suffice for this? e.g. if the generated file looked something like this:
import { css } from 'lit';
/** @type {import("lit").CSSResult} */
const styles = `
...
`;
export default styles;
I guess we'd still need to run TypeScript on this to generated the .d.ts
files. I'll defer this one to @KonnorRogers.
Yea, end users would need checkJs: true
and allowJs: true
for this to be passed to them, and even then, the TS Compiler then needs to run through node_modules, so its not great. So generally its best to generate a .d.ts
for users. Whether it be with JSDoc, or with the babel-ts
PR
Describe the bug
Theme style.js files do not have TypeScript definition files when importing a theme for usage in the shadow dom:
To Reproduce
Steps to reproduce the behaviour:
Demo
See playground
Screenshots
None provided
Browser / OS
Additional information
None provided