Merge pull request #1673 from UnwrittenFun/fix/missing-ObjectPattern-props

Add some properties to ObjectPattern Property nodes
pull/1677/head
Rich Harris 6 years ago committed by GitHub
commit a74abddcd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,6 +11,8 @@ type Property = {
start: number;
end: number;
type: 'Property';
kind: string;
shorthand: boolean;
key: Identifier;
value: Context;
};
@ -85,6 +87,8 @@ export default function readContext(parser: Parser) {
start,
end: value.end,
type: 'Property',
kind: 'init',
shorthand: value.type === 'Identifier' && value.name === name,
key,
value
};

Loading…
Cancel
Save