@vue/runtime-core 3.2.44 → 3.2.46
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.
- package/README.md +3 -3
- package/dist/runtime-core.cjs.js +117 -66
- package/dist/runtime-core.cjs.prod.js +69 -37
- package/dist/runtime-core.d.ts +22 -25
- package/dist/runtime-core.esm-bundler.js +121 -69
- package/package.json +3 -3
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var reactivity = require('@vue/reactivity');
|
|
6
4
|
var shared = require('@vue/shared');
|
|
7
5
|
|
|
8
6
|
function warn(msg, ...args) {
|
|
9
7
|
return;
|
|
10
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
function assertNumber(val, type) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
11
15
|
|
|
12
16
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
13
17
|
let res;
|
|
@@ -225,6 +229,7 @@ function flushJobs(seen) {
|
|
|
225
229
|
}
|
|
226
230
|
}
|
|
227
231
|
|
|
232
|
+
exports.devtools = void 0;
|
|
228
233
|
let buffer = [];
|
|
229
234
|
function setDevtoolsHook(hook, target) {
|
|
230
235
|
var _a, _b;
|
|
@@ -277,7 +282,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
277
282
|
args = rawArgs.map(a => (shared.isString(a) ? a.trim() : a));
|
|
278
283
|
}
|
|
279
284
|
if (number) {
|
|
280
|
-
args = rawArgs.map(shared.
|
|
285
|
+
args = rawArgs.map(shared.looseToNumber);
|
|
281
286
|
}
|
|
282
287
|
}
|
|
283
288
|
let handlerName;
|
|
@@ -802,7 +807,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
|
|
|
802
807
|
}
|
|
803
808
|
function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
|
|
804
809
|
const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;
|
|
805
|
-
const timeout =
|
|
810
|
+
const timeout = vnode.props ? shared.toNumber(vnode.props.timeout) : undefined;
|
|
806
811
|
const suspense = {
|
|
807
812
|
vnode,
|
|
808
813
|
parent,
|
|
@@ -1094,10 +1099,10 @@ function watchEffect(effect, options) {
|
|
|
1094
1099
|
return doWatch(effect, null, options);
|
|
1095
1100
|
}
|
|
1096
1101
|
function watchPostEffect(effect, options) {
|
|
1097
|
-
return doWatch(effect, null,
|
|
1102
|
+
return doWatch(effect, null, { flush: 'post' });
|
|
1098
1103
|
}
|
|
1099
1104
|
function watchSyncEffect(effect, options) {
|
|
1100
|
-
return doWatch(effect, null,
|
|
1105
|
+
return doWatch(effect, null, { flush: 'sync' });
|
|
1101
1106
|
}
|
|
1102
1107
|
// initial value for watchers to trigger on undefined initial values
|
|
1103
1108
|
const INITIAL_WATCHER_VALUE = {};
|
|
@@ -1106,7 +1111,8 @@ function watch(source, cb, options) {
|
|
|
1106
1111
|
return doWatch(source, cb, options);
|
|
1107
1112
|
}
|
|
1108
1113
|
function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = shared.EMPTY_OBJ) {
|
|
1109
|
-
const instance = currentInstance;
|
|
1114
|
+
const instance = reactivity.getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
|
|
1115
|
+
// const instance = currentInstance
|
|
1110
1116
|
let getter;
|
|
1111
1117
|
let forceTrigger = false;
|
|
1112
1118
|
let isMultiSource = false;
|
|
@@ -1214,7 +1220,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
|
|
|
1214
1220
|
// pass undefined as the old value when it's changed for the first time
|
|
1215
1221
|
oldValue === INITIAL_WATCHER_VALUE
|
|
1216
1222
|
? undefined
|
|
1217
|
-
:
|
|
1223
|
+
: isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE
|
|
1218
1224
|
? []
|
|
1219
1225
|
: oldValue,
|
|
1220
1226
|
onCleanup
|
|
@@ -1790,10 +1796,15 @@ function defineAsyncComponent(source) {
|
|
|
1790
1796
|
}
|
|
1791
1797
|
});
|
|
1792
1798
|
}
|
|
1793
|
-
function createInnerComp(comp,
|
|
1799
|
+
function createInnerComp(comp, parent) {
|
|
1800
|
+
const { ref, props, children, ce } = parent.vnode;
|
|
1794
1801
|
const vnode = createVNode(comp, props, children);
|
|
1795
1802
|
// ensure inner component inherits the async wrapper's ref owner
|
|
1796
1803
|
vnode.ref = ref;
|
|
1804
|
+
// pass the custom element callback on to the inner comp
|
|
1805
|
+
// and remove it from the async wrapper
|
|
1806
|
+
vnode.ce = ce;
|
|
1807
|
+
delete parent.vnode.ce;
|
|
1797
1808
|
return vnode;
|
|
1798
1809
|
}
|
|
1799
1810
|
|
|
@@ -1876,7 +1887,7 @@ const KeepAliveImpl = {
|
|
|
1876
1887
|
}
|
|
1877
1888
|
function pruneCacheEntry(key) {
|
|
1878
1889
|
const cached = cache.get(key);
|
|
1879
|
-
if (!current || cached
|
|
1890
|
+
if (!current || !isSameVNodeType(cached, current)) {
|
|
1880
1891
|
unmount(cached);
|
|
1881
1892
|
}
|
|
1882
1893
|
else if (current) {
|
|
@@ -1908,7 +1919,7 @@ const KeepAliveImpl = {
|
|
|
1908
1919
|
cache.forEach(cached => {
|
|
1909
1920
|
const { subTree, suspense } = instance;
|
|
1910
1921
|
const vnode = getInnerChild(subTree);
|
|
1911
|
-
if (cached.type === vnode.type) {
|
|
1922
|
+
if (cached.type === vnode.type && cached.key === vnode.key) {
|
|
1912
1923
|
// current instance will be unmounted as part of keep-alive's unmount
|
|
1913
1924
|
resetShapeFlag(vnode);
|
|
1914
1925
|
// but invoke its deactivated hook here
|
|
@@ -1945,8 +1956,7 @@ const KeepAliveImpl = {
|
|
|
1945
1956
|
: comp);
|
|
1946
1957
|
const { include, exclude, max } = props;
|
|
1947
1958
|
if ((include && (!name || !matches(include, name))) ||
|
|
1948
|
-
(exclude && name && matches(exclude, name))
|
|
1949
|
-
(false )) {
|
|
1959
|
+
(exclude && name && matches(exclude, name))) {
|
|
1950
1960
|
current = vnode;
|
|
1951
1961
|
return rawVNode;
|
|
1952
1962
|
}
|
|
@@ -2003,7 +2013,7 @@ function matches(pattern, name) {
|
|
|
2003
2013
|
else if (shared.isString(pattern)) {
|
|
2004
2014
|
return pattern.split(',').includes(name);
|
|
2005
2015
|
}
|
|
2006
|
-
else if (pattern
|
|
2016
|
+
else if (shared.isRegExp(pattern)) {
|
|
2007
2017
|
return pattern.test(name);
|
|
2008
2018
|
}
|
|
2009
2019
|
/* istanbul ignore next */
|
|
@@ -2056,14 +2066,9 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
|
2056
2066
|
}, target);
|
|
2057
2067
|
}
|
|
2058
2068
|
function resetShapeFlag(vnode) {
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
}
|
|
2063
|
-
if (shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {
|
|
2064
|
-
shapeFlag -= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
|
|
2065
|
-
}
|
|
2066
|
-
vnode.shapeFlag = shapeFlag;
|
|
2069
|
+
// bitwise operations to remove keep alive flags
|
|
2070
|
+
vnode.shapeFlag &= ~256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
|
|
2071
|
+
vnode.shapeFlag &= ~512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
|
|
2067
2072
|
}
|
|
2068
2073
|
function getInnerChild(vnode) {
|
|
2069
2074
|
return vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */ ? vnode.ssContent : vnode;
|
|
@@ -2333,7 +2338,9 @@ fallback, noSlotted) {
|
|
|
2333
2338
|
(currentRenderingInstance.parent &&
|
|
2334
2339
|
isAsyncWrapper(currentRenderingInstance.parent) &&
|
|
2335
2340
|
currentRenderingInstance.parent.isCE)) {
|
|
2336
|
-
|
|
2341
|
+
if (name !== 'default')
|
|
2342
|
+
props.name = name;
|
|
2343
|
+
return createVNode('slot', props, fallback && fallback());
|
|
2337
2344
|
}
|
|
2338
2345
|
let slot = slots[name];
|
|
2339
2346
|
// a compiled slot disables block tracking by default to avoid manual
|
|
@@ -2422,6 +2429,7 @@ const publicPropertiesMap =
|
|
|
2422
2429
|
$nextTick: i => i.n || (i.n = nextTick.bind(i.proxy)),
|
|
2423
2430
|
$watch: i => (instanceWatch.bind(i) )
|
|
2424
2431
|
});
|
|
2432
|
+
const hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key);
|
|
2425
2433
|
const PublicInstanceProxyHandlers = {
|
|
2426
2434
|
get({ _: instance }, key) {
|
|
2427
2435
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
@@ -2447,7 +2455,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
2447
2455
|
// default: just fallthrough
|
|
2448
2456
|
}
|
|
2449
2457
|
}
|
|
2450
|
-
else if (
|
|
2458
|
+
else if (hasSetupBinding(setupState, key)) {
|
|
2451
2459
|
accessCache[key] = 1 /* AccessTypes.SETUP */;
|
|
2452
2460
|
return setupState[key];
|
|
2453
2461
|
}
|
|
@@ -2503,7 +2511,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
2503
2511
|
},
|
|
2504
2512
|
set({ _: instance }, key, value) {
|
|
2505
2513
|
const { data, setupState, ctx } = instance;
|
|
2506
|
-
if (
|
|
2514
|
+
if (hasSetupBinding(setupState, key)) {
|
|
2507
2515
|
setupState[key] = value;
|
|
2508
2516
|
return true;
|
|
2509
2517
|
}
|
|
@@ -2528,7 +2536,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
2528
2536
|
let normalizedProps;
|
|
2529
2537
|
return (!!accessCache[key] ||
|
|
2530
2538
|
(data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) ||
|
|
2531
|
-
(setupState
|
|
2539
|
+
hasSetupBinding(setupState, key) ||
|
|
2532
2540
|
((normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key)) ||
|
|
2533
2541
|
shared.hasOwn(ctx, key) ||
|
|
2534
2542
|
shared.hasOwn(publicPropertiesMap, key) ||
|
|
@@ -3167,8 +3175,8 @@ function validatePropName(key) {
|
|
|
3167
3175
|
// use function string name to check type constructors
|
|
3168
3176
|
// so that it works across vms / iframes.
|
|
3169
3177
|
function getType(ctor) {
|
|
3170
|
-
const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
|
|
3171
|
-
return match ? match[
|
|
3178
|
+
const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
|
|
3179
|
+
return match ? match[2] : ctor === null ? 'null' : '';
|
|
3172
3180
|
}
|
|
3173
3181
|
function isSameType(a, b) {
|
|
3174
3182
|
return getType(a) === getType(b);
|
|
@@ -3308,7 +3316,7 @@ function createAppContext() {
|
|
|
3308
3316
|
emitsCache: new WeakMap()
|
|
3309
3317
|
};
|
|
3310
3318
|
}
|
|
3311
|
-
let uid = 0;
|
|
3319
|
+
let uid$1 = 0;
|
|
3312
3320
|
function createAppAPI(render, hydrate) {
|
|
3313
3321
|
return function createApp(rootComponent, rootProps = null) {
|
|
3314
3322
|
if (!shared.isFunction(rootComponent)) {
|
|
@@ -3321,7 +3329,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3321
3329
|
const installedPlugins = new Set();
|
|
3322
3330
|
let isMounted = false;
|
|
3323
3331
|
const app = (context.app = {
|
|
3324
|
-
_uid: uid++,
|
|
3332
|
+
_uid: uid$1++,
|
|
3325
3333
|
_component: rootComponent,
|
|
3326
3334
|
_props: rootProps,
|
|
3327
3335
|
_container: null,
|
|
@@ -3967,6 +3975,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3967
3975
|
if (dirs) {
|
|
3968
3976
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
3969
3977
|
}
|
|
3978
|
+
// scopeId
|
|
3979
|
+
setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
|
|
3970
3980
|
// props
|
|
3971
3981
|
if (props) {
|
|
3972
3982
|
for (const key in props) {
|
|
@@ -3990,8 +4000,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3990
4000
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
3991
4001
|
}
|
|
3992
4002
|
}
|
|
3993
|
-
// scopeId
|
|
3994
|
-
setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
|
|
3995
4003
|
if (dirs) {
|
|
3996
4004
|
invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount');
|
|
3997
4005
|
}
|
|
@@ -4945,6 +4953,10 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
4945
4953
|
if (!shallow)
|
|
4946
4954
|
traverseStaticChildren(c1, c2);
|
|
4947
4955
|
}
|
|
4956
|
+
// #6852 also inherit for text nodes
|
|
4957
|
+
if (c2.type === Text) {
|
|
4958
|
+
c2.el = c1.el;
|
|
4959
|
+
}
|
|
4948
4960
|
}
|
|
4949
4961
|
}
|
|
4950
4962
|
}
|
|
@@ -5085,6 +5097,7 @@ const TeleportImpl = {
|
|
|
5085
5097
|
}
|
|
5086
5098
|
}
|
|
5087
5099
|
}
|
|
5100
|
+
updateCssVars(n2);
|
|
5088
5101
|
},
|
|
5089
5102
|
remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
5090
5103
|
const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
|
|
@@ -5163,11 +5176,26 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
5163
5176
|
hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
5164
5177
|
}
|
|
5165
5178
|
}
|
|
5179
|
+
updateCssVars(vnode);
|
|
5166
5180
|
}
|
|
5167
5181
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
5168
5182
|
}
|
|
5169
5183
|
// Force-casted public typing for h and TSX props inference
|
|
5170
5184
|
const Teleport = TeleportImpl;
|
|
5185
|
+
function updateCssVars(vnode) {
|
|
5186
|
+
// presence of .ut method indicates owner component uses css vars.
|
|
5187
|
+
// code path here can assume browser environment.
|
|
5188
|
+
const ctx = vnode.ctx;
|
|
5189
|
+
if (ctx && ctx.ut) {
|
|
5190
|
+
let node = vnode.children[0].el;
|
|
5191
|
+
while (node !== vnode.targetAnchor) {
|
|
5192
|
+
if (node.nodeType === 1)
|
|
5193
|
+
node.setAttribute('data-v-owner', ctx.uid);
|
|
5194
|
+
node = node.nextSibling;
|
|
5195
|
+
}
|
|
5196
|
+
ctx.ut();
|
|
5197
|
+
}
|
|
5198
|
+
}
|
|
5171
5199
|
|
|
5172
5200
|
const Fragment = Symbol(undefined);
|
|
5173
5201
|
const Text = Symbol(undefined);
|
|
@@ -5305,7 +5333,8 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
|
|
|
5305
5333
|
patchFlag,
|
|
5306
5334
|
dynamicProps,
|
|
5307
5335
|
dynamicChildren: null,
|
|
5308
|
-
appContext: null
|
|
5336
|
+
appContext: null,
|
|
5337
|
+
ctx: currentRenderingInstance
|
|
5309
5338
|
};
|
|
5310
5339
|
if (needFullChildrenNormalization) {
|
|
5311
5340
|
normalizeChildren(vnode, children);
|
|
@@ -5456,7 +5485,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
5456
5485
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
5457
5486
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
5458
5487
|
el: vnode.el,
|
|
5459
|
-
anchor: vnode.anchor
|
|
5488
|
+
anchor: vnode.anchor,
|
|
5489
|
+
ctx: vnode.ctx,
|
|
5490
|
+
ce: vnode.ce
|
|
5460
5491
|
};
|
|
5461
5492
|
return cloned;
|
|
5462
5493
|
}
|
|
@@ -5612,13 +5643,13 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
5612
5643
|
}
|
|
5613
5644
|
|
|
5614
5645
|
const emptyAppContext = createAppContext();
|
|
5615
|
-
let uid
|
|
5646
|
+
let uid = 0;
|
|
5616
5647
|
function createComponentInstance(vnode, parent, suspense) {
|
|
5617
5648
|
const type = vnode.type;
|
|
5618
5649
|
// inherit parent app context - or - if root, adopt from root vnode
|
|
5619
5650
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
5620
5651
|
const instance = {
|
|
5621
|
-
uid: uid
|
|
5652
|
+
uid: uid++,
|
|
5622
5653
|
vnode,
|
|
5623
5654
|
type,
|
|
5624
5655
|
parent,
|
|
@@ -6089,7 +6120,7 @@ function isMemoSame(cached, memo) {
|
|
|
6089
6120
|
}
|
|
6090
6121
|
|
|
6091
6122
|
// Core API ------------------------------------------------------------------
|
|
6092
|
-
const version = "3.2.
|
|
6123
|
+
const version = "3.2.46";
|
|
6093
6124
|
const _ssrUtils = {
|
|
6094
6125
|
createComponentInstance,
|
|
6095
6126
|
setupComponent,
|
|
@@ -6153,6 +6184,7 @@ exports.Static = Static;
|
|
|
6153
6184
|
exports.Suspense = Suspense;
|
|
6154
6185
|
exports.Teleport = Teleport;
|
|
6155
6186
|
exports.Text = Text;
|
|
6187
|
+
exports.assertNumber = assertNumber;
|
|
6156
6188
|
exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling;
|
|
6157
6189
|
exports.callWithErrorHandling = callWithErrorHandling;
|
|
6158
6190
|
exports.cloneVNode = cloneVNode;
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -75,7 +75,8 @@ export declare interface AllowedComponentProps {
|
|
|
75
75
|
export declare interface App<HostElement = any> {
|
|
76
76
|
version: string;
|
|
77
77
|
config: AppConfig;
|
|
78
|
-
use(plugin: Plugin_2
|
|
78
|
+
use<Options extends unknown[]>(plugin: Plugin_2<Options>, ...options: Options): this;
|
|
79
|
+
use<Options>(plugin: Plugin_2<Options>, options: Options): this;
|
|
79
80
|
mixin(mixin: ComponentOptions): this;
|
|
80
81
|
component(name: string): Component | undefined;
|
|
81
82
|
component(name: string, component: Component): this;
|
|
@@ -142,6 +143,8 @@ declare interface AppRecord {
|
|
|
142
143
|
types: Record<string, string | Symbol>;
|
|
143
144
|
}
|
|
144
145
|
|
|
146
|
+
/* Excluded from this release type: assertNumber */
|
|
147
|
+
|
|
145
148
|
export declare type AsyncComponentLoader<T = any> = () => Promise<AsyncComponentResolveResult<T>>;
|
|
146
149
|
|
|
147
150
|
export declare interface AsyncComponentOptions<T = any> {
|
|
@@ -185,6 +188,8 @@ declare const enum BooleanFlags {
|
|
|
185
188
|
shouldCastTrue = 1
|
|
186
189
|
}
|
|
187
190
|
|
|
191
|
+
declare type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? [T[K]] extends [boolean | undefined] ? K : never : never;
|
|
192
|
+
|
|
188
193
|
export declare function callWithAsyncErrorHandling(fn: Function | Function[], instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any[];
|
|
189
194
|
|
|
190
195
|
export declare function callWithErrorHandling(fn: Function, instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any;
|
|
@@ -366,14 +371,8 @@ export declare interface ComponentInternalInstance {
|
|
|
366
371
|
/* Excluded from this release type: propsOptions */
|
|
367
372
|
/* Excluded from this release type: emitsOptions */
|
|
368
373
|
/* Excluded from this release type: inheritAttrs */
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
*/
|
|
372
|
-
isCE?: boolean;
|
|
373
|
-
/**
|
|
374
|
-
* custom element specific HMR method
|
|
375
|
-
*/
|
|
376
|
-
ceReload?: (newStyles?: string[]) => void;
|
|
374
|
+
/* Excluded from this release type: isCE */
|
|
375
|
+
/* Excluded from this release type: ceReload */
|
|
377
376
|
proxy: ComponentPublicInstance | null;
|
|
378
377
|
exposed: Record<string, any> | null;
|
|
379
378
|
exposeProxy: Record<string, any> | null;
|
|
@@ -411,14 +410,9 @@ export declare interface ComponentInternalInstance {
|
|
|
411
410
|
/* Excluded from this release type: da */
|
|
412
411
|
/* Excluded from this release type: ec */
|
|
413
412
|
/* Excluded from this release type: sp */
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
f?: () => void;
|
|
418
|
-
/**
|
|
419
|
-
* For caching bound $nextTick on public proxy access
|
|
420
|
-
*/
|
|
421
|
-
n?: () => Promise<void>;
|
|
413
|
+
/* Excluded from this release type: f */
|
|
414
|
+
/* Excluded from this release type: n */
|
|
415
|
+
/* Excluded from this release type: ut */
|
|
422
416
|
}
|
|
423
417
|
|
|
424
418
|
declare interface ComponentInternalOptions {
|
|
@@ -455,7 +449,7 @@ export declare interface ComponentOptionsBase<Props, RawBindings, D, C extends C
|
|
|
455
449
|
inheritAttrs?: boolean;
|
|
456
450
|
emits?: (E | EE[]) & ThisType<void>;
|
|
457
451
|
expose?: string[];
|
|
458
|
-
serverPrefetch?(): Promise<any>;
|
|
452
|
+
serverPrefetch?(): void | Promise<any>;
|
|
459
453
|
compilerOptions?: RuntimeCompilerOptions;
|
|
460
454
|
/* Excluded from this release type: ssrRender */
|
|
461
455
|
/* Excluded from this release type: __ssrInlineRender */
|
|
@@ -750,7 +744,9 @@ export declare function defineProps<PropNames extends string = string>(props: Pr
|
|
|
750
744
|
|
|
751
745
|
export declare function defineProps<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions>(props: PP): Readonly<ExtractPropTypes<PP>>;
|
|
752
746
|
|
|
753
|
-
export declare function defineProps<TypeProps>(): Readonly<TypeProps
|
|
747
|
+
export declare function defineProps<TypeProps>(): Readonly<Omit<TypeProps, BooleanKey<TypeProps>> & {
|
|
748
|
+
[K in keyof Pick<TypeProps, BooleanKey<TypeProps>>]-?: NotUndefined<TypeProps[K]>;
|
|
749
|
+
}>;
|
|
754
750
|
|
|
755
751
|
export declare const enum DeprecationTypes {
|
|
756
752
|
GLOBAL_MOUNT = "GLOBAL_MOUNT",
|
|
@@ -1347,14 +1343,14 @@ declare type PatchChildrenFn = (n1: VNode | null, n2: VNode, container: Renderer
|
|
|
1347
1343
|
declare type PatchFn = (n1: VNode | null, // null means this is a mount
|
|
1348
1344
|
n2: VNode, container: RendererElement, anchor?: RendererNode | null, parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary | null, isSVG?: boolean, slotScopeIds?: string[] | null, optimized?: boolean) => void;
|
|
1349
1345
|
|
|
1350
|
-
declare type Plugin_2 = (PluginInstallFunction & {
|
|
1351
|
-
install?: PluginInstallFunction
|
|
1346
|
+
declare type Plugin_2<Options = any[]> = (PluginInstallFunction<Options> & {
|
|
1347
|
+
install?: PluginInstallFunction<Options>;
|
|
1352
1348
|
}) | {
|
|
1353
|
-
install: PluginInstallFunction
|
|
1349
|
+
install: PluginInstallFunction<Options>;
|
|
1354
1350
|
};
|
|
1355
1351
|
export { Plugin_2 as Plugin }
|
|
1356
1352
|
|
|
1357
|
-
declare type PluginInstallFunction = (app: App, ...options: any
|
|
1353
|
+
declare type PluginInstallFunction<Options> = Options extends unknown[] ? (app: App, ...options: Options) => any : (app: App, options: Options) => any;
|
|
1358
1354
|
|
|
1359
1355
|
/**
|
|
1360
1356
|
* Technically we no longer need this after 3.0.8 but we need to keep the same
|
|
@@ -1646,12 +1642,12 @@ export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks)
|
|
|
1646
1642
|
|
|
1647
1643
|
declare function setupComponent(instance: ComponentInternalInstance, isSSR?: boolean): Promise<void> | undefined;
|
|
1648
1644
|
|
|
1649
|
-
export declare
|
|
1645
|
+
export declare type SetupContext<E = EmitsOptions> = E extends any ? {
|
|
1650
1646
|
attrs: Data;
|
|
1651
1647
|
slots: Slots;
|
|
1652
1648
|
emit: EmitFn<E>;
|
|
1653
1649
|
expose: (exposed?: Record<string, any>) => void;
|
|
1654
|
-
}
|
|
1650
|
+
} : never;
|
|
1655
1651
|
|
|
1656
1652
|
declare type SetupRenderEffectFn = (instance: ComponentInternalInstance, initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, optimized: boolean) => void;
|
|
1657
1653
|
|
|
@@ -1875,6 +1871,7 @@ export declare interface VNode<HostNode = RendererNode, HostElement = RendererEl
|
|
|
1875
1871
|
/* Excluded from this release type: dynamicProps */
|
|
1876
1872
|
/* Excluded from this release type: dynamicChildren */
|
|
1877
1873
|
appContext: AppContext | null;
|
|
1874
|
+
/* Excluded from this release type: ctx */
|
|
1878
1875
|
/* Excluded from this release type: memo */
|
|
1879
1876
|
/* Excluded from this release type: isCompatRoot */
|
|
1880
1877
|
/* Excluded from this release type: ce */
|