-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add VarDate interface and Date constructor overload for VT_DATE to lib.d.ts #9392
Comments
interface ActiveXObject {
new (s: string): any;
} so from the compiler perspective Contributions for better definitions for the WSH are always welcomed. the definitions should go in https://github.com/Microsoft/TypeScript/blob/master/src/lib/scripthost.d.ts |
@mhegazy I thought I was the last one using WSH (with or without Typescript)... |
:D i think there still a few more out there. the TS compiler uses them internally as well to support running on cscript. |
Are there any specific libraries that should be added? |
see |
TypeScript Version: 1.8.0 / nightly (2.0.0-dev.201xxxxx)
Automation host objects pass dates into Javascript as
VarDate
per the specification (copy found here) (section 2.2.2). These need to be wrapped in aDate
constructor before they can be used in Javascript.Such properties therefore cannot be typed as
Date
in declarations.Code
Proposal
Add the following to scripthost.d.ts:
and such date properties could use
VarDate
instead ofDate
.The text was updated successfully, but these errors were encountered: