types: basic tsx support
This commit is contained in:
12
packages/core/jsx.d.ts
vendored
Normal file
12
packages/core/jsx.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
declare namespace JSX {
|
||||
interface Element {}
|
||||
interface ElementClass {
|
||||
render(props: any, slots: any, attrs: any): any
|
||||
}
|
||||
interface ElementAttributesProperty {
|
||||
$props: {}
|
||||
}
|
||||
interface IntrinsicElements {
|
||||
[name: string]: any
|
||||
}
|
||||
}
|
||||
@@ -13,9 +13,9 @@ import { nextTick } from '@vue/scheduler'
|
||||
import { ErrorTypes } from './errorHandling'
|
||||
import { initializeComponentInstance } from './componentUtils'
|
||||
|
||||
export interface ComponentClass<P = {}> extends ComponentClassOptions {
|
||||
export interface ComponentClass extends ComponentClassOptions {
|
||||
options?: ComponentOptions
|
||||
new <P = {}, D = {}>(props?: P): MergedComponent<P, D>
|
||||
new <P = {}, D = {}>(): MergedComponent<P, D>
|
||||
}
|
||||
|
||||
export type MergedComponent<P, D> = D & P & ComponentInstance<P, D>
|
||||
@@ -96,7 +96,6 @@ class InternalComponent {
|
||||
public _events: { [event: string]: Function[] | null } | null = null
|
||||
public _updateHandle: Autorun | null = null
|
||||
public _queueJob: ((fn: () => void) => void) | null = null
|
||||
public _revokeProxy: () => void
|
||||
public _isVue: boolean = true
|
||||
public _inactiveRoot: boolean = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user