index.d.mts 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. import * as vue from 'vue';
  2. import { ComponentPropsOptions, ExtractPropTypes, Component } from 'vue';
  3. interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
  4. filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
  5. }
  6. type ClassValue = any;
  7. type VCounterSlot = {
  8. counter: string;
  9. max: string | number | undefined;
  10. value: string | number | undefined;
  11. };
  12. declare const VCounter: {
  13. new (...args: any[]): vue.CreateComponentPublicInstance<{
  14. active: boolean;
  15. transition: string | boolean | (vue.TransitionProps & {
  16. component?: Component;
  17. }) | {
  18. component: Component;
  19. };
  20. value: string | number;
  21. style: vue.StyleValue;
  22. disabled: boolean;
  23. } & {
  24. max?: string | number | undefined;
  25. class?: any;
  26. } & {
  27. $children?: vue.VNodeChild | {
  28. default?: ((arg: VCounterSlot) => vue.VNodeChild) | undefined;
  29. } | ((arg: VCounterSlot) => vue.VNodeChild);
  30. 'v-slots'?: {
  31. default?: false | ((arg: VCounterSlot) => vue.VNodeChild) | undefined;
  32. } | undefined;
  33. } & {
  34. "v-slot:default"?: false | ((arg: VCounterSlot) => vue.VNodeChild) | undefined;
  35. }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
  36. active: boolean;
  37. transition: string | boolean | (vue.TransitionProps & {
  38. component?: Component;
  39. }) | {
  40. component: Component;
  41. };
  42. value: string | number;
  43. style: vue.StyleValue;
  44. disabled: boolean;
  45. } & {
  46. max?: string | number | undefined;
  47. class?: any;
  48. } & {
  49. $children?: vue.VNodeChild | {
  50. default?: ((arg: VCounterSlot) => vue.VNodeChild) | undefined;
  51. } | ((arg: VCounterSlot) => vue.VNodeChild);
  52. 'v-slots'?: {
  53. default?: false | ((arg: VCounterSlot) => vue.VNodeChild) | undefined;
  54. } | undefined;
  55. } & {
  56. "v-slot:default"?: false | ((arg: VCounterSlot) => vue.VNodeChild) | undefined;
  57. }, {
  58. active: boolean;
  59. transition: string | boolean | (vue.TransitionProps & {
  60. component?: Component;
  61. }) | {
  62. component: Component;
  63. };
  64. value: string | number;
  65. style: vue.StyleValue;
  66. disabled: boolean;
  67. }, true, {}, vue.SlotsType<Partial<{
  68. default: (arg: VCounterSlot) => vue.VNode[];
  69. }>>, {
  70. P: {};
  71. B: {};
  72. D: {};
  73. C: {};
  74. M: {};
  75. Defaults: {};
  76. }, {
  77. active: boolean;
  78. transition: string | boolean | (vue.TransitionProps & {
  79. component?: Component;
  80. }) | {
  81. component: Component;
  82. };
  83. value: string | number;
  84. style: vue.StyleValue;
  85. disabled: boolean;
  86. } & {
  87. max?: string | number | undefined;
  88. class?: any;
  89. } & {
  90. $children?: vue.VNodeChild | {
  91. default?: ((arg: VCounterSlot) => vue.VNodeChild) | undefined;
  92. } | ((arg: VCounterSlot) => vue.VNodeChild);
  93. 'v-slots'?: {
  94. default?: false | ((arg: VCounterSlot) => vue.VNodeChild) | undefined;
  95. } | undefined;
  96. } & {
  97. "v-slot:default"?: false | ((arg: VCounterSlot) => vue.VNodeChild) | undefined;
  98. }, {}, {}, {}, {}, {
  99. active: boolean;
  100. transition: string | boolean | (vue.TransitionProps & {
  101. component?: Component;
  102. }) | {
  103. component: Component;
  104. };
  105. value: string | number;
  106. style: vue.StyleValue;
  107. disabled: boolean;
  108. }>;
  109. __isFragment?: never;
  110. __isTeleport?: never;
  111. __isSuspense?: never;
  112. } & vue.ComponentOptionsBase<{
  113. active: boolean;
  114. transition: string | boolean | (vue.TransitionProps & {
  115. component?: Component;
  116. }) | {
  117. component: Component;
  118. };
  119. value: string | number;
  120. style: vue.StyleValue;
  121. disabled: boolean;
  122. } & {
  123. max?: string | number | undefined;
  124. class?: any;
  125. } & {
  126. $children?: vue.VNodeChild | {
  127. default?: ((arg: VCounterSlot) => vue.VNodeChild) | undefined;
  128. } | ((arg: VCounterSlot) => vue.VNodeChild);
  129. 'v-slots'?: {
  130. default?: false | ((arg: VCounterSlot) => vue.VNodeChild) | undefined;
  131. } | undefined;
  132. } & {
  133. "v-slot:default"?: false | ((arg: VCounterSlot) => vue.VNodeChild) | undefined;
  134. }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
  135. active: boolean;
  136. transition: string | boolean | (vue.TransitionProps & {
  137. component?: Component;
  138. }) | {
  139. component: Component;
  140. };
  141. value: string | number;
  142. style: vue.StyleValue;
  143. disabled: boolean;
  144. }, {}, string, vue.SlotsType<Partial<{
  145. default: (arg: VCounterSlot) => vue.VNode[];
  146. }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
  147. transition: Omit<{
  148. type: vue.PropType<string | boolean | (vue.TransitionProps & {
  149. component?: Component;
  150. })>;
  151. default: string;
  152. validator: (val: unknown) => boolean;
  153. }, "type" | "default"> & {
  154. type: vue.PropType<string | boolean | (vue.TransitionProps & {
  155. component?: Component;
  156. }) | {
  157. component: Component;
  158. }>;
  159. default: NonNullable<string | boolean | (vue.TransitionProps & {
  160. component?: Component;
  161. })> | {
  162. component: Component;
  163. };
  164. };
  165. class: vue.PropType<ClassValue>;
  166. style: {
  167. type: vue.PropType<vue.StyleValue>;
  168. default: null;
  169. };
  170. active: BooleanConstructor;
  171. disabled: BooleanConstructor;
  172. max: (StringConstructor | NumberConstructor)[];
  173. value: {
  174. type: (StringConstructor | NumberConstructor)[];
  175. default: number;
  176. };
  177. }, vue.ExtractPropTypes<{
  178. transition: Omit<{
  179. type: vue.PropType<string | boolean | (vue.TransitionProps & {
  180. component?: Component;
  181. })>;
  182. default: string;
  183. validator: (val: unknown) => boolean;
  184. }, "type" | "default"> & {
  185. type: vue.PropType<string | boolean | (vue.TransitionProps & {
  186. component?: Component;
  187. }) | {
  188. component: Component;
  189. }>;
  190. default: NonNullable<string | boolean | (vue.TransitionProps & {
  191. component?: Component;
  192. })> | {
  193. component: Component;
  194. };
  195. };
  196. class: vue.PropType<ClassValue>;
  197. style: {
  198. type: vue.PropType<vue.StyleValue>;
  199. default: null;
  200. };
  201. active: BooleanConstructor;
  202. disabled: BooleanConstructor;
  203. max: (StringConstructor | NumberConstructor)[];
  204. value: {
  205. type: (StringConstructor | NumberConstructor)[];
  206. default: number;
  207. };
  208. }>>;
  209. type VCounter = InstanceType<typeof VCounter>;
  210. export { VCounter };