You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{TStringHash,IStringHash}from"./moduleA";constC_TYPE: TStringHash={};constC_INTF: IStringHash={};exportfunctiondoSome(stub: string,// ↓↓↓ No error due to explicitly specified type TStringHashviaType0: TStringHash=C_TYPE,viaInterface0: IStringHash=C_INTF,// ↓↓↓ TS4076: Parameter 'viaType1' of exported function has or is using name 'Hash' from external module "./src/moduleA" but cannot be named.viaType1=C_TYPE,viaInterface=C_INTF){console.log(viaType0,viaType1,viaInterface0,viaInterface);}
moduleC.ts
import{Hash,// ←←← Dubious decision. TS6133: 'Hash' is declared but its value is never read.TStringHash,IStringHash}from"./moduleA";constC_TYPE: TStringHash={};constC_INTF: IStringHash={};exportfunctiondoSome(stub: string,viaType0: TStringHash=C_TYPE,viaInterface0: IStringHash=C_INTF,// ↓↓↓ No error due to imported HashviaType1=C_TYPE,viaInterface=C_INTF){console.log(viaType0,viaType1,viaInterface0,viaInterface);}
Expected behavior:
No errors in moduleB.ts
Actual behavior:
Error in moduleB.ts: TS4076: Parameter 'viaType1' of exported function has or is using name 'Hash' from external module "./src/moduleA" but cannot be named.
TypeScript Version: 2.9.1
Problem is not reproduced in 3.0.0-dev.20180601
tsconfig
Code
moduleA.ts
moduleB.ts
moduleC.ts
Expected behavior:
No errors in moduleB.ts
Actual behavior:
Error in moduleB.ts:
TS4076: Parameter 'viaType1' of exported function has or is using name 'Hash' from external module "./src/moduleA" but cannot be named.
Related Issues: #24287
The text was updated successfully, but these errors were encountered: