FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

tsickle should emit goog.reflect.objectProperty for property names passed to __rest tslib helper · Issue #1047 · angular/tsickle · GitHub

This repository was archived by the owner on May 22, 2025. It is now read-only.

Repository navigation

This repository was archived by the owner on May 22, 2025. It is now read-only.

tsickle should emit goog.reflect.objectProperty for property names passed to __rest tslib helper #1047

Description

rest destructuring assignments are not safe for closure compiler because tsc/tsickle emits property names as quoted strings. It looks like it should be pretty simple to apply goog.reflect.objectProperty here

Example Input:

const input = {x: 1, y: 2, z: 3};
const {x, ...rest} = input;

Current Emit:

const input = { x: 1, y: 2, z: 3 };
const { x } = input, rest = __rest(input, ["x"]);

Proposed Emit:

const input = { x: 1, y: 2, z: 3 };
const { x } = input, rest = __rest(input, [goog.reflect.objectProperty("x", input)]);

Related: #241
This probably applies to other emit too

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL