Typing the Err generic of Result to be empty
Sorry if this is a basic Typescript question! Is it possible to type a function's output so that I can return
Result.err()
without any parameters? f.e. Solution:Jump to solution
unknown
, you can see Result.err()
returns Result<unknown>
(https://github.com/sapphiredev/utilities/blob/cc78f17390c7f3db08af92bf46a5a70a9c11dd5f/packages/result/src/lib/Result/Err.ts#L187-L202)2 Replies
Solution
unknown
, you can see Result.err()
returns Result<unknown>
(https://github.com/sapphiredev/utilities/blob/cc78f17390c7f3db08af92bf46a5a70a9c11dd5f/packages/result/src/lib/Result/Err.ts#L187-L202)thanks 💜