diff --git a/documentation/docs/98-reference/30-compiler-errors.md b/documentation/docs/98-reference/30-compiler-errors.md index b1d2c1161f..40b9b33d58 100644 --- a/documentation/docs/98-reference/30-compiler-errors.md +++ b/documentation/docs/98-reference/30-compiler-errors.md @@ -3,323 +3,483 @@ title: 'Compiler errors' generated: 'generated by process-messages/index.js' --- -## `animation_duplicate` +### `animation_duplicate` -> [!NOTE] An element can only have one 'animate' directive +``` +An element can only have one 'animate' directive +``` -## `animation_invalid_placement` +### `animation_invalid_placement` -> [!NOTE] An element that uses the 'animate:' directive must be the only child of a keyed '{#each ...}' block +``` +An element that uses the `animate:` directive must be the only child of a keyed `{#each ...}` block +``` -## `animation_missing_key` +### `animation_missing_key` -> [!NOTE] An element that uses the 'animate:' directive must be the only child of a keyed '{#each ...}' block. Did you forget to add a key to your each block? +``` +An element that uses the `animate:` directive must be the only child of a keyed `{#each ...}` block. Did you forget to add a key to your each block? +``` -## `attribute_contenteditable_dynamic` +### `attribute_contenteditable_dynamic` -> [!NOTE] 'contenteditable' attribute cannot be dynamic if element uses two-way binding +``` +'contenteditable' attribute cannot be dynamic if element uses two-way binding +``` -## `attribute_contenteditable_missing` +### `attribute_contenteditable_missing` -> [!NOTE] 'contenteditable' attribute is required for textContent, innerHTML and innerText two-way bindings +``` +'contenteditable' attribute is required for textContent, innerHTML and innerText two-way bindings +``` -## `attribute_duplicate` +### `attribute_duplicate` -> [!NOTE] Attributes need to be unique +``` +Attributes need to be unique +``` -## `attribute_empty_shorthand` +### `attribute_empty_shorthand` -> [!NOTE] Attribute shorthand cannot be empty +``` +Attribute shorthand cannot be empty +``` -## `attribute_invalid_event_handler` +### `attribute_invalid_event_handler` -> [!NOTE] Event attribute must be a JavaScript expression, not a string +``` +Event attribute must be a JavaScript expression, not a string +``` -## `attribute_invalid_multiple` +### `attribute_invalid_multiple` -> [!NOTE] 'multiple' attribute must be static if select uses two-way binding +``` +'multiple' attribute must be static if select uses two-way binding +``` -## `attribute_invalid_name` +### `attribute_invalid_name` -> [!NOTE] '%name%' is not a valid attribute name +``` +'%name%' is not a valid attribute name +``` -## `attribute_invalid_sequence_expression` +### `attribute_invalid_sequence_expression` -> [!NOTE] Sequence expressions are not allowed as attribute/directive values in runes mode, unless wrapped in parentheses +``` +Sequence expressions are not allowed as attribute/directive values in runes mode, unless wrapped in parentheses +``` -## `attribute_invalid_type` +### `attribute_invalid_type` -> [!NOTE] 'type' attribute must be a static text value if input uses two-way binding +``` +'type' attribute must be a static text value if input uses two-way binding +``` -## `attribute_unquoted_sequence` +### `attribute_unquoted_sequence` -> [!NOTE] Attribute values containing '{...}' must be enclosed in quote marks, unless the value only contains the expression +``` +Attribute values containing `{...}` must be enclosed in quote marks, unless the value only contains the expression +``` -## `bind_invalid_expression` +### `bind_invalid_expression` -> [!NOTE] Can only bind to an Identifier or MemberExpression +``` +Can only bind to an Identifier or MemberExpression +``` -## `bind_invalid_name` +### `bind_invalid_name` -> [!NOTE] 'bind:%name%' is not a valid binding +``` +`bind:%name%` is not a valid binding +``` -> [!NOTE] 'bind:%name%' is not a valid binding. %explanation% +``` +`bind:%name%` is not a valid binding. %explanation% +``` -## `bind_invalid_target` +### `bind_invalid_target` -> [!NOTE] 'bind:%name%' can only be used with %elements% +``` +`bind:%name%` can only be used with %elements% +``` -## `bind_invalid_value` +### `bind_invalid_value` -> [!NOTE] Can only bind to state or props +``` +Can only bind to state or props +``` -## `bindable_invalid_location` +### `bindable_invalid_location` -> [!NOTE] '$bindable()' can only be used inside a '$props()' declaration +``` +`$bindable()` can only be used inside a `$props()` declaration +``` -## `block_duplicate_clause` +### `block_duplicate_clause` -> [!NOTE] %name% cannot appear more than once within a block +``` +%name% cannot appear more than once within a block +``` -## `block_invalid_continuation_placement` +### `block_invalid_continuation_placement` -> [!NOTE] {:...} block is invalid at this position (did you forget to close the preceeding element or block?) +``` +{:...} block is invalid at this position (did you forget to close the preceeding element or block?) +``` -## `block_invalid_elseif` +### `block_invalid_elseif` -> [!NOTE] 'elseif' should be 'else if' +``` +'elseif' should be 'else if' +``` -## `block_invalid_placement` +### `block_invalid_placement` -> [!NOTE] {#%name% ...} block cannot be %location% +``` +{#%name% ...} block cannot be %location% +``` -## `block_unclosed` +### `block_unclosed` -> [!NOTE] Block was left open +``` +Block was left open +``` -## `block_unexpected_character` +### `block_unexpected_character` -> [!NOTE] Expected a '%character%' character immediately following the opening bracket +``` +Expected a `%character%` character immediately following the opening bracket +``` -## `block_unexpected_close` +### `block_unexpected_close` -> [!NOTE] Unexpected block closing tag +``` +Unexpected block closing tag +``` -## `component_invalid_directive` +### `component_invalid_directive` -> [!NOTE] This type of directive is not valid on components +``` +This type of directive is not valid on components +``` -## `const_tag_cycle` +### `const_tag_cycle` -> [!NOTE] Cyclical dependency detected: %cycle% +``` +Cyclical dependency detected: %cycle% +``` -## `const_tag_invalid_expression` +### `const_tag_invalid_expression` -> [!NOTE] {@const ...} must consist of a single variable declaration +``` +{@const ...} must consist of a single variable declaration +``` -## `const_tag_invalid_placement` +### `const_tag_invalid_placement` -> [!NOTE] '{@const}' must be the immediate child of '{#snippet}', '{#if}', '{:else if}', '{:else}', '{#each}', '{:then}', '{:catch}', '\' or '\' +``` +`{@const}` must be the immediate child of `{#snippet}`, `{#if}`, `{:else if}`, `{:else}`, `{#each}`, `{:then}`, `{:catch}`, `` or `` +``` -## `constant_assignment` +### `constant_assignment` -> [!NOTE] Cannot assign to %thing% +``` +Cannot assign to %thing% +``` -## `constant_binding` +### `constant_binding` -> [!NOTE] Cannot bind to %thing% +``` +Cannot bind to %thing% +``` -## `css_empty_declaration` +### `css_empty_declaration` -> [!NOTE] Declaration cannot be empty +``` +Declaration cannot be empty +``` -## `css_expected_identifier` +### `css_expected_identifier` -> [!NOTE] Expected a valid CSS identifier +``` +Expected a valid CSS identifier +``` -## `css_global_block_invalid_combinator` +### `css_global_block_invalid_combinator` -> [!NOTE] A ':global' selector cannot follow a '%name%' combinator +``` +A `:global` selector cannot follow a `%name%` combinator +``` -## `css_global_block_invalid_declaration` +### `css_global_block_invalid_declaration` -> [!NOTE] A top-level ':global {...}' block can only contain rules, not declarations +``` +A top-level `:global {...}` block can only contain rules, not declarations +``` -## `css_global_block_invalid_list` +### `css_global_block_invalid_list` -> [!NOTE] A ':global' selector cannot be part of a selector list with more than one item +``` +A `:global` selector cannot be part of a selector list with more than one item +``` -## `css_global_block_invalid_modifier` +### `css_global_block_invalid_modifier` -> [!NOTE] A ':global' selector cannot modify an existing selector +``` +A `:global` selector cannot modify an existing selector +``` -## `css_global_block_invalid_modifier_start` +### `css_global_block_invalid_modifier_start` -> [!NOTE] A ':global' selector can only be modified if it is a descendant of other selectors +``` +A `:global` selector can only be modified if it is a descendant of other selectors +``` -## `css_global_invalid_placement` +### `css_global_invalid_placement` -> [!NOTE] ':global(...)' can be at the start or end of a selector sequence, but not in the middle +``` +`:global(...)` can be at the start or end of a selector sequence, but not in the middle +``` -## `css_global_invalid_selector` +### `css_global_invalid_selector` -> [!NOTE] ':global(...)' must contain exactly one selector +``` +`:global(...)` must contain exactly one selector +``` -## `css_global_invalid_selector_list` +### `css_global_invalid_selector_list` -> [!NOTE] ':global(...)' must not contain type or universal selectors when used in a compound selector +``` +`:global(...)` must not contain type or universal selectors when used in a compound selector +``` -## `css_nesting_selector_invalid_placement` +### `css_nesting_selector_invalid_placement` -> [!NOTE] Nesting selectors can only be used inside a rule or as the first selector inside a lone ':global(...)' +``` +Nesting selectors can only be used inside a rule or as the first selector inside a lone `:global(...)` +``` -## `css_selector_invalid` +### `css_selector_invalid` -> [!NOTE] Invalid selector +``` +Invalid selector +``` -## `css_type_selector_invalid_placement` +### `css_type_selector_invalid_placement` -> [!NOTE] ':global(...)' must not be followed by a type selector +``` +`:global(...)` must not be followed by a type selector +``` -## `debug_tag_invalid_arguments` +### `debug_tag_invalid_arguments` -> [!NOTE] {@debug ...} arguments must be identifiers, not arbitrary expressions +``` +{@debug ...} arguments must be identifiers, not arbitrary expressions +``` -## `declaration_duplicate` +### `declaration_duplicate` -> [!NOTE] '%name%' has already been declared +``` +`%name%` has already been declared +``` -## `declaration_duplicate_module_import` +### `declaration_duplicate_module_import` -> [!NOTE] Cannot declare a variable with the same name as an import inside '\