Skip to content

WScript variable declaration in lib.d.ts is missing some members #2540

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

Closed
zspitz opened this issue Mar 29, 2015 · 5 comments
Closed

WScript variable declaration in lib.d.ts is missing some members #2540

zspitz opened this issue Mar 29, 2015 · 5 comments
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this

Comments

@zspitz
Copy link
Contributor

zspitz commented Mar 29, 2015

The current declaration for the WScript object is missing some members:

interface ITextReader {
    //incomplete
    Read(characters: number): string;
    ReadAll(): string;
    Close(): void;
}

declare var WScript: {
    Echo(s: any): void;
    StdErr: ITextWriter;
    StdOut: ITextWriter;
    Arguments: { length: number; Item(n: number): string; };
    ScriptFullName: string;
    Quit(exitCode?: number): number;

    //missing members:
    BuildVersion: number;
    FullName: string,
    Interactive: boolean;
    Name: string;
    Path: string;
    StdInL ITextReader;
    Version: string;
    ConnectObject(objEventSource: any, strPrefix: string): void;
    CreateObject(strProgID: string, strPrefix?: string): any;
    DisconnectObject(obj: any): void;
    GetObject(strPathname: string, strProgID?: string, strPrefix: string): any;
    Sleep(intTime: number): void;
}
@ghost
Copy link

ghost commented Mar 29, 2015

@zspitz, would be really awesome if you add language name after opening ``` for syntax highlighting, so it will look like:

// used ```typescript
var blah = {
  a: 'A',
  b: function() { return undefined; }
};

Check out the list of supported languages by GitHub markdown parser: https://github.com/github/linguist/blob/master/lib/linguist/languages.yml.

@zspitz
Copy link
Contributor Author

zspitz commented Mar 29, 2015

@jasonwilliams200OK Done, thanks.

@mhegazy
Copy link
Contributor

mhegazy commented Mar 29, 2015

A PR would be appreciated. the sources for WScript typings are in src\lib\scriptHost.d.ts

@mhegazy mhegazy added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this labels Mar 29, 2015
@mhegazy mhegazy added this to the TypeScript 1.5 milestone Mar 31, 2015
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Mar 31, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Mar 31, 2015

Fixed by #2560

@mhegazy mhegazy closed this as completed Mar 31, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Mar 31, 2015

thanks @zspitz !

@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

2 participants