Conversation
|
You should be able to access the decorator through interface LitElementPropertyConfig {
type?: SimpleType | string;
attribute?: string | boolean;
node?: {
type?: Node;
attribute?: Node;
decorator?: CallExpression;
};
hasConverter?: boolean;
default?: unknown;
reflect?: boolean;
}So you would be able to check for |
|
i updated it, didn't realise you could access the typescript node there. remember this is based on 1.2.0 too FYI edit: it works, but i used |
cee845f to
91567b6
Compare
91567b6 to
66fd93f
Compare
|
|
fcdd20a to
cf0f1ca
Compare
|
i updated it. just wasn't aware what the meta node was so thanks for the explanation. i do wonder what'll happen when one day multiple decorators might become a thing in lit, though. maybe it should be an array rather than assuming there will always be just one "useful one" per property. |
this tries to do something along the lines of what #79 wanted i guess.
this bit is questionable:
to detect if
@internalPropertywas used. it is upto you if you want to introduce something in WCA so component members have an explicit flag when they use that decorator. this should work fine though since making a property not use attributes is close enough to being internal anyway.