neverthrow icon indicating copy to clipboard operation
neverthrow copied to clipboard

Enormous declaration files that hang everything since 5.1.0

Open lmcsu opened this issue 1 year ago • 2 comments

I want to re-export the combine functions like this

import { Result } from 'neverthrow';
export function combine<T extends Result<unknown, unknown>[]>(resultList: T) {
    return Result.combine(resultList);
}

It works fine, but the d.ts file becomes so huge that it entirely hangs the IDE and the typescript compiler, so it's impossible to use that declaration file in any other project.

I don't know why that happens, maybe it's a tsc issue or something else, but it was working fine before version 5.1.0.

image

lmcsu avatar Nov 07 '22 10:11 lmcsu

This is due to the recursive nature of the generic types inside of this project since https://github.com/supermacro/neverthrow/releases/tag/v5.1.0

@lmcsu Are you still facing this issue / did you find a workaround?

supermacro avatar Dec 11 '22 18:12 supermacro

@supermacro still facing, found no workaround, still using 5.0.1 ☹️

lmcsu avatar Dec 13 '22 07:12 lmcsu