Skip to content

Commit

Permalink
Fix typescript error TS2590
Browse files Browse the repository at this point in the history
  • Loading branch information
drozdzynski committed Aug 16, 2024
1 parent 4503494 commit 3caecbe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/rich-adults-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@teiler/vue": patch
---

Fix typescript error `TS2590`
5 changes: 2 additions & 3 deletions packages/vue/src/component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import type { Compiler, DefaultTheme, HTMLElements, Properties, Sheet, StyleDefinition, TeilerComponent } from '@teiler/core'
import type { DefineComponent, IntrinsicElementAttributes } from 'vue'
import type { ComponentOptionsMixin, DefineComponent, IntrinsicElementAttributes } from 'vue'

import Styled from './Styled'

import { component, global, keyframes, styled, tags } from '@teiler/core'

type Attributes<Target extends HTMLElements> = Pick<IntrinsicElementAttributes, Target>[Target]
type VueRawBindings = { styleSheet: Sheet; theme: DefaultTheme }
type VueTeilerComponent<Target extends HTMLElements, Props> = TeilerComponent<Target, Props> & DefineComponent<Props & Attributes<Target>, VueRawBindings, {}, {}, {}>
type VueTeilerComponent<Target extends HTMLElements, Props> = TeilerComponent<Target, Props> & DefineComponent<Props, VueRawBindings, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, IntrinsicElementAttributes[Target]>

const createComponent = <Target extends HTMLElements, Props>(styleDefinition: StyleDefinition<Target, Props>): VueTeilerComponent<Target, Props> => {
const component = Styled(styleDefinition)
Expand Down

0 comments on commit 3caecbe

Please sign in to comment.