Skip to content

(foo as any) emits incorrectly if foo is imported using import { ... } from ... #4832

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
vilicvane opened this issue Sep 17, 2015 · 1 comment
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue High Priority

Comments

@vilicvane
Copy link

foo.ts

export function foo() { }

bar.ts

import { foo } from './foo';

(foo as any);

bar.js

var foo_1 = require('./foo');
foo;

(<any>foo) works correctly btw.

@vilicvane vilicvane changed the title (foo as any) emits incorrectly if foo is imported using import { ... } from .... (foo as any) emits incorrectly if foo is imported using import { ... } from ... Sep 17, 2015
@DanielRosenwasser DanielRosenwasser added the Bug A bug in TypeScript label Sep 17, 2015
@mhegazy mhegazy added this to the TypeScript 1.7 milestone Sep 17, 2015
RyanCavanaugh added a commit to RyanCavanaugh/TypeScript that referenced this issue Sep 29, 2015
@RyanCavanaugh RyanCavanaugh added the Fixed A PR has been merged for this issue label Sep 29, 2015
@RyanCavanaugh
Copy link
Member

Fixed in master branch. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue High Priority
Projects
None yet
Development

No branches or pull requests

4 participants