Closed
Description
TypeScript Version: 2.2.1
Code
For a javascript project
a.js
:
export function abc( x, y ) { }
a.d.ts
:
export declare function abc(x: number, y: number): boolean;
b.js
import { abc } from './a'
Expected behavior:
Within both a.js
and b.js
, the type of abc
is (number, number) => boolean
Actual behavior:
Within a.js
, the type of abc
is (any, any) => void
Within b.js
, the type of abc
is (number, number) => boolean
The d.ts
file is not applied within a module itself, only when it is imported into other files