Microsoft/TypeScript

`Date.getVarDate()` function seems incorrectly defined

Open

#51.636 aberto em 24 de nov. de 2022

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)TypeScript (6.726 forks)batch import
BugDomain: lib.d.tsHelp Wanted

Métricas do repositório

Stars
 (48.455 stars)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (9 fundiu PRs em 30d)

Description

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;
}

Guia do colaborador