Microsoft/TypeScript

`Date.getVarDate()` function seems incorrectly defined

Open

#51,636 建立於 2022年11月24日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)TypeScript (6,726 fork)batch import
BugDomain: lib.d.tsHelp Wanted

倉庫指標

Star
 (48,455 star)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 9 個 PR)

描述

interface Date {
    getVarDate: () => VarDate;
}

https://contest-server.cs.uchicago.edu/ref/JavaScript/developer.mozilla.org/en-US/docs/Web/JavaScript/Microsoft_Extensions/Date.html

TypeScript has defined Date type to has a functional property getVarDate, but such function does not exist in the real Date instance. Looking at some API documents, the Date.getVarDate() is a non-standard method forActiveX. Therefore, I hope TypeScript to remove the functional property or change it like below:

interface Date {
    // no reason to be property assigned functional value
    getVarDate?(): VarDate;
}

貢獻者指南