Skip to content

tryGetPerformanceHooks throws on Stackblitz with ts 5.5.3  #59296

Closed
@JeanMeche

Description

@JeanMeche

🔎 Search Terms

typescript
tryGetPerformanceHooks
stackblitz

🕗 Version & Regression Information

When running an Angular project on stackblitz (on the old runtime, not Webcontainers), typescript.js throws

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'timeOrigin')
    at tryGetPerformanceHooks (typescript.js:5266:27)

This happens on 5.5.3, but downgrading to 5.4 fixes the issue.

The typescript code probably isn't defensive enough depending on the runtime.

⏯ Playground Link

https://stackblitz.com/edit/angular-next-mqukjf?file=src%2Fmain.ts

💻 Code

No response

🙁 Actual behavior

Throws when running TS 5.5.3

🙂 Expected behavior

Should run fine as it did with TS 5.4

Additional information about the issue

No response

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