Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor(types): improve isValidDuration type #12850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
webfansplz wants to merge 1 commit into vuejs:main
base: main
Choose a base branch
Loading
from webfansplz:chore-types-1
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/platforms/web/runtime/modules/transition.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function enter(vnode: VNodeWithData, toggleDisplay?: () => void) {
? appearCancelled || enterCancelled
: enterCancelled

const explicitEnterDuration: any = toNumber(
const explicitEnterDuration = toNumber(
isObject(duration) ? duration.enter : duration
)

Expand Down Expand Up @@ -291,7 +291,7 @@ function checkDuration(val, name, vnode) {
}
}

function isValidDuration(val) {
function isValidDuration(val): val is number {
return typeof val === 'number' && !isNaN(val)
}

Expand Down

AltStyle によって変換されたページ (->オリジナル) /