Skip to content

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

@vilicvane

Description

@vilicvane

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.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueHigh Priority

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions