Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Performance framework makes fourslash tests fail in runtests-browser #9954

Copy link
Copy link
@sandersn

Description

@sandersn
Issue body actions

Run:

gulp runtests-browser --t='fourslash/commentsClassMembers.ts' --browser=chrome

Expected: the test passes

Actual: "TypeError: Illegal invocation at getCompletionData (bundle.js:54363)"

This line is a call to timestamp in performance.ts

In performance.ts, changing this line from

    export const timestamp = typeof performance !== "undefined" && performance.now ? performance.now : Date.now ? Date.now : () => +(new Date());
     export const timestamp = () => Date.now();

fixes the bug. Searching indicates that this error happens when you try to call an function without providing the expected this, like performance.now or Date.now. Node and Chrome are OK with ripping off Date.now, so I suspect it's performance.now.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptA bug in TypeScriptInfrastructureIssue relates to TypeScript team infrastructureIssue relates to TypeScript team infrastructure

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.