Skip to content

Remove Date#getVarDate from scripthost lib - #64328

Draft
Ryan Cavanaugh (RyanCavanaugh) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-getvar-date-function
Draft

Ryan Cavanaugh (RyanCavanaugh) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-getvar-date-function

Conversation

Copilot AI commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

lib.scripthost.d.ts declared Date#getVarDate, but that method is not present on real Date instances. Referencing scripthost incorrectly allowed calls like:

/// <reference lib="scripthost" />

new Date().getVarDate();
  • Library surface

    • Removed getVarDate from the Script Host Date augmentation.
  • Regression coverage

    • Added a compiler test that verifies Date#getVarDate is rejected even when scripthost is referenced.
    • Updated affected diagnostic baselines for the reduced Date member count.

@typescript-automation typescript-automation Bot added For Milestone Bug PRs that fix a bug with a specific milestone labels Sep 18, 2026
Copilot AI linked an issue Sep 18, 2026 that may be closed by this pull request
@typescript-automation typescript-automation Bot added For Uncommitted Bug PR for untriaged, rejected, closed or missing bug and removed For Milestone Bug PRs that fix a bug with a specific milestone labels Sep 18, 2026
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix incorrectly defined Date.getVarDate() function Remove Date#getVarDate from scripthost lib Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Date.getVarDate() function seems incorrectly defined

2 participants