repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/customFormatter.ts
packages/runtime-core/src/customFormatter.ts
import { type Ref, isReactive, isReadonly, isRef, isShallow, pauseTracking, resetTracking, toRaw, } from '@vue/reactivity' import { EMPTY_OBJ, extend, isArray, isFunction, isObject } from '@vue/shared' import type { ComponentInternalInstance, ComponentOptions } from './component' import type { Component...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/h.ts
packages/runtime-core/src/h.ts
import { type Comment, type Fragment, type Text, type VNode, type VNodeArrayChildren, type VNodeProps, createVNode, isVNode, setBlockTracking, } from './vnode' import type { Teleport, TeleportProps } from './components/Teleport' import type { Suspense, SuspenseProps } from './components/Suspense' impo...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/componentRenderUtils.ts
packages/runtime-core/src/componentRenderUtils.ts
import { type ComponentInternalInstance, type Data, type FunctionalComponent, getComponentName, } from './component' import { Comment, type VNode, type VNodeArrayChildren, blockStack, cloneVNode, createVNode, isVNode, normalizeVNode, } from './vnode' import { ErrorCodes, handleError } from './er...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/featureFlags.ts
packages/runtime-core/src/featureFlags.ts
import { getGlobalThis } from '@vue/shared' /** * This is only called in esm-bundler builds. * It is called when a renderer is created, in `baseCreateRenderer` so that * importing runtime-core is side-effects free. */ export function initFeatureFlags(): void { const needWarn = [] if (typeof __FEATURE_OPTIONS_...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/enums.ts
packages/runtime-core/src/enums.ts
export enum LifecycleHooks { BEFORE_CREATE = 'bc', CREATED = 'c', BEFORE_MOUNT = 'bm', MOUNTED = 'm', BEFORE_UPDATE = 'bu', UPDATED = 'u', BEFORE_UNMOUNT = 'bum', UNMOUNTED = 'um', DEACTIVATED = 'da', ACTIVATED = 'a', RENDER_TRIGGERED = 'rtg', RENDER_TRACKED = 'rtc', ERROR_CAPTURED = 'ec', S...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/apiInject.ts
packages/runtime-core/src/apiInject.ts
import { isFunction } from '@vue/shared' import { currentInstance, getCurrentInstance } from './component' import { currentApp } from './apiCreateApp' import { warn } from './warning' interface InjectionConstraint<T> {} export type InjectionKey<T> = symbol & InjectionConstraint<T> export function provide<T, K = Inje...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/apiDefineComponent.ts
packages/runtime-core/src/apiDefineComponent.ts
import type { ComponentInjectOptions, ComponentOptions, ComponentOptionsBase, ComponentOptionsMixin, ComponentProvideOptions, ComputedOptions, MethodOptions, RenderFunction, } from './componentOptions' import type { AllowedComponentProps, Component, ComponentCustomProps, GlobalComponents, Glob...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/scheduler.ts
packages/runtime-core/src/scheduler.ts
import { ErrorCodes, callWithErrorHandling, handleError } from './errorHandling' import { NOOP, isArray } from '@vue/shared' import { type ComponentInternalInstance, getComponentName } from './component' export enum SchedulerJobFlags { QUEUED = 1 << 0, PRE = 1 << 1, /** * Indicates whether the effect is allow...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/apiLifecycle.ts
packages/runtime-core/src/apiLifecycle.ts
import { type ComponentInternalInstance, currentInstance, isInSSRComponentSetup, setCurrentInstance, } from './component' import type { ComponentPublicInstance } from './componentPublicInstance' import { ErrorTypeStrings, callWithAsyncErrorHandling } from './errorHandling' import { warn } from './warning' impor...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/componentPublicInstance.ts
packages/runtime-core/src/componentPublicInstance.ts
import { type Component, type ComponentInternalInstance, type Data, getComponentPublicInstance, isStatefulComponent, } from './component' import { nextTick, queueJob } from './scheduler' import { type OnCleanup, type WatchOptions, type WatchStopHandle, instanceWatch, } from './apiWatch' import { EMP...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/apiWatch.ts
packages/runtime-core/src/apiWatch.ts
import { type WatchOptions as BaseWatchOptions, type DebuggerOptions, type ReactiveMarker, type WatchCallback, type WatchEffect, type WatchHandle, type WatchSource, watch as baseWatch, } from '@vue/reactivity' import { type SchedulerJob, SchedulerJobFlags, queueJob } from './scheduler' import { EMPTY_OB...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/apiComputed.ts
packages/runtime-core/src/apiComputed.ts
import { type ComputedRefImpl, computed as _computed } from '@vue/reactivity' import { getCurrentInstance, isInSSRComponentSetup } from './component' export const computed: typeof _computed = ( getterOrOptions: any, debugOptions?: any, ) => { // @ts-expect-error const c = _computed(getterOrOptions, debugOption...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/devtools.ts
packages/runtime-core/src/devtools.ts
/* eslint-disable no-restricted-globals */ import type { App } from './apiCreateApp' import { Comment, Fragment, Static, Text } from './vnode' import type { ComponentInternalInstance } from './component' interface AppRecord { id: number app: App version: string types: Record<string, string | Symbol> } enum De...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/index.ts
packages/runtime-core/src/index.ts
// Core API ------------------------------------------------------------------ export const version: string = __VERSION__ export { // core reactive, ref, readonly, // utilities unref, proxyRefs, isRef, toRef, toValue, toRefs, isProxy, isReactive, isReadonly, isShallow, // advanced cus...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/warning.ts
packages/runtime-core/src/warning.ts
import type { VNode } from './vnode' import { type ComponentInternalInstance, type ConcreteComponent, type Data, formatComponentName, } from './component' import { isFunction, isString } from '@vue/shared' import { isRef, pauseTracking, resetTracking, toRaw } from '@vue/reactivity' import { ErrorCodes, callWith...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/hydration.ts
packages/runtime-core/src/hydration.ts
import { Fragment, Static, Text, Comment as VComment, type VNode, type VNodeHook, createTextVNode, createVNode, invokeVNodeHook, normalizeVNode, } from './vnode' import { flushPostFlushCbs } from './scheduler' import type { ComponentInternalInstance, ComponentOptions } from './component' import { in...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/errorHandling.ts
packages/runtime-core/src/errorHandling.ts
import { pauseTracking, resetTracking } from '@vue/reactivity' import type { VNode } from './vnode' import type { ComponentInternalInstance } from './component' import { popWarningContext, pushWarningContext, warn } from './warning' import { EMPTY_OBJ, isArray, isFunction, isPromise } from '@vue/shared' import { Lifecy...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/component.ts
packages/runtime-core/src/component.ts
import { type VNode, type VNodeChild, isVNode } from './vnode' import { EffectScope, type ReactiveEffect, TrackOpTypes, isRef, markRaw, pauseTracking, proxyRefs, resetTracking, shallowReadonly, track, } from '@vue/reactivity' import { type ComponentPublicInstance, type ComponentPublicInstanceCon...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
true
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/renderFn.ts
packages/runtime-core/src/compat/renderFn.ts
import { ShapeFlags, extend, hyphenate, isArray, isObject, isString, makeMap, normalizeClass, normalizeStyle, toHandlerKey, } from '@vue/shared' import type { Component, ComponentInternalInstance, ComponentOptions, Data, InternalRenderFunction, } from '../component' import { currentRenderi...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/global.ts
packages/runtime-core/src/compat/global.ts
import { TrackOpTypes, TriggerOpTypes, isReactive, reactive, track, trigger, } from '@vue/reactivity' import { NOOP, extend, invokeArrayFns, isArray, isFunction, isObject, isString, } from '@vue/shared' import { warn } from '../warning' import { cloneVNode, createVNode } from '../vnode' import...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/instanceListeners.ts
packages/runtime-core/src/compat/instanceListeners.ts
import { isOn } from '@vue/shared' import type { ComponentInternalInstance } from '../component' import { DeprecationTypes, assertCompatEnabled } from './compatConfig' export function getCompatListeners( instance: ComponentInternalInstance, ): Record<string, Function | Function[]> { assertCompatEnabled(Deprecation...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/renderHelpers.ts
packages/runtime-core/src/compat/renderHelpers.ts
import { camelize, extend, hyphenate, isArray, isObject, isReservedProp, normalizeClass, } from '@vue/shared' import type { ComponentInternalInstance, Data } from '../component' import type { Slot } from '../componentSlots' import { createSlots } from '../helpers/createSlots' import { renderSlot } from '....
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/attrsFallthrough.ts
packages/runtime-core/src/compat/attrsFallthrough.ts
import { isOn } from '@vue/shared' import type { ComponentInternalInstance } from '../component' import { DeprecationTypes, isCompatEnabled } from './compatConfig' export function shouldSkipAttr( key: string, instance: ComponentInternalInstance, ): boolean { if (key === 'is') { return true } if ( (ke...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/componentAsync.ts
packages/runtime-core/src/compat/componentAsync.ts
import { isArray, isObject, isPromise } from '@vue/shared' import { defineAsyncComponent } from '../apiAsyncComponent' import type { Component } from '../component' import { isVNode } from '../vnode' interface LegacyAsyncOptions { component: Promise<Component> loading?: Component error?: Component delay?: numb...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/compatConfig.ts
packages/runtime-core/src/compat/compatConfig.ts
import { extend, hasOwn, isArray, isFunction } from '@vue/shared' import { type Component, type ComponentInternalInstance, type ComponentOptions, formatComponentName, getComponentName, getCurrentInstance, isRuntimeOnly, } from '../component' import { warn } from '../warning' export enum DeprecationTypes ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/customDirective.ts
packages/runtime-core/src/compat/customDirective.ts
import { isArray } from '@vue/shared' import type { ComponentInternalInstance } from '../component' import type { DirectiveHook, ObjectDirective } from '../directives' import { DeprecationTypes, softAssertCompatEnabled } from './compatConfig' export interface LegacyDirective { bind?: DirectiveHook inserted?: Direc...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/componentVModel.ts
packages/runtime-core/src/compat/componentVModel.ts
import { ShapeFlags, extend } from '@vue/shared' import type { ComponentInternalInstance, ComponentOptions } from '../component' import { createAppContext } from '../apiCreateApp' import { ErrorCodes, callWithErrorHandling } from '../errorHandling' import type { VNode } from '../vnode' import { popWarningContext, pushW...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/instanceChildren.ts
packages/runtime-core/src/compat/instanceChildren.ts
import { ShapeFlags } from '@vue/shared' import type { ComponentInternalInstance } from '../component' import type { ComponentPublicInstance } from '../componentPublicInstance' import type { VNode } from '../vnode' import { DeprecationTypes, assertCompatEnabled } from './compatConfig' export function getCompatChildren...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/instance.ts
packages/runtime-core/src/compat/instance.ts
import { NOOP, extend, looseEqual, looseIndexOf, looseToNumber, toDisplayString, } from '@vue/shared' import type { ComponentPublicInstance, PublicPropertiesMap, } from '../componentPublicInstance' import { getCompatChildren } from './instanceChildren' import { DeprecationTypes, assertCompatEnabled,...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/props.ts
packages/runtime-core/src/compat/props.ts
import { isArray } from '@vue/shared' import { inject } from '../apiInject' import type { ComponentInternalInstance, Data } from '../component' import { type ComponentOptions, resolveMergedOptions, } from '../componentOptions' import { DeprecationTypes, warnDeprecation } from './compatConfig' export function creat...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/data.ts
packages/runtime-core/src/compat/data.ts
import { isPlainObject } from '@vue/shared' import { DeprecationTypes, warnDeprecation } from './compatConfig' export function deepMergeData(to: any, from: any): any { for (const key in from) { const toVal = to[key] const fromVal = from[key] if (key in to && isPlainObject(toVal) && isPlainObject(fromVal)...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/componentFunctional.ts
packages/runtime-core/src/compat/componentFunctional.ts
import { type ComponentOptions, type FunctionalComponent, getCurrentInstance, } from '../component' import { resolveInjections } from '../componentOptions' import type { InternalSlots } from '../componentSlots' import { getCompatListeners } from './instanceListeners' import { compatH } from './renderFn' const no...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/instanceEventEmitter.ts
packages/runtime-core/src/compat/instanceEventEmitter.ts
import { isArray } from '@vue/shared' import type { ComponentInternalInstance } from '../component' import { ErrorCodes, callWithAsyncErrorHandling } from '../errorHandling' import { DeprecationTypes, assertCompatEnabled } from './compatConfig' import type { ComponentPublicInstance } from '../componentPublicInstance' ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/globalConfig.ts
packages/runtime-core/src/compat/globalConfig.ts
import type { AppConfig } from '../apiCreateApp' import { DeprecationTypes, softAssertCompatEnabled, warnDeprecation, } from './compatConfig' import { isCopyingConfig } from './global' import { internalOptionMergeStrats } from '../componentOptions' // legacy config warnings export type LegacyConfig = { /** ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/compat/component.ts
packages/runtime-core/src/compat/component.ts
import { isFunction, isObject } from '@vue/shared' import type { Component, ComponentInternalInstance } from '../component' import { DeprecationTypes, checkCompatEnabled, softAssertCompatEnabled, } from './compatConfig' import { convertLegacyAsyncComponent } from './componentAsync' import { convertLegacyFunctiona...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/helpers/useId.ts
packages/runtime-core/src/helpers/useId.ts
import { type ComponentInternalInstance, getCurrentInstance, } from '../component' import { warn } from '../warning' export function useId(): string { const i = getCurrentInstance() if (i) { return (i.appContext.config.idPrefix || 'v') + '-' + i.ids[0] + i.ids[1]++ } else if (__DEV__) { warn( `...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/helpers/useModel.ts
packages/runtime-core/src/helpers/useModel.ts
import { type Ref, customRef, ref } from '@vue/reactivity' import { EMPTY_OBJ, camelize, hasChanged, hyphenate } from '@vue/shared' import type { DefineModelOptions, ModelRef } from '../apiSetupHelpers' import { getCurrentInstance } from '../component' import { warn } from '../warning' import type { NormalizedProps } f...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/helpers/useTemplateRef.ts
packages/runtime-core/src/helpers/useTemplateRef.ts
import { type ShallowRef, readonly, shallowRef } from '@vue/reactivity' import { getCurrentInstance } from '../component' import { warn } from '../warning' import { EMPTY_OBJ } from '@vue/shared' export const knownTemplateRefs: WeakSet<ShallowRef> = new WeakSet() export type TemplateRef<T = unknown> = Readonly<Shallo...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/helpers/renderSlot.ts
packages/runtime-core/src/helpers/renderSlot.ts
import type { Data } from '../component' import type { RawSlots, Slots } from '../componentSlots' import { type ContextualRenderFn, currentRenderingInstance, } from '../componentRenderContext' import { Comment, Fragment, type VNode, type VNodeArrayChildren, createBlock, createVNode, isVNode, openBlo...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/helpers/toHandlers.ts
packages/runtime-core/src/helpers/toHandlers.ts
import { isObject, toHandlerKey } from '@vue/shared' import { warn } from '../warning' /** * For prefixing keys in v-on="obj" with "on" * @private */ export function toHandlers( obj: Record<string, any>, preserveCaseIfNecessary?: boolean, ): Record<string, any> { const ret: Record<string, any> = {} if (__DE...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/helpers/withMemo.ts
packages/runtime-core/src/helpers/withMemo.ts
import { hasChanged } from '@vue/shared' import { type VNode, currentBlock, isBlockTreeEnabled } from '../vnode' export function withMemo( memo: any[], render: () => VNode<any, any>, cache: any[], index: number, ): VNode<any, any> { const cached = cache[index] as VNode | undefined if (cached && isMemoSame(...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/helpers/createSlots.ts
packages/runtime-core/src/helpers/createSlots.ts
import { isArray } from '@vue/shared' import type { VNode } from '../vnode' // #6651 res can be undefined in SSR in string push mode type SSRSlot = (...args: any[]) => VNode[] | undefined interface CompiledSlotDescriptor { name: string fn: SSRSlot key?: string } /** * Compiler runtime helper for creating dyna...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/helpers/resolveAssets.ts
packages/runtime-core/src/helpers/resolveAssets.ts
import { type ComponentOptions, type ConcreteComponent, currentInstance, getComponentName, } from '../component' import { currentRenderingInstance } from '../componentRenderContext' import type { Directive } from '../directives' import { camelize, capitalize, isString } from '@vue/shared' import { warn } from '...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/helpers/useSsrContext.ts
packages/runtime-core/src/helpers/useSsrContext.ts
import { inject } from '../apiInject' import { warn } from '../warning' export const ssrContextKey: unique symbol = Symbol.for('v-scx') export const useSSRContext = <T = Record<string, any>>(): T | undefined => { if (!__GLOBAL__) { const ctx = inject<T>(ssrContextKey) if (!ctx) { __DEV__ && wa...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/helpers/renderList.ts
packages/runtime-core/src/helpers/renderList.ts
import type { VNode, VNodeChild } from '../vnode' import { isReactive, isReadonly, isShallow, shallowReadArray, toReactive, toReadonly, } from '@vue/reactivity' import { isArray, isObject, isString } from '@vue/shared' import { warn } from '../warning' /** * v-for string * @private */ export function re...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/components/Teleport.ts
packages/runtime-core/src/components/Teleport.ts
import type { ComponentInternalInstance } from '../component' import type { SuspenseBoundary } from './Suspense' import { type ElementNamespace, MoveType, type RendererElement, type RendererInternals, type RendererNode, type RendererOptions, queuePostRenderEffect, traverseStaticChildren, } from '../rend...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/components/Suspense.ts
packages/runtime-core/src/components/Suspense.ts
import { Comment, type VNode, type VNodeProps, closeBlock, createVNode, currentBlock, isBlockTreeEnabled, isSameVNodeType, normalizeVNode, openBlock, } from '../vnode' import { ShapeFlags, isArray, isFunction, toNumber } from '@vue/shared' import { type ComponentInternalInstance, handleSetupResult }...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/components/KeepAlive.ts
packages/runtime-core/src/components/KeepAlive.ts
import { type ComponentInternalInstance, type ComponentOptions, type ConcreteComponent, type SetupContext, currentInstance, getComponentName, getCurrentInstance, } from '../component' import { Comment, type VNode, type VNodeProps, cloneVNode, invokeVNodeHook, isSameVNodeType, isVNode, } from...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/src/components/BaseTransition.ts
packages/runtime-core/src/components/BaseTransition.ts
import { type ComponentInternalInstance, type ComponentOptions, type SetupContext, getCurrentInstance, } from '../component' import { Comment, Fragment, type VNode, type VNodeArrayChildren, cloneVNode, isSameVNodeType, } from '../vnode' import { warn } from '../warning' import { isKeepAlive } from '...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/misc.spec.ts
packages/runtime-core/__tests__/misc.spec.ts
import { h, isReactive, nodeOps, reactive, render } from '@vue/runtime-test' describe('misc', () => { test('component public instance should not be observable', () => { let instance: any const Comp = { render() {}, mounted() { instance = this }, } render(h(Comp), nodeOps.cre...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/componentProps.spec.ts
packages/runtime-core/__tests__/componentProps.spec.ts
/** * @vitest-environment jsdom */ import { type ComponentInternalInstance, type FunctionalComponent, type SetupContext, createApp, defineComponent, getCurrentInstance, h, inject, nextTick, nodeOps, provide, ref, render, serializeInner, toRefs, watch, } from '@vue/runtime-test' import...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/apiSetupHelpers.spec.ts
packages/runtime-core/__tests__/apiSetupHelpers.spec.ts
import { type ComponentInternalInstance, type SetupContext, Suspense, computed, createApp, defineComponent, getCurrentInstance, h, nodeOps, onMounted, render, serializeInner, shallowReactive, } from '@vue/runtime-test' import { createPropsRestProxy, defineEmits, defineExpose, definePro...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/scheduler.spec.ts
packages/runtime-core/__tests__/scheduler.spec.ts
import { type SchedulerJob, SchedulerJobFlags, flushPostFlushCbs, flushPreFlushCbs, nextTick, queueJob, queuePostFlushCb, } from '../src/scheduler' describe('scheduler', () => { it('nextTick', async () => { const calls: string[] = [] const dummyThen = Promise.resolve().then() const job1 = (...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/errorHandling.spec.ts
packages/runtime-core/__tests__/errorHandling.spec.ts
import { type VNode, computed, createApp, defineComponent, h, nextTick, nodeOps, onErrorCaptured, onMounted, ref, render, watch, watchEffect, } from '@vue/runtime-test' import { ErrorCodes, ErrorTypeStrings } from '../src/errorHandling' describe('error handling', () => { test('propagation',...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/rendererAttrsFallthrough.spec.ts
packages/runtime-core/__tests__/rendererAttrsFallthrough.spec.ts
/** * @vitest-environment jsdom */ // using DOM renderer because this case is mostly DOM-specific import { Fragment, type FunctionalComponent, Teleport, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, h, mergeProps, nextTick, onUpdated, openBlock, ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/vnodeHooks.spec.ts
packages/runtime-core/__tests__/vnodeHooks.spec.ts
import { type TestElement, TestNodeTypes, type VNode, type VNodeProps, h, nodeOps, render, } from '@vue/runtime-test' describe('renderer: vnode hooks', () => { function assertHooks(hooks: VNodeProps, vnode1: VNode, vnode2: VNode) { const root = nodeOps.createElement('div') render(vnode1, root) ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/scopeId.spec.ts
packages/runtime-core/__tests__/scopeId.spec.ts
import { Fragment, Suspense, createBlock, createCommentVNode, createVNode, defineComponent, h, nextTick, nodeOps, openBlock, popScopeId, pushScopeId, ref, render, renderSlot, serializeInner, withScopeId, } from '@vue/runtime-test' import { withCtx } from '../src/componentRenderContext'...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/rendererTemplateRef.spec.ts
packages/runtime-core/__tests__/rendererTemplateRef.spec.ts
import { KeepAlive, defineAsyncComponent, defineComponent, h, nextTick, nodeOps, reactive, ref, render, serializeInner, shallowRef, watch, } from '@vue/runtime-test' describe('api: template refs', () => { it('string ref mount', () => { const root = nodeOps.createElement('div') const e...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/componentSlots.spec.ts
packages/runtime-core/__tests__/componentSlots.spec.ts
import { createApp, getCurrentInstance, h, nextTick, nodeOps, ref, render, serializeInner, useSlots, } from '@vue/runtime-test' import { createBlock, normalizeVNode } from '../src/vnode' import { createSlots } from '../src/helpers/createSlots' describe('component: slots', () => { function renderWit...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/component.spec.ts
packages/runtime-core/__tests__/component.spec.ts
import { type ComponentInternalInstance, getCurrentInstance, h, nodeOps, render, } from '@vue/runtime-test' import { formatComponentName } from '../src/component' describe('formatComponentName', () => { test('default name', () => { let instance: ComponentInternalInstance | null = null const Comp = ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/componentEmits.spec.ts
packages/runtime-core/__tests__/componentEmits.spec.ts
// Note: emits and listener fallthrough is tested in // ./rendererAttrsFallthrough.spec.ts. import { type ComponentPublicInstance, createApp, defineComponent, h, nextTick, nodeOps, render, toHandlers, } from '@vue/runtime-test' import { isEmitListener } from '../src/componentEmits' describe('component...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/hmr.spec.ts
packages/runtime-core/__tests__/hmr.spec.ts
import type { HMRRuntime } from '../src/hmr' import '../src/hmr' import type { ComponentOptions, InternalRenderFunction } from '../src/component' import { type TestElement, h, nextTick, nodeOps, ref, render, serializeInner, triggerEvent, } from '@vue/runtime-test' import * as runtimeTest from '@vue/runt...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/apiOptions.spec.ts
packages/runtime-core/__tests__/apiOptions.spec.ts
/** * @vitest-environment jsdom */ import type { Mock } from 'vitest' import { type TestElement, computed, createApp, defineComponent, h, nextTick, nodeOps, ref, render, renderToString, serializeInner, triggerEvent, } from '@vue/runtime-test' import { render as domRender } from 'vue' describe...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
true
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/apiWatch.spec.ts
packages/runtime-core/__tests__/apiWatch.spec.ts
import { type ComponentInternalInstance, type ComponentPublicInstance, computed, defineComponent, getCurrentInstance, nextTick, onErrorCaptured, onWatcherCleanup, reactive, ref, watch, watchEffect, } from '../src/index' import { type TestElement, createApp, h, nodeOps, onMounted, ren...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
true
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/apiInject.spec.ts
packages/runtime-core/__tests__/apiInject.spec.ts
import { type InjectionKey, type Ref, defineComponent, h, hasInjectionContext, inject, nextTick, onMounted, provide, reactive, readonly, ref, } from '../src/index' import { createApp, nodeOps, render, serialize } from '@vue/runtime-test' describe('api: provide/inject', () => { it('string keys...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/apiAsyncComponent.spec.ts
packages/runtime-core/__tests__/apiAsyncComponent.spec.ts
import { type Component, KeepAlive, Suspense, defineAsyncComponent, h, nextTick, ref, } from '../src' import { createApp, nodeOps, serializeInner } from '@vue/runtime-test' import { onActivated } from '../src/components/KeepAlive' const timeout = (n: number = 0) => new Promise(r => setTimeout(r, n)) des...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/componentPublicInstance.spec.ts
packages/runtime-core/__tests__/componentPublicInstance.spec.ts
import { createApp, defineComponent, getCurrentInstance, h, nodeOps, render, shallowReadonly, } from '@vue/runtime-test' import type { ComponentInternalInstance, ComponentOptions, } from '../src/component' describe('component: proxy', () => { test('data', () => { let instance: ComponentInternal...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/apiWatch.bench.ts
packages/runtime-core/__tests__/apiWatch.bench.ts
import { nextTick, ref, watch, watchEffect } from '../src' import { bench } from 'vitest' bench('create watcher', () => { const v = ref(100) watch(v, v => {}) }) { const v = ref(100) watch(v, v => {}) let i = 0 bench('update ref to trigger watcher (scheduled but not executed)', () => { v.value = i++ ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/rendererOptimizedMode.spec.ts
packages/runtime-core/__tests__/rendererOptimizedMode.spec.ts
import { Fragment, type FunctionalComponent, type SetupContext, Teleport, type TestElement, type VNode, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, h, serializeInner as inner, nextTick, nodeOps, ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
true
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/rendererComponent.spec.ts
packages/runtime-core/__tests__/rendererComponent.spec.ts
import { type Ref, type SetupContext, type VNode, h, inject, nextTick, nodeOps, provide, ref, render, serializeInner, watch, } from '@vue/runtime-test' describe('renderer: component', () => { test('should update parent(hoc) component host el when child component self update', async () => { ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/apiLifecycle.spec.ts
packages/runtime-core/__tests__/apiLifecycle.spec.ts
import { KeepAlive, TrackOpTypes, h, nextTick, nodeOps, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onMounted, onRenderTracked, onRenderTriggered, onUnmounted, onUpdated, reactive, ref, render, serializeInner, } from '@vue/runtime-test' import { type DebuggerEvent,...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/directives.spec.ts
packages/runtime-core/__tests__/directives.spec.ts
import { type DirectiveBinding, type DirectiveHook, type VNode, defineComponent, h, nextTick, nodeOps, ref, render, withDirectives, } from '@vue/runtime-test' import { type ComponentInternalInstance, currentInstance, } from '../src/component' describe('directives', () => { it('should work', a...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/h.spec.ts
packages/runtime-core/__tests__/h.spec.ts
import { h } from '../src/h' import { createVNode } from '../src/vnode' import type { RawSlots } from '../src/componentSlots' // Since h is a thin layer on top of createVNode, we are only testing its // own logic here. Details of vnode creation is tested in vnode.spec.ts. describe('renderer: h', () => { test('type o...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/apiExpose.spec.ts
packages/runtime-core/__tests__/apiExpose.spec.ts
import { createApp, nodeOps, render } from '@vue/runtime-test' import { defineComponent, h, ref } from '../src' describe('api: expose', () => { test('via setup context', () => { const Child = defineComponent({ render() {}, setup(_, { expose }) { expose({ foo: 1, bar: ref(2...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/rendererChildren.spec.ts
packages/runtime-core/__tests__/rendererChildren.spec.ts
// reference: https://github.com/vuejs/vue/blob/dev/test/unit/modules/vdom/patch/children.spec.js import { type TestElement, TestNodeTypes, h, nodeOps, render, serialize, serializeInner, } from '@vue/runtime-test' function toSpan(content: any) { if (typeof content === 'string') { return h('span', co...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/vnode.spec.ts
packages/runtime-core/__tests__/vnode.spec.ts
import { Comment, Fragment, Text, type VNode, cloneVNode, createBlock, createVNode, isBlockTreeEnabled, mergeProps, normalizeVNode, openBlock, transformVNodeArgs, } from '../src/vnode' import type { Data } from '../src/component' import { PatchFlags, ShapeFlags } from '@vue/shared' import { h, i...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/rendererElement.spec.ts
packages/runtime-core/__tests__/rendererElement.spec.ts
import { type TestElement, h, serializeInner as inner, nodeOps, render, } from '@vue/runtime-test' describe('renderer: element', () => { let root: TestElement beforeEach(() => { root = nodeOps.createElement('div') }) it('should create an element', () => { render(h('div'), root) expect(i...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/hydration.spec.ts
packages/runtime-core/__tests__/hydration.spec.ts
/** * @vitest-environment jsdom */ import { type ObjectDirective, Suspense, Teleport, Transition, type VNode, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSSRApp, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
true
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/apiCreateApp.spec.ts
packages/runtime-core/__tests__/apiCreateApp.spec.ts
import { type Plugin, createApp, defineComponent, getCurrentInstance, h, inject, nextTick, nodeOps, onMounted, provide, ref, resolveComponent, resolveDirective, serializeInner, watch, withDirectives, } from '@vue/runtime-test' describe('api: createApp', () => { test('mount', () => { ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/apiSetupContext.spec.ts
packages/runtime-core/__tests__/apiSetupContext.spec.ts
import { reactive, ref } from '@vue/reactivity' import { type TestElement, defineComponent, h, nextTick, nodeOps, render, renderToString, serializeInner, triggerEvent, watchEffect, } from '@vue/runtime-test' describe('api: setup context', () => { it('should expose return values to template render...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/rendererFragment.spec.ts
packages/runtime-core/__tests__/rendererFragment.spec.ts
import { Fragment, NodeOpTypes, type TestElement, TestNodeTypes, type VNode, createBlock, createCommentVNode, createTextVNode, createVNode, dumpOps, h, nodeOps, openBlock, render, resetOps, serializeInner, } from '@vue/runtime-test' import { PatchFlags } from '@vue/shared' import { rende...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/helpers/useTemplateRef.spec.ts
packages/runtime-core/__tests__/helpers/useTemplateRef.spec.ts
import { type ShallowRef, h, nextTick, nodeOps, ref, render, useTemplateRef, } from '@vue/runtime-test' describe('useTemplateRef', () => { test('should work', () => { let tRef const key = 'refKey' const Comp = { setup() { tRef = useTemplateRef(key) }, render() { ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/helpers/useModel.spec.ts
packages/runtime-core/__tests__/helpers/useModel.spec.ts
import { Fragment, type Ref, type TestElement, createApp, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, h, nextTick, nodeOps, openBlock, ref, render, serializeInner, watch, } from '@vue/runtime-test' import { useModel } from '../../src/helpers/useMo...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/helpers/withMemo.spec.ts
packages/runtime-core/__tests__/helpers/withMemo.spec.ts
/** * @vitest-environment jsdom */ // since v-memo really is a compiler + runtime combo feature, we are performing // more of an integration test here. import { type ComponentOptions, createApp, nextTick } from 'vue' describe('v-memo', () => { function mount(options: ComponentOptions): [HTMLElement, any] { co...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/helpers/renderList.spec.ts
packages/runtime-core/__tests__/helpers/renderList.spec.ts
import { effect, isReactive, reactive, readonly, shallowReactive, } from '../../src/index' import { renderList } from '../../src/helpers/renderList' describe('renderList', () => { it('should render items in an array', () => { expect( renderList(['1', '2', '3'], (item, index) => `node ${index}: ${...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/helpers/toHandlers.spec.ts
packages/runtime-core/__tests__/helpers/toHandlers.spec.ts
import { toHandlers } from '../../src/helpers/toHandlers' describe('toHandlers', () => { it('should not accept non-objects', () => { toHandlers(null as any) toHandlers(undefined as any) expect( 'v-on with no argument expects an object value.', ).toHaveBeenWarnedTimes(2) }) it('should prop...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/helpers/renderSlot.spec.ts
packages/runtime-core/__tests__/helpers/renderSlot.spec.ts
import { renderSlot } from '../../src/helpers/renderSlot' import { Fragment, type Slot, createBlock, createCommentVNode, createVNode, h, openBlock, withCtx, } from '../../src' import { PatchFlags } from '@vue/shared' import { setCurrentRenderingInstance } from '../../src/componentRenderContext' describ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/helpers/useId.spec.ts
packages/runtime-core/__tests__/helpers/useId.spec.ts
/** * @vitest-environment jsdom */ import { type App, Suspense, createApp, defineAsyncComponent, defineComponent, h, onServerPrefetch, useId, } from 'vue' import { renderToString } from '@vue/server-renderer' type FactoryRes = [App, Promise<any>[]] type TestCaseFactory = () => FactoryRes | Promise<Fa...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/helpers/createSlots.spec.ts
packages/runtime-core/__tests__/helpers/createSlots.spec.ts
import type { Slot } from '../../src/componentSlots' import { createSlots } from '../../src/helpers/createSlots' describe('createSlot', () => { const slot = () => [] let record: Record<string, Slot> beforeEach(() => { record = {} }) it('should return a slot', () => { const dynamicSlot = [{ name: 'd...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/helpers/resolveAssets.spec.ts
packages/runtime-core/__tests__/helpers/resolveAssets.spec.ts
import { Comment, type Component, type Directive, type VNode, createApp, createVNode, h, nodeOps, resolveComponent, resolveDirective, resolveDynamicComponent, serializeInner, } from '@vue/runtime-test' describe('resolveAssets', () => { test('should work', () => { const FooBar = () => null...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/components/Suspense.spec.ts
packages/runtime-core/__tests__/components/Suspense.spec.ts
/** * @vitest-environment jsdom */ import { type ComponentOptions, Fragment, KeepAlive, Suspense, type SuspenseProps, createCommentVNode, h, nextTick, nodeOps, onErrorCaptured, onMounted, onUnmounted, ref, render, renderList, renderSlot, resolveDynamicComponent, serializeInner, ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
true
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/components/BaseTransition.spec.ts
packages/runtime-core/__tests__/components/BaseTransition.spec.ts
import { BaseTransition, type BaseTransitionProps, KeepAlive, type TestElement, type VNodeProps, h, nextTick, nodeOps, ref, render, serialize, serializeInner, } from '@vue/runtime-test' function mount( props: BaseTransitionProps, slot: () => any, withKeepAlive = false, ) { const root = ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
true
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/components/Teleport.spec.ts
packages/runtime-core/__tests__/components/Teleport.spec.ts
/** * @vitest-environment jsdom */ import { Teleport, Text, createApp, defineComponent, markRaw, nextTick, nodeOps, onMounted, h as originalH, ref, render, serialize, serializeInner, useModel, withDirectives, } from '@vue/runtime-test' import { Fragment, createBlock, createComment...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/__tests__/components/KeepAlive.spec.ts
packages/runtime-core/__tests__/components/KeepAlive.spec.ts
import { type Component, type ComponentOptions, type ComponentPublicInstance, KeepAlive, type Ref, type TestElement, cloneVNode, createApp, defineAsyncComponent, defineComponent, h, inject, markRaw, nextTick, nodeOps, onActivated, onDeactivated, onMounted, onUnmounted, provide, ...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
true
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/types/globalComponents.d.ts
packages/runtime-core/types/globalComponents.d.ts
// Note: this file is auto concatenated to the end of the bundled d.ts during // build. declare module '@vue/runtime-core' { export interface GlobalComponents { Teleport: DefineComponent<TeleportProps> Suspense: DefineComponent<SuspenseProps> KeepAlive: DefineComponent<KeepAliveProps> BaseTransition:...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-core/types/scriptSetupHelpers.d.ts
packages/runtime-core/types/scriptSetupHelpers.d.ts
// Note: this file is auto concatenated to the end of the bundled d.ts during // build. type _defineProps = typeof defineProps type _defineEmits = typeof defineEmits type _defineExpose = typeof defineExpose type _defineOptions = typeof defineOptions type _defineSlots = typeof defineSlots type _defineModel = typeof defi...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-test/src/triggerEvent.ts
packages/runtime-test/src/triggerEvent.ts
import { isArray } from '@vue/shared' import type { TestElement } from './nodeOps' export function triggerEvent( el: TestElement, event: string, payload: any[] = [], ): void { const { eventListeners } = el if (eventListeners) { const listener = eventListeners[event] if (listener) { if (isArray(...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-test/src/nodeOps.ts
packages/runtime-test/src/nodeOps.ts
import { markRaw } from '@vue/reactivity' export enum TestNodeTypes { TEXT = 'text', ELEMENT = 'element', COMMENT = 'comment', } export enum NodeOpTypes { CREATE = 'create', INSERT = 'insert', REMOVE = 'remove', SET_TEXT = 'setText', SET_ELEMENT_TEXT = 'setElementText', PATCH = 'patch', } export in...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-test/src/serialize.ts
packages/runtime-test/src/serialize.ts
import { type TestComment, type TestElement, type TestNode, TestNodeTypes, type TestText, } from './nodeOps' import { isOn } from '@vue/shared' export function serialize( node: TestNode, indent: number = 0, depth: number = 0, ): string { if (node.type === TestNodeTypes.ELEMENT) { return serialize...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false
vuejs/core
https://github.com/vuejs/core/blob/aac7e1898907445c8f89b22047a9bfcf0a6e91b8/packages/runtime-test/src/patchProp.ts
packages/runtime-test/src/patchProp.ts
import { NodeOpTypes, type TestElement, logNodeOp } from './nodeOps' import { isOn } from '@vue/shared' export function patchProp( el: TestElement, key: string, prevValue: any, nextValue: any, ): void { logNodeOp({ type: NodeOpTypes.PATCH, targetNode: el, propKey: key, propPrevValue: prevValu...
typescript
MIT
aac7e1898907445c8f89b22047a9bfcf0a6e91b8
2026-01-04T15:31:41.625443Z
false