Skip to content
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

prototype property missing in lib.d.ts #1282

Closed
vvakame opened this issue Nov 26, 2014 · 5 comments · Fixed by #1317
Closed

prototype property missing in lib.d.ts #1282

vvakame opened this issue Nov 26, 2014 · 5 comments · Fixed by #1317
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

Comments

@vvakame
Copy link
Contributor

vvakame commented Nov 26, 2014

@vvakame
Copy link
Contributor Author

vvakame commented Nov 26, 2014

I think following code is valid. but current master/HEAD tsc report an unexpected error.

var obj: RegExp | Date;
if(obj instanceof Date) {
    obj.getTime();
} else if(obj instanceof RegExp) {
    // error TS2339: Property 'test' does not exist on type 'RegExp | Date'.
    obj.test(".*");
}

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Revisit An issue worth coming back to Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Nov 26, 2014
@RyanCavanaugh
Copy link
Member

Need to look at this when we revisit lib.d.ts

@vvakame
Copy link
Contributor Author

vvakame commented Nov 27, 2014

#1283

@mhegazy
Copy link
Contributor

mhegazy commented Nov 30, 2014

@vvakame PR would be appreciated. this part of the library is hand authored.

@vvakame
Copy link
Contributor Author

vvakame commented Dec 1, 2014

@mhegazy I was send a PR! 😉

@RyanCavanaugh RyanCavanaugh added Fixed A PR has been merged for this issue and removed Revisit An issue worth coming back to labels Dec 1, 2014
@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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants