mobily / ts-belt

🔧 Fast, modern, and practical utility library for FP in TypeScript.
https://mobily.github.io/ts-belt
MIT License
1.11k stars 31 forks source link

Looks like parameters type definition of `F.defaultTo` should be swapped #29

Closed leviathan-n closed 2 years ago

leviathan-n commented 2 years ago
F.defaultTo(1, 2) // got 1

but the type definition is that

/** Returns a default value if `value` is nullable. */
export declare function defaultTo<T>(defaultValue: NonNullable<T>, value: T | null | undefined): NonNullable<T>;

version: 3.11.0

mobily commented 2 years ago

@leviathan-n oops, sorry, clearly my mistake 🙈 fixed in v3.12.0