Skip to content

Commit b41f57d

Browse files
committed
Fixed type issue
1 parent 2c5204e commit b41f57d

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-element",
3-
"version": "0.0.216",
3+
"version": "0.0.220",
44
"description": "",
55
"license": "LGPL-3.0",
66
"main": "./index.js",

src/main/js-element.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ const interceptions = {
2727

2828
// === types =========================================================
2929

30-
declare const methodsSymbol: unique symbol
31-
3230
type Methods = Record<string, (...args: any[]) => any>
3331

3432
type Component<M extends Methods = {}> = HTMLElement &
35-
M & { [methodsSymbol]: M }
33+
M & { valueOf(): HTMLElement & M }
3634

3735
type MethodsOf<T> = T extends Component<infer M> ? M : never
3836

src/stories/demos/context-demo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ function implThemeInfo() {
2828
@elem({
2929
tag: 'context-demo',
3030
uses: [ThemeProvider, ThemeInfo],
31-
impl: lit(implContextDemo)
31+
impl: lit(contextDemoImpl)
3232
})
3333
class ContextDemo extends component() {}
3434

35-
function implContextDemo(self: ContextDemo) {
35+
function contextDemoImpl(self: ContextDemo) {
3636
const [state, setState] = useState({ theme: 'light' })
3737

3838
useInterval(() => {

src/stories/demos/counter-demo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ function counterImpl(self: Counter) {
4242
@elem({
4343
tag: 'x-counter-demo',
4444
styles: () => styles,
45-
impl: lit(counterDemo)
45+
impl: lit(counterDemoImpl)
4646
})
4747
class CounterDemo extends component() {}
4848

49-
function counterDemo() {
49+
function counterDemoImpl() {
5050
const counterRef = createRef<Counter>()
5151

5252
const onResetClick = () => counterRef.value!.reset()

0 commit comments

Comments
 (0)