-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptInfrastructureIssue relates to TypeScript team infrastructureIssue relates to TypeScript team infrastructure
Description
Run:
gulp runtests-browser --t='fourslash/commentsClassMembers.ts' --browser=chromeExpected: 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.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptInfrastructureIssue relates to TypeScript team infrastructureIssue relates to TypeScript team infrastructure