Skip to content

Commit

Permalink
fix: type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adamberecz committed Oct 14, 2023
1 parent 60b54ec commit f520dd4
Showing 1 changed file with 39 additions and 20 deletions.
59 changes: 39 additions & 20 deletions src/Toggle.d.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,45 @@
import Vue,{ VNode } from 'vue';
import { VNode, defineComponent } from 'vue';

declare class Toggle extends Vue {
modelValue?: any;
value?: any;
id?: string;
name?: string;
disabled?: boolean;
required?: boolean;
falseValue?: any;
trueValue?: any;
offLabel?: string;
onLabel?: string;
labelledby?: string;
describedby?: string;
classes?: object;
aria?: object;
interface ToggleProps {
modelValue?: any;
value?: any;
id?: string;
name?: string;
disabled?: boolean;
required?: boolean;
falseValue?: any;
trueValue?: any;
offLabel?: string;
onLabel?: string;
labelledby?: string;
describedby?: string;
classes?: object;
aria?: object;
}

declare class Toggle implements ReturnType<typeof defineComponent> {
modelValue: ToggleProps['modelValue'];
value: ToggleProps['value'];
id: ToggleProps['id'];
name: ToggleProps['name'];
disabled: ToggleProps['disabled'];
required: ToggleProps['required'];
falseValue: ToggleProps['falseValue'];
trueValue: ToggleProps['trueValue'];
offLabel: ToggleProps['offLabel'];
onLabel: ToggleProps['onLabel'];
labelledby: ToggleProps['labelledby'];
describedby: ToggleProps['describedby'];
classes: ToggleProps['classes'];
aria: ToggleProps['aria'];

$props: ToggleProps;

$emit(eventName: 'change', e: {originalEvent: Event, value: any}): this;
$emit(eventName: 'change', value: any): this | void;

$slots: {
label: VNode[];
};
$slots: {
label: VNode[];
};
}

export default Toggle;

0 comments on commit f520dd4

Please sign in to comment.