Closed
Description
TypeScript Version: 3.8 and 3.9.2
This is a regression from 3.7.
Search Terms:
unique symbol, index signature
Code
This is a distilled code from a bigger codebase. The Op
is imported from Sequelize
import Op from './op';
export default function foo() {
return {
[Op.or]: [],
};
}
// op.ts
declare const Op: {
readonly or: unique symbol;
};
export default Op;
tsconfig.json
{
"compilerOptions": {
"outDir": "dist",
"target": "es5",
"module": "commonjs",
"declaration": true,
"strict": true,
"esModuleInterop": true
}
}
Expected behavior:
No Error
Actual behavior:
index.ts:3:25 - error TS4058: Return type of exported function has or is using name 'or' from external module "/Users/mohsen_azimi/Desktop/3.9-regression/op" but cannot be named.
3 export default function foo() {
~~~
Related Issues:
#9944