Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dull-stingrays-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@patternfly/create-element": patch
---

Fixed type errors in create-element template
3 changes: 3 additions & 0 deletions tools/create-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"bin": {
"create-app": "bin/main.js"
},
"contributors": [
"Martin Pitt <[email protected]>"
],
"keywords": [
"custom elements",
"custom-elements",
Expand Down
6 changes: 3 additions & 3 deletions tools/create-element/templates/element/element.ts
Original file line number Diff line number Diff line change
@@ -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 %>';
Expand All @@ -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`
<slot></slot>
`;
Expand Down
Loading