@ -187,14 +187,17 @@ function validate_element(node, context) {
}
} else if ( attribute . type === 'TransitionDirective' ) {
const existing = /** @type {import('#compiler').TransitionDirective | null} */ (
attribute . intro ? in _transition : out _transition
( attribute . intro && in _transition ) || ( attribute . outro && out _transition )
) ;
if ( existing !== null ) {
if ( attribute . name === existing . name ) {
e . transition _duplicate ( attribute , attribute . name ) ;
if ( existing ) {
const a = existing . intro ? ( existing . outro ? 'transition' : 'in' ) : 'out' ;
const b = attribute . intro ? ( attribute . outro ? 'transition' : 'in' ) : 'out' ;
if ( a === b ) {
e . transition _duplicate ( attribute , a ) ;
} else {
e . transition _conflict ( attribute , attribute . name , existing . name ) ;
e . transition _conflict ( attribute , a , b ) ;
}
}
@ -205,7 +208,7 @@ function validate_element(node, context) {
let conflicting _passive _modifier = '' ;
for ( const modifier of attribute . modifiers ) {
if ( ! EventModifiers . includes ( modifier ) ) {
const list = ` ${ EventModifiers . slice ( 0 , 1 ) } or ${ EventModifiers . at ( - 1 ) } ` ;
const list = ` ${ EventModifiers . slice ( 0 , - 1 ) . join ( ', ' ) } or ${ EventModifiers . at ( - 1 ) } ` ;
e . invalid _event _modifier ( attribute , list ) ;
}
if ( modifier === 'passive' ) {
@ -451,7 +454,7 @@ const validation = {
if ( ! contenteditable ) {
e . missing _contenteditable _attribute ( node ) ;
} else if ( ! is _text _attribute ( contenteditable ) && contenteditable . value !== true ) {
e . dynamic _contenteditable _attribute ( nod e) ;
e . dynamic _contenteditable _attribute ( contenteditabl e) ;
}
}
} else {
@ -459,7 +462,7 @@ const validation = {
if ( match ) {
const property = binding _properties [ match ] ;
if ( ! property . valid _elements || property . valid _elements . includes ( parent . name ) ) {
e . bind _invalid _detailed ( node , node . name , ` Did you mean '${ match } '? ` ) ;
e . bind _invalid _detailed ( node , node . name , ` Did you mean '${ match } '? ` ) ;
}
}
e . bind _invalid ( node , node . name ) ;
@ -1026,6 +1029,8 @@ function validate_no_const_assignment(node, argument, scope, is_binding) {
// TODO have a more specific error message for assignments to things like `{:then foo}`
const thing = 'constant' ;
console . log ( binding ) ;
if ( is _binding ) {
e . invalid _binding ( node , thing ) ;
} else {