diff --git a/.changeset/dull-stingrays-film.md b/.changeset/dull-stingrays-film.md new file mode 100644 index 0000000000..f2e53738ee --- /dev/null +++ b/.changeset/dull-stingrays-film.md @@ -0,0 +1,5 @@ +--- +"@patternfly/create-element": patch +--- + +Fixed type errors in create-element template diff --git a/tools/create-element/package.json b/tools/create-element/package.json index 7499387bdd..94216e0f1f 100644 --- a/tools/create-element/package.json +++ b/tools/create-element/package.json @@ -11,6 +11,9 @@ "bin": { "create-app": "bin/main.js" }, + "contributors": [ + "Martin Pitt " + ], "keywords": [ "custom elements", "custom-elements", diff --git a/tools/create-element/templates/element/element.ts b/tools/create-element/templates/element/element.ts index 8f35f9fcab..5c9ff8db26 100644 --- a/tools/create-element/templates/element/element.ts +++ b/tools/create-element/templates/element/element.ts @@ -1,4 +1,4 @@ -import { LitElement, html } from 'lit'; +import { LitElement, html, type TemplateResult } from 'lit'; import { customElement } from 'lit/decorators/custom-element.js'; import styles from '<%= cssRelativePath %>'; @@ -9,9 +9,9 @@ import styles from '<%= cssRelativePath %>'; */ @customElement('<%= tagName %>') export class <%= className %> extends LitElement { - static readonly styles = [styles]; + static readonly styles: CSSStyleSheet[] = [styles]; - render() { + render(): TemplateResult<1> { return html` `;