-
Notifications
You must be signed in to change notification settings - Fork 426
Open
Labels
Description
In the regular compiler, we disallow various forms of invalid decorator usage. The following validation should be added to the SSR compiler:
- Only
api,track, andwirecan be used as decorators.@foo propis invalid.
- The decorators cannot be imported and renamed.
import { api as API } from "lwc"is invalid.
- Other functions called
api,wire, ortrackcannot be used as decorators.const api = () => {}; ... @api propis invalid.
- The decorators cannot be called as regular functions.
import { api } from "lwc"; ... api()is invalid.
- Other functions called
api,wire, ortrackcan be used as regular functions.const api = () => {}; api();is valid.