@vue/shared 3.4.26 → 3.5.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.4.26
2
+ * @vue/shared v3.5.0-alpha.2
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.4.26
2
+ * @vue/shared v3.5.0-alpha.2
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
package/dist/shared.d.ts CHANGED
@@ -321,4 +321,12 @@ export type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
321
321
  export type Awaited<T> = T extends null | undefined ? T : T extends object & {
322
322
  then(onfulfilled: infer F, ...args: infer _): any;
323
323
  } ? F extends (value: infer V, ...args: infer _) => any ? Awaited<V> : never : T;
324
+ /**
325
+ * Utility for extracting the parameters from a function overload (for typed emits)
326
+ * https://github.com/microsoft/TypeScript/issues/32164#issuecomment-1146737709
327
+ */
328
+ export type OverloadParameters<T extends (...args: any[]) => any> = Parameters<OverloadUnion<T>>;
329
+ type OverloadProps<TOverload> = Pick<TOverload, keyof TOverload>;
330
+ type OverloadUnionRecursive<TOverload, TPartialOverload = unknown> = TOverload extends (...args: infer TArgs) => infer TReturn ? TPartialOverload extends TOverload ? never : OverloadUnionRecursive<TPartialOverload & TOverload, TPartialOverload & ((...args: TArgs) => TReturn) & OverloadProps<TOverload>> | ((...args: TArgs) => TReturn) : never;
331
+ type OverloadUnion<TOverload extends (...args: any[]) => any> = Exclude<OverloadUnionRecursive<(() => never) & TOverload>, TOverload extends () => never ? never : () => never>;
324
332
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.4.26
2
+ * @vue/shared v3.5.0-alpha.2
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/shared",
3
- "version": "3.4.26",
3
+ "version": "3.5.0-alpha.2",
4
4
  "description": "internal utils shared across @vue packages",
5
5
  "main": "index.js",
6
6
  "module": "dist/shared.esm-bundler.js",