Currently, default-exported functions and classes must have an identifier because our FQN generation includes the declaration name.
// path/to/function.ts
export default function run() {} // FQN: path/to/run
// path/to/class.ts
export default class Thing {} // FQN: path/to/Thing
With barrel file support, however, the FQN can now be derived entirely from the resolved export path.
// path/to/run/index.ts
export default function execute() {} // FQN: path/to/run
In this case, the declaration name is ignored, making it unnecessary overhead. We should therefore also support anonymous default exports.
// path/to/run/index.ts
export default function() {} // FQN: path/to/run
Currently, default-exported functions and classes must have an identifier because our FQN generation includes the declaration name.
With barrel file support, however, the FQN can now be derived entirely from the resolved export path.
In this case, the declaration name is ignored, making it unnecessary overhead. We should therefore also support anonymous default exports.