omip - fix ts template error
This commit is contained in:
parent
b73feca7ac
commit
3cc87db793
|
@ -4,8 +4,12 @@ import '../my-element'
|
|||
|
||||
import './index.css'
|
||||
|
||||
interface IData {
|
||||
count: number
|
||||
}
|
||||
|
||||
define('my-counter', class extends WeElement {
|
||||
data = {
|
||||
data: IData = {
|
||||
count: 1
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@ declare namespace Omi {
|
|||
}
|
||||
|
||||
type RenderableProps<P, RefType = any> = Readonly<
|
||||
P & Attributes & { children?: ComponentChildren; ref?: Ref<RefType> }
|
||||
P & Attributes & { children?: ComponentChildren; ref?: Ref<RefType> } & any
|
||||
>;
|
||||
|
||||
interface WeElement<P, D> extends App.AppInstance {
|
||||
|
@ -103,8 +103,8 @@ declare namespace Omi {
|
|||
data: D;
|
||||
host: HTMLElement;
|
||||
|
||||
update(): void;
|
||||
fire(name: string, data?: object): void;
|
||||
update(patch?: object, callback?: () => void): void;
|
||||
fire(name: string, data?: any): void;
|
||||
|
||||
// Abstract methods don't infer argument types
|
||||
// https://github.com/Microsoft/TypeScript/issues/14887
|
||||
|
|
Loading…
Reference in New Issue