@@ -28,7 +28,7 @@ export const transitionProps = {
2828// in case the child is also an abstract component, e.g. <keep-alive> 
2929// we want to recursively retrieve the real component to be rendered 
3030function  getRealChild  ( vnode : ?VNode ) : ?VNode  { 
31-  const  compOptions  =  vnode  &&  vnode . componentOptions 
31+  const  compOptions : ? VNodeComponentOptions  =  vnode  &&  vnode . componentOptions 
3232 if  ( compOptions  &&  compOptions . Ctor . options . abstract )  { 
3333 return  getRealChild ( getFirstComponentChild ( compOptions . children ) ) 
3434 }  else  { 
@@ -38,35 +38,35 @@ function getRealChild (vnode: ?VNode): ?VNode {
3838
3939export  function  extractTransitionData  ( comp : Component ) : Object  { 
4040 const  data  =  { } 
41-  const  options  =  comp . $options 
41+  const  options :  ComponentOptions  =  comp . $options 
4242 // props 
4343 for  ( const  key  in  options . propsData )  { 
4444 data [ key ]  =  comp [ key ] 
4545 } 
4646 // events. 
4747 // extract listeners and pass them directly to the transition methods 
48-  const  listeners  =  options . _parentListeners 
48+  const  listeners : ? Object  =  options . _parentListeners 
4949 for  ( const  key  in  listeners )  { 
5050 data [ camelize ( key ) ]  =  listeners [ key ] . fn 
5151 } 
5252 return  data 
5353} 
5454
55- function  placeholder  ( h ,  rawChild )  { 
55+ function  placeholder  ( h :  Function ,  rawChild :  VNode ) : ? VNode  { 
5656 return  / \d - k e e p - a l i v e $ / . test ( rawChild . tag ) 
5757 ? h ( 'keep-alive' ) 
5858 : null 
5959} 
6060
61- function  hasParentTransition  ( vnode )  { 
61+ function  hasParentTransition  ( vnode :  VNode ) : ? boolean  { 
6262 while  ( ( vnode  =  vnode . parent ) )  { 
6363 if  ( vnode . data . transition )  { 
6464 return  true 
6565 } 
6666 } 
6767} 
6868
69- function  isSameChild  ( child ,  oldChild )  { 
69+ function  isSameChild  ( child :  VNode ,  oldChild :  VNode ) :  boolean  { 
7070 return  oldChild . key  ===  child . key  &&  oldChild . tag  ===  child . tag 
7171} 
7272
@@ -76,13 +76,13 @@ export default {
7676 abstract : true , 
7777
7878 render  ( h : Function )  { 
79-  let  children  =  this . $slots . default 
79+  let  children : ? Array < VNode >  =  this . $slots . default 
8080 if  ( ! children )  { 
8181 return 
8282 } 
8383
8484 // filter out text nodes (possible whitespaces) 
85-  children  =  children . filter ( c  =>  c . tag ) 
85+  children  =  children . filter ( ( c :  VNode )  =>  c . tag ) 
8686 /* istanbul ignore if */ 
8787 if  ( ! children . length )  { 
8888 return 
@@ -97,7 +97,7 @@ export default {
9797 ) 
9898 } 
9999
100-  const  mode  =  this . mode 
100+  const  mode :  string  =  this . mode 
101101
102102 // warn invalid mode 
103103 if  ( process . env . NODE_ENV  !==  'production'  && 
@@ -108,7 +108,7 @@ export default {
108108 ) 
109109 } 
110110
111-  const  rawChild  =  children [ 0 ] 
111+  const  rawChild :  VNode  =  children [ 0 ] 
112112
113113 // if this is a component root node and the component's 
114114 // parent container node also has transition, skip. 
@@ -118,7 +118,7 @@ export default {
118118
119119 // apply transition data to child 
120120 // use getRealChild() to ignore abstract components e.g. keep-alive 
121-  const  child  =  getRealChild ( rawChild ) 
121+  const  child : ? VNode  =  getRealChild ( rawChild ) 
122122 /* istanbul ignore if */ 
123123 if  ( ! child )  { 
124124 return  rawChild 
@@ -131,15 +131,15 @@ export default {
131131 // ensure a key that is unique to the vnode type and to this transition 
132132 // component instance. This key will be used to remove pending leaving nodes 
133133 // during entering. 
134-  const  id  =  `__transition-${ this . _uid }  
135-  const  key  =  child . key  =  child . key  ==  null 
134+  const  id :  string  =  `__transition-${ this . _uid }  
135+  const  key :  string  =  child . key  =  child . key  ==  null 
136136 ? id  +  child . tag 
137137 : isPrimitive ( child . key ) 
138138 ? ( String ( child . key ) . indexOf ( id )  ===  0  ? child . key  : id  +  child . key ) 
139139 : child . key 
140-  const  data  =  ( child . data  ||  ( child . data  =  { } ) ) . transition  =  extractTransitionData ( this ) 
141-  const  oldRawChild  =  this . _vnode 
142-  const  oldChild : any  =  getRealChild ( oldRawChild ) 
140+  const  data :  Object  =  ( child . data  ||  ( child . data  =  { } ) ) . transition  =  extractTransitionData ( this ) 
141+  const  oldRawChild :  VNode  =  this . _vnode 
142+  const  oldChild : VNode  =  getRealChild ( oldRawChild ) 
143143
144144 // mark v-show 
145145 // so that the transition module can hand over the control to the directive 
@@ -150,7 +150,7 @@ export default {
150150 if  ( oldChild  &&  oldChild . data  &&  ! isSameChild ( child ,  oldChild ) )  { 
151151 // replace old child transition data with fresh one 
152152 // important for dynamic transitions! 
153-  const  oldData  =  oldChild  &&  ( oldChild . data . transition  =  extend ( { } ,  data ) ) 
153+  const  oldData :  Object  =  oldChild  &&  ( oldChild . data . transition  =  extend ( { } ,  data ) ) 
154154 // handle transition mode 
155155 if  ( mode  ===  'out-in' )  { 
156156 // return placeholder node and queue update when leave finishes 
@@ -161,8 +161,8 @@ export default {
161161 } ,  key ) 
162162 return  placeholder ( h ,  rawChild ) 
163163 }  else  if  ( mode  ===  'in-out' )  { 
164-  var  delayedLeave 
165-  var  performLeave  =  ( )  =>  {  delayedLeave ( )  } 
164+  let  delayedLeave 
165+  const  performLeave  =  ( )  =>  {  delayedLeave ( )  } 
166166 mergeVNodeHook ( data ,  'afterEnter' ,  performLeave ,  key ) 
167167 mergeVNodeHook ( data ,  'enterCancelled' ,  performLeave ,  key ) 
168168 mergeVNodeHook ( oldData ,  'delayLeave' ,  leave  =>  { 
0 commit comments