Skip to content

Commit 457eaa9

Browse files
authored
fix(tools): typescript composite (#2315)
* chore(tools): update compilerOptions * fix(tooltip): return type for anonymous function * docs: add changeset * docs: update changeset
1 parent 82da44c commit 457eaa9

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.changeset/nasty-donuts-work.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@patternfly/pfe-tooltip": patch
3+
"@patternfly/pfe-tools": patch
4+
---
5+
6+
`pfe-tools`: Set typescript compilerOptions `composite: true`
7+
8+
`pfe-tooltip`: Added return type for anonymous function for content in constructor

elements/pfe-tooltip/BaseTooltip.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export abstract class BaseTooltip extends LitElement {
2121

2222
#float = new FloatingDOMController(this, {
2323
arrow: true,
24-
content: () => this.shadowRoot?.querySelector('#tooltip'),
24+
content: (): HTMLElement | undefined | null => this.shadowRoot?.querySelector('#tooltip'),
2525
});
2626

2727
override connectedCallback(): void {

tools/pfe-tools/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"compilerOptions": {
1010
"target": "es2022",
11-
"composite": false,
11+
"composite": true,
1212
"allowJs": false,
1313
"checkJs": false,
1414
"emitDeclarationOnly": false

0 commit comments

Comments
 (0)