Skip to content

[SSR v2] add support for computed keys in wire config #4827

Open
@divmain

Description

@divmain

See this thread. After #4807 is merged, the SSR compiler will have almost full support for wire adapters. However, this PR does not include support for computed keys in wire config. Instead, if non-identifiers are found for keys, an error is thrown during compilation.

Here is an example of that:

 @wire(getBar, { 
   ['computedStringLiteral']: '$prop', 
   [123n]: '$prop', 
   [321]: '$prop', 
   [null]: '$prop', 
   [undefined]: '$prop' 
 })

This issue should be considered fixed when an error "@wire config entry key must be an identifer" is no longer thrown during compilation of the above wire decorator, and the correct behavior from engine-* is reproduced in the SSR compiler.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions