Open wjhsf opened 1 week ago
In the regular compiler, we disallow various forms of invalid decorator usage. The following validation should be added to the SSR compiler:
api
track
wire
@foo prop
import { api as API } from "lwc"
const api = () => {}; ... @api prop
import { api } from "lwc"; ... api()
const api = () => {}; api();
This issue has been linked to a new work item: W-17264833
In the regular compiler, we disallow various forms of invalid decorator usage. The following validation should be added to the SSR compiler:
api
,track
, andwire
can be used as decorators.@foo prop
is invalid.import { api as API } from "lwc"
is invalid.api
,wire
, ortrack
cannot be used as decorators.const api = () => {}; ... @api prop
is invalid.import { api } from "lwc"; ... api()
is invalid.api
,wire
, ortrack
can be used as regular functions.const api = () => {}; api();
is valid.