Fixed #957 - Improve TypeScript definitions

pull/973/head
mertsincan 2021-02-09 22:04:55 +03:00
parent 1c81464760
commit fa82ecc38f
20 changed files with 125 additions and 74 deletions

View File

@ -1,6 +1,4 @@
import Vue from 'vue';
declare class Skeleton extends Vue {
interface SkeletonProps {
shape?: string;
size?: string;
width?: string;
@ -9,4 +7,8 @@ declare class Skeleton extends Vue {
animation?: string;
}
export default Skeleton;
declare class Skeleton {
$props: SkeletonProps;
}
export default Skeleton;

View File

@ -1,6 +1,4 @@
import Vue from 'vue';
declare class Slider extends Vue {
interface SliderProps {
modelValue?: number | any[];
min?: number;
max?: number;
@ -9,8 +7,12 @@ declare class Slider extends Vue {
range?: boolean;
disabled?: boolean;
ariaLabelledBy?: string;
}
declare class Slider {
$props: SliderProps;
$emit(eventName: 'change', value: any): this;
$emit(eventName: 'slideend', e: {originalEvent: Event, values: any}): this;
}
export default Slider;
export default Slider;

View File

@ -1,6 +1,4 @@
import Vue from 'vue';
declare class SplitButton extends Vue {
interface SplitButtonProps {
label?: string;
icon?: string;
model?: any[];
@ -9,7 +7,11 @@ declare class SplitButton extends Vue {
autoZIndex?: boolean;
baseZIndex?: number;
appendTo?: string;
}
declare class SplitButton {
$props: SplitButtonProps;
$emit(eventName: 'click', event: Event): this;
}
export default SplitButton;
export default SplitButton;

View File

@ -1,10 +1,12 @@
import Vue from 'vue';
declare class Splitter extends Vue {
interface SplitterProps {
layout?: string;
gutterSize?: number;
stateKey?: string;
stateStorage?: string;
}
export default Splitter;
declare class Splitter {
$props: SplitterProps;
}
export default Splitter;

View File

@ -1,8 +1,10 @@
import Vue from 'vue';
declare class SplitterPanel extends Vue {
interface SplitterPanelProps {
size?: number;
minSize?: number;
}
export default SplitterPanel;
declare class SplitterPanel {
$props: SplitterPanelProps;
}
export default SplitterPanel;

View File

@ -1,8 +1,10 @@
import Vue from 'vue';
declare class Steps extends Vue {
interface StepsProps {
model?: any[];
readonly?: boolean;
}
export default Steps;
declare class Steps {
$props: StepsProps;
}
export default Steps;

View File

@ -1,7 +1,9 @@
import Vue from 'vue';
declare class TabMenu extends Vue {
interface TabMenuProps {
model?: any[];
}
export default TabMenu;
declare class TabMenu {
$props: TabMenuProps;
}
export default TabMenu;

View File

@ -1,11 +1,15 @@
import Vue, { VNode } from 'vue';
import { VNode } from 'vue';
declare class TabPanel extends Vue {
interface TabPanelProps {
header?: any;
disabled?: boolean;
}
declare class TabPanel {
$props: TabPanelProps;
$slots: {
'': VNode[];
}
}
export default TabPanel;
export default TabPanel;

View File

@ -1,11 +1,15 @@
import Vue, { VNode } from 'vue';
import { VNode } from 'vue';
declare class TabView extends Vue {
interface TabViewProps {
activeIndex?: number;
}
declare class TabView {
$props: TabViewProps;
$emit(eventName: 'tab-change', e: { originalEvent: Event, tab: any }): this;
$slots: {
'': VNode[];
}
}
export default TabView;
export default TabView;

View File

@ -1,10 +1,12 @@
import Vue from 'vue';
declare class Tag extends Vue {
interface TagProps {
value?: any;
severity?: string;
rounded?: boolean;
icon?: string;
}
export default Tag;
declare class Tag {
$props: TagProps;
}
export default Tag;

View File

@ -1,8 +1,10 @@
import Vue from 'vue';
declare class Terminal extends Vue {
interface TerminalProps {
welcomeMessage?: string;
prompt?: string;
}
export default Terminal;
declare class Terminal {
$props: TerminalProps;
}
export default Terminal;

View File

@ -1,9 +1,11 @@
import Vue from 'vue';
declare class Textarea extends Vue {
interface TextareaProps {
value?: string;
autoResize?: boolean;
}
declare class Textarea {
$props: TextareaProps;
$emit(eventName: 'input', value: string): this;
}
export default Textarea;
export default Textarea;

View File

@ -1,14 +1,16 @@
import Vue from 'vue';
declare class TieredMenu extends Vue {
interface TieredMenuProps {
popup?: boolean;
model?: any[];
appendTo?: string;
autoZIndex?: boolean;
baseZIndex?: number;
}
declare class TieredMenu {
$props: TieredMenuProps;
toggle(event: Event): void;
show(event: Event, target?: any): void;
hide(): void;
}
export default TieredMenu;
export default TieredMenu;

View File

@ -1,10 +1,14 @@
import Vue, { VNode } from 'vue';
import { VNode } from 'vue';
declare class Timeline extends Vue {
interface TimelineProps {
value?: any[];
align?: string;
layout?: string;
dataKey?: string;
}
declare class Timeline {
$props: TimelineProps;
$slots: {
content: VNode[];
opposite: VNode[];
@ -12,4 +16,4 @@ declare class Timeline extends Vue {
}
}
export default Timeline;
export default Timeline;

View File

@ -1,8 +1,10 @@
import Vue from 'vue';
declare class Toast extends Vue {
interface ToastProps {
group?: string;
position?: string;
}
export default Toast;
declare class Toast {
$props: ToastProps;
}
export default Toast;

View File

@ -1,13 +1,15 @@
import Vue from 'vue';
declare class ToggleButton extends Vue {
interface ToggleButtonProps {
value?: boolean;
onIcon?: string;
offIcon?: string;
onLabel?: string;
offLabel?: string;
iconPos?: string;
}
declare class ToggleButton {
$props: ToggleButtonProps;
$emit(eventName: string, event: Event): this;
}
export default ToggleButton;
export default ToggleButton;

View File

@ -1,10 +1,13 @@
import Vue, { VNode } from 'vue';
import { VNode } from 'vue';
declare class Toolbar extends Vue {
interface ToolbarProps {}
declare class Toolbar {
$props: ToolbarProps;
$slots: {
left: VNode[];
right: VNode[];
}
}
export default Toolbar;
export default Toolbar;

View File

@ -1,6 +1,6 @@
import Vue, {VNode} from 'vue';
import { VNode } from 'vue';
declare class Tree extends Vue {
interface TreeProps {
value?: any;
expandedKeys?: any;
selectionKeys?: any;
@ -13,6 +13,10 @@ declare class Tree extends Vue {
filterMode?: string;
filterPlaceholder?: string;
filterLocale?: string;
}
declare class Tree {
$props: TreeProps;
$emit(eventName: 'node-select', node: any): this;
$emit(eventName: 'node-unselect', node: any): this;
$emit(eventName: 'node-expand', node: any): this;
@ -22,4 +26,4 @@ declare class Tree extends Vue {
}
}
export default Tree;
export default Tree;

View File

@ -1,6 +1,6 @@
import Vue, {VNode} from 'vue';
import { VNode } from 'vue';
declare class TreeTable extends Vue {
interface TreeTableProps {
value?: any;
expandedKeys?: any;
selectionKeys?: any;
@ -35,6 +35,10 @@ declare class TreeTable extends Vue {
resizableColumns?: boolean;
columnResizeMode?: string;
indentation?: number;
}
declare class TreeTable {
$props: TreeTableProps;
$emit(eventName: 'page', event: Event): this;
$emit(eventName: 'sort', event: Event): this;
$emit(eventName: 'filter', event: Event): this;
@ -52,4 +56,4 @@ declare class TreeTable extends Vue {
}
}
export default TreeTable;
export default TreeTable;

View File

@ -1,8 +1,10 @@
import Vue from 'vue';
declare class TriStateCheckbox extends Vue {
interface TriStateCheckboxProps {
modelValue?: any;
}
declare class TriStateCheckbox {
$props: TriStateCheckboxProps;
$emit(eventName: string, event: Event): this;
}
export default TriStateCheckbox;
export default TriStateCheckbox;