ts-belt
ts-belt copied to clipboard
🔧 Fast, modern, and practical utility library for FP in TypeScript.
The `O.filter` function doesn't have an overload that takes type guards into account. The only definition that exists looks like this: ```ts export declare function filter(predicateFn: (value: A) => boolean):...
With existing typing, `D.set` will accept any value type with no complaints from TypeScript: ```ts const obj = { foo: 1 }; D.set(obj, 'foo', 'uh oh'); // wrong type, but...
Hi i'm getting the following error: from the following code: ```ts const getValue = (value: unknown) => { if (G.isDate(value)) return value.toISOString().split("T")[0]; if (G.isNumber(value)) return value.toString(); return value; }; ```...
I have some trouble using `D.get` and I'm unsure if this is a bug or if I'm misunderstanding the documentation. Here's a minimal example to show the issue I'm having...
Hi, I am using ts-belt in legacy code-base and there is this message in docs: ``` Adding noUncheckedIndexedAccess to your tsconfig.json is mandatory for the Option type! ``` Why it's...
Hi there! :) I was looking for something like lodash's `sortBy` with multiple accessors, e.g: ```typescript sortBy(users, [user => user.name, user => user.age]); ``` **Why?** I know this could be...
I was making interchangeable `Pos` and `Size`, and they work like ```ts Pos(1, 2) + Size(3, 4) // Pos(4, 6) Size(1, 2) + Pos(3, 4) // Size(4, 6) ``` but...
Seems that the Rescript team is going to remove Belt from the Rescript compiler and language([see](https://github.com/rescript-lang/rescript-compiler/pull/6467)), I suggest moving forward to rescript-core bindings, which is the new standard library in...