fix(type): fix .vue file type error

This commit is contained in:
vben 2021-02-05 22:30:55 +08:00
parent aaae66835a
commit 22088e820c
3 changed files with 19 additions and 21 deletions

View File

@ -105,7 +105,6 @@ export type ComponentType =
| 'RangePicker'
| 'WeekPicker'
| 'TimePicker'
| 'ImageUpload'
| 'Switch'
| 'StrengthMeter'
| 'Upload'

19
src/types/tsx.d.ts vendored Normal file
View File

@ -0,0 +1,19 @@
import type { ComponentRenderProxy, VNode } from 'vue';
declare global {
namespace JSX {
// tslint:disable no-empty-interface
type Element = VNode;
// tslint:disable no-empty-interface
type ElementClass = ComponentRenderProxy;
interface ElementAttributesProperty {
$props: any;
}
interface IntrinsicElements {
[elem: string]: any;
}
interface IntrinsicAttributes {
[elem: string]: any;
}
}
}

View File

@ -3,23 +3,3 @@ declare module '*.vue' {
const Component: ReturnType<typeof defineComponent>;
export default Component;
}
import type { ComponentRenderProxy, VNode } from 'vue';
declare global {
namespace JSX {
// tslint:disable no-empty-interface
type Element = VNode;
// tslint:disable no-empty-interface
type ElementClass = ComponentRenderProxy;
interface ElementAttributesProperty {
$props: any;
}
interface IntrinsicElements {
[elem: string]: any;
}
interface IntrinsicAttributes {
[elem: string]: any;
}
}
}