calls to tslib __setFunctionName fail on Cobalt 9
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the TypeScript 5.0-generated call to tslib's __setFunctionName on Cobalt 9 and inspect the reported Object.defineProperty failure. Check whether the failure originates in tslib, TypeScript 5.0, or the Jasmine test case mentioned in the issue. Done means identifying the responsible component and providing guidance or a confirmed compatibility fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100