Open
Description
Environment
mlly@1.7.4
node v22.13.0
Reproduction
> findExports(`export const foo: Handler<string, number> = function foo(){}`)
[
{
type: 'declaration',
declaration: 'const',
name: 'foo',
code: 'export const foo: Handler<string, number',
start: 0,
end: 40,
names: [ 'foo', 'number' ],
declarationType: 'const'
}
]
> findExportNames(`export const foo: Handler<string, number> = function foo(){}`)
[ 'foo', 'number' ]
>
Describe the bug
I ran into a case where mlly
is picking up an extra export name from a TypeScript generic argument. The comma appears to be the main suspect here.