You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export const { propName: exportName } = objWithPropName (prop.key.name of propName: exportName pulls propName, whereas we should pull prop.value.name to ensure the presence of harden(exportName)) and
export const [ exportName1, … ] = array (declaration.id.type === 'ArrayPattern' is just skipped entirely)
The linked comment proposes a fix in the form of a pushDeclaredNames helper that handles default assignment and arbitrarily nested destructuring patterns, to be used in combination with post hoc verification of the style already employed for "should be followed by a call to 'harden'" complaints (i.e., collect all declarations in one phase and validate their conformance in a second phase).
The text was updated successfully, but these errors were encountered:
(Originally posted by @gibson042 in #2387 (comment) )
Non-comprehensive list:
export const { propName: exportName } = objWithPropName
(prop.key.name
ofpropName: exportName
pulls propName, whereas we should pullprop.value.name
to ensure the presence ofharden(exportName)
) andexport const { name, ...rest } = obj
(object rest) andexport const { name, parent: { subName } }
(nested patterns) andexport const [ exportName1, … ] = array
(declaration.id.type === 'ArrayPattern'
is just skipped entirely)The linked comment proposes a fix in the form of a
pushDeclaredNames
helper that handles default assignment and arbitrarily nested destructuring patterns, to be used in combination with post hoc verification of the style already employed for "should be followed by a call to 'harden'" complaints (i.e., collect all declarations in one phase and validate their conformance in a second phase).The text was updated successfully, but these errors were encountered: