-
Notifications
You must be signed in to change notification settings - Fork 8
Labels
Svelte V2Issue related to Svelte V2 componentsIssue related to Svelte V2 componentsSvelte V3Issue related to Svelte V3 componentsIssue related to Svelte V3 componentsenhancementNew feature or requestNew feature or request
Milestone
Description
Event name is not parsed correct if fired with identifier instead string constant
import { createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();
const CLOSE_EVENT_NAME = 'modalWasClosed';
dispatch(CLOSE_EVENT_NAME);
Actual result
{
"events": [
{
"name": "****unhandled-event-name****"
}
]
}
Expected result
{
"events": [
{
"name": "click"
}
]
}
UPD. At 4.0.0 point this issue are partially fixed.
- Support the top-level plain constants (
EVENT_MODAL_CLOSE
) - Support the top-level object-level constants (
EVENT.MODAL.CLOSE
) - Support the top-level object-level constants with accessing by index getter (
EVENT['MODAL']['CLOSE']
). Actually, I'm not sure that this are required
Metadata
Metadata
Assignees
Labels
Svelte V2Issue related to Svelte V2 componentsIssue related to Svelte V2 componentsSvelte V3Issue related to Svelte V3 componentsIssue related to Svelte V3 componentsenhancementNew feature or requestNew feature or request