index.d.mts 7.2 KB

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