Skip to content

calls to tslib __setFunctionName fail on Cobalt 9 #214

@sjamesr

Description

@sjamesr

We've observed new behavior after upgrading our code to TypeScript 5.0. Specifically, TS5.0 emits calls to a new tslib helper function __setFunctionName. This in turn calls Object.defineProperty(x, "name", ...) on the class, which seems to fail on Cobalt 9:

          TypeError: can't redefine non-configurable property 'name' in [object HTMLScriptElement] (line 76)

We're not sure whether this is an issue with tslib, TS5.0 or with the calling code (in our case I think it's a Jasmine test). I'd be grateful for any guidance the tslib team could provide.

Metadata

Metadata

Assignees

No one assigned

    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