Skip to content

Commit c98c5e4

Browse files
committed
bump is-reference@1.2.1 + fix types
1 parent 59acd4b commit c98c5e4

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/compiler/compile/nodes/shared/Context.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { x } from 'code-red';
2-
import { Node, Identifier, RestElement, Property } from 'estree';
2+
import { Node, Identifier } from 'estree';
33

44
export interface Context {
55
key: Identifier;
@@ -34,12 +34,10 @@ export function unpack_destructuring(contexts: Context[], node: Node, modifier:
3434
const used_properties = [];
3535

3636
node.properties.forEach((property) => {
37-
const props: (RestElement | Property) = (property as any);
38-
39-
if (props.type === 'RestElement') {
37+
if (property.type === 'RestElement') {
4038
unpack_destructuring(
4139
contexts,
42-
props.argument,
40+
property.argument,
4341
node => x`@object_without_properties(${modifier(node)}, [${used_properties}])` as Node
4442
);
4543
} else {

0 commit comments

Comments
 (0)