"rollup-plugin-terser": "^5.1.1",
"rollup-plugin-typescript2": "^0.24.0",
"ts-jest": "^24.0.2",
- "tsd": "^0.10.0",
+ "tsd": "^0.11.0",
"typescript": "^3.7.0",
"yorkie": "^2.0.0"
}
delayLeave?(performLeave: () => void): void
}
+// The transition hooks are attached to the vnode as vnode.transition
+// and will be called at appropriate timing in the renderer.
function resolveTransitionHooks(
{
appear,
Transition as BaseTransition,
TransitionProps,
h,
- SetupContext,
- warn
+ warn,
+ FunctionalComponent
} from '@vue/runtime-core'
import { isObject } from '@vue/shared'
name?: string
type?: typeof TRANSITION | typeof ANIMATION
duration?: number | { enter: number; leave: number }
-
+ // custom transition classes
enterFromClass?: string
enterActiveClass?: string
enterToClass?: string
leaveFromClass?: string
leaveActiveClass?: string
leaveToClass?: string
+ // if present, indicates this is a v-show transition by toggling the
+ // CSS display property instead of actually removing the element.
+ show?: boolean
}
-export const CSSTransition = (
+export const CSSTransition: FunctionalComponent = (
props: CSSTransitionProps,
- { slots }: SetupContext
-) => h(BaseTransition, resolveCSSTransitionData(props), slots)
+ { slots }
+) => h(BaseTransition, resolveCSSTransitionProps(props), slots)
if (__DEV__) {
CSSTransition.props = {
}
}
-function resolveCSSTransitionData({
+function resolveCSSTransitionProps({
name = 'v',
type,
duration,
cb: () => void
) {
const { type, timeout, propCount } = getTransitionInfo(el, expectedType)
- if (!type) return cb()
+ if (!type) {
+ return cb()
+ }
+
const endEvent = type + 'end'
let ended = 0
const end = () => {
// re-export everything from core
// h, Component, reactivity API, nextTick, flags & types
export * from '@vue/runtime-core'
-
-// Type augmentations
-export interface ComponentPublicInstance {
- $el: Element
-}
-import { describe } from './util'
import { expectError, expectType } from 'tsd'
-import { createComponent, PropType, ref } from './index'
+import { describe, createComponent, PropType, ref } from './index'
describe('with object props', () => {
interface ExpectedProps {
-import { describe } from './util'
import { expectError } from 'tsd'
-import { h, createComponent, ref, Fragment, Portal, Suspense } from './index'
+import {
+ describe,
+ h,
+ createComponent,
+ ref,
+ Fragment,
+ Portal,
+ Suspense
+} from './index'
describe('h inference w/ element', () => {
// key
// that would suppress the errors that should be caught.
export * from '@vue/runtime-dom'
+
+export function describe(_name: string, _fn: () => void): void
+++ /dev/null
-// aesthetic utility for making test-d.ts look more like actual tests
-// and makes it easier to navigate test cases with folding
-// it's a noop since test-d.ts files are not actually run.
-export function describe(_name: string, _fn: () => void) {}
semver "^5.5"
yargs-parser "10.x"
-tsd@^0.10.0:
- version "0.10.0"
- resolved "https://registry.yarnpkg.com/tsd/-/tsd-0.10.0.tgz#092e5dbfdccaab89fd31e75a43a2e67411bcfff9"
- integrity sha512-Gj/GoGBoskUJHZnja8V936sMAs3daHjZDQCqYQWMWEm4kNZLzYHvAAdV+apeg3mjsxMmvt8FByOM1AnYDdo+6g==
+tsd@^0.11.0:
+ version "0.11.0"
+ resolved "https://registry.yarnpkg.com/tsd/-/tsd-0.11.0.tgz#ede8b8e85850845b753fff7eaaf68dbd3673700b"
+ integrity sha512-klKMNC0KRzUIaLJG8XqkvH/9rKwYX74xpqJBN8spWjYUDojAesd6AfDCT5dray+yhLfTGkem7O3nU6i4KwzNDw==
dependencies:
eslint-formatter-pretty "^1.3.0"
- execa "^2.0.4"
globby "^9.1.0"
meow "^5.0.0"
path-exists "^3.0.0"