Skip to content

Commit 4719427

Browse files
johnjenkinsJohn Jenkins
andauthored
fix(types): revert autocorrect omission (#6441)
* fix(types): revert autocorrect omission * chore: ignore ionic for now * chore: try this * chore: --------- Co-authored-by: John Jenkins <john.jenkins@nanoporetech.com>
1 parent 744b783 commit 4719427

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

src/declarations/stencil-public-runtime.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,7 @@ export declare function forceUpdate(ref: any): void;
395395
*/
396396
export declare function getRenderingRef(): any;
397397

398-
// TODO: remove `autocorrect` omission when this is properly typed in [in typescript](https://github.com/microsoft/typescript/issues/62083)
399-
export interface HTMLStencilElement extends Omit<HTMLElement, 'autocorrect'> {
398+
export interface HTMLStencilElement extends HTMLElement {
400399
componentOnReady(): Promise<this>;
401400
}
402401

test/ionic-app/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"@stencil/core/mock-doc": [
2222
"../../mock-doc"
2323
]
24-
}
24+
},
25+
"skipLibCheck": true
2526
},
2627
"include": ["src"]
2728
}

test/wdio/global.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,21 @@
33
// `stencil-sibling` test suite
44
import 'test-sibling';
55
import { setMode } from '@stencil/core';
6-
// @ts-ignore
6+
7+
// @ts-ignore - this should produce a warning but not cause the build to fail
78
import { setAssetPath } from '@stencil/core/internal/client/index';
89

10+
// this doesn't do anything - just stops rollup removing the import
11+
setAssetPath('/base/path');
12+
13+
export let thing: HTMLElement = globalThis.document ? document.createElement('div') : null;
14+
915
const globalScript = () => {
1016
setMode((elm) => {
17+
// this should be valid as HTMLElement and HTMLStencilElement should be compatible
18+
thing = elm as HTMLAttributeBasicElement;
1119
return (elm as any).colormode || elm.getAttribute('colormode');
1220
});
1321
};
1422

15-
// this doesn't do anything - just stops rollup removing the import
16-
setAssetPath('/base/path');
17-
1823
export default globalScript;

0 commit comments

Comments
 (0)