@fable-org/fable-library-ts 2.0.0-beta.2 → 2.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/FSharp.Core.ts +2 -1
- package/Result.ts +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
+
## 2.0.0-beta.3 - 2025-03-14
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
* [JS/TS] Make `nullArgCheck` report the same error message as on .NET (by @MangelMaxime)
|
|
15
|
+
|
|
10
16
|
## 2.0.0-beta.2 - 2025-03-03
|
|
11
17
|
|
|
12
18
|
* [JS/TS] Fix #4049: decimal/bigint to integer conversion checks (by @ncave)
|
package/FSharp.Core.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { int32 } from "./Int32.js";
|
|
|
3
3
|
import { HashIdentity_Structural, ComparisonIdentity_Structural } from "./FSharp.Collections.js";
|
|
4
4
|
import { value as value_1, Nullable, Option } from "./Option.js";
|
|
5
5
|
import { FSharpChoice$2_$union, FSharpChoice$2_Choice2Of2, FSharpChoice$2_Choice1Of2 } from "./Choice.js";
|
|
6
|
+
import { concat } from "./String.js";
|
|
6
7
|
import { StringBuilder, StringBuilder__Append_Z721C83C5 } from "./System.Text.js";
|
|
7
8
|
|
|
8
9
|
export const LanguagePrimitives_GenericEqualityComparer: any = {
|
|
@@ -159,7 +160,7 @@ export function Operators_NullV<T extends any>(): Nullable<T> {
|
|
|
159
160
|
|
|
160
161
|
export function Operators_NullArgCheck<T>(argumentName: string, value: T): T {
|
|
161
162
|
if (equals(value, defaultOf())) {
|
|
162
|
-
throw new Error(argumentName);
|
|
163
|
+
throw new Error(concat("Value cannot be null. (Parameter \'", argumentName, ..."\')"));
|
|
163
164
|
}
|
|
164
165
|
else {
|
|
165
166
|
return value;
|
package/Result.ts
CHANGED
|
@@ -18,7 +18,7 @@ export function FSharpResult$2_Ok<T, TError>(ResultValue: T) {
|
|
|
18
18
|
return new FSharpResult$2<T, TError, 0>(0, [ResultValue]);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export function FSharpResult$2_Error
|
|
21
|
+
export function FSharpResult$2_Error$<T, TError>(ErrorValue: TError) {
|
|
22
22
|
return new FSharpResult$2<T, TError, 1>(1, [ErrorValue]);
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -40,7 +40,7 @@ export function Result_Map<a, b, c>(mapping: ((arg0: a) => b), result: FSharpRes
|
|
|
40
40
|
return FSharpResult$2_Ok<b, c>(mapping(result.fields[0] as any));
|
|
41
41
|
}
|
|
42
42
|
else {
|
|
43
|
-
return FSharpResult$2_Error
|
|
43
|
+
return FSharpResult$2_Error$<b, c>(result.fields[0] as any);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -49,7 +49,7 @@ export function Result_MapError<a, b, c>(mapping: ((arg0: a) => b), result: FSha
|
|
|
49
49
|
return FSharpResult$2_Ok<c, b>(result.fields[0] as any);
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
|
-
return FSharpResult$2_Error
|
|
52
|
+
return FSharpResult$2_Error$<c, b>(mapping(result.fields[0] as any));
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -58,7 +58,7 @@ export function Result_Bind<a, b, c>(binder: ((arg0: a) => FSharpResult$2_$union
|
|
|
58
58
|
return binder(result.fields[0] as any);
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
61
|
-
return FSharpResult$2_Error
|
|
61
|
+
return FSharpResult$2_Error$<b, c>(result.fields[0] as any);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
5
|
"name": "@fable-org/fable-library-ts",
|
|
6
|
-
"version": "2.0.0-beta.
|
|
6
|
+
"version": "2.0.0-beta.3",
|
|
7
7
|
"description": "Core library used by F# projects compiled with fable.io",
|
|
8
8
|
"author": "Fable Contributors",
|
|
9
9
|
"license": "MIT",
|