mirror of https://github.com/sveltejs/svelte
parent
9df2243784
commit
d0c0fbcef4
@ -0,0 +1,7 @@
|
|||||||
|
export default function visitTransition ( generator, block, state, node, attribute ) {
|
||||||
|
( attribute.intro ? block.intros : block.outros ).push({
|
||||||
|
node: state.name,
|
||||||
|
transition: attribute.name,
|
||||||
|
params: block.contextualise( attribute.expression ).snippet
|
||||||
|
});
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
import checkForDupes from '../utils/checkForDupes.js';
|
||||||
|
import checkForComputedKeys from '../utils/checkForComputedKeys.js';
|
||||||
|
|
||||||
|
export default function transitions ( validator, prop ) {
|
||||||
|
if ( prop.value.type !== 'ObjectExpression' ) {
|
||||||
|
validator.error( `The 'transitions' property must be an object literal`, prop.start );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
checkForDupes( validator, prop.value.properties );
|
||||||
|
checkForComputedKeys( validator, prop.value.properties );
|
||||||
|
|
||||||
|
prop.value.properties.forEach( () => {
|
||||||
|
// TODO probably some validation that can happen here...
|
||||||
|
// checking for use of `this` etc?
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in new issue