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

Add some properties to ObjectPattern Property nodes
pull/1677/head
Rich Harris 7 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; start: number;
end: number; end: number;
type: 'Property'; type: 'Property';
kind: string;
shorthand: boolean;
key: Identifier; key: Identifier;
value: Context; value: Context;
}; };
@ -85,6 +87,8 @@ export default function readContext(parser: Parser) {
start, start,
end: value.end, end: value.end,
type: 'Property', type: 'Property',
kind: 'init',
shorthand: value.type === 'Identifier' && value.name === name,
key, key,
value value
}; };

Loading…
Cancel
Save