Add base class in lib.scripthost.d.ts for Automation objects #18407
Labels
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
In Discussion
Not yet reached consensus
Suggestion
An idea for TypeScript
Uh oh!
There was an error while loading. Please reload this page.
TypeScript Version: 2.5.0 / nightly (2.6.0-dev.20170902)
Code
This currently wouldn't compile, because of the
private constructor
in the base class; but pending resolution of #18283, it would be possible.This would prevent assigning structurally matching objects to the inheriting types:
and also prevent using
new
to create a new instance of the inheriting type:I've opened an issue to define similar behavior for
VarDate
andSafeArray<T>
inlib.scripthost.d.ts
. IfAutomationObject<T>
is defined, then it could be used inlib.scripthost.d.ts
as a base class for these types as well:The text was updated successfully, but these errors were encountered: