@fable-org/fable-library-js 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.js +2 -1
- package/Result.d.ts +1 -1
- package/Result.js +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.js
CHANGED
|
@@ -2,6 +2,7 @@ import { disposeSafe, defaultOf, structuralHash, equals } from "./Util.js";
|
|
|
2
2
|
import { HashIdentity_Structural, ComparisonIdentity_Structural } from "./FSharp.Collections.js";
|
|
3
3
|
import { value as value_1 } from "./Option.js";
|
|
4
4
|
import { FSharpChoice$2_Choice2Of2, FSharpChoice$2_Choice1Of2 } from "./Choice.js";
|
|
5
|
+
import { concat } from "./String.js";
|
|
5
6
|
import { StringBuilder__Append_Z721C83C5 } from "./System.Text.js";
|
|
6
7
|
export const LanguagePrimitives_GenericEqualityComparer = {
|
|
7
8
|
"System.Collections.IEqualityComparer.Equals541DA560"(x, y) {
|
|
@@ -134,7 +135,7 @@ export function Operators_NullV() {
|
|
|
134
135
|
}
|
|
135
136
|
export function Operators_NullArgCheck(argumentName, value) {
|
|
136
137
|
if (equals(value, defaultOf())) {
|
|
137
|
-
throw new Error(argumentName);
|
|
138
|
+
throw new Error(concat("Value cannot be null. (Parameter \'", argumentName, ..."\')"));
|
|
138
139
|
}
|
|
139
140
|
else {
|
|
140
141
|
return value;
|
package/Result.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type FSharpResult$2_$cases<T, TError> = {
|
|
|
9
9
|
1: ["Error", [TError]];
|
|
10
10
|
};
|
|
11
11
|
export declare function FSharpResult$2_Ok<T, TError>(ResultValue: T): FSharpResult$2<T, TError, 0>;
|
|
12
|
-
export declare function FSharpResult$2_Error
|
|
12
|
+
export declare function FSharpResult$2_Error$<T, TError>(ErrorValue: TError): FSharpResult$2<T, TError, 1>;
|
|
13
13
|
export declare class FSharpResult$2<T, TError, Tag extends keyof FSharpResult$2_$cases<T, TError>> extends Union<Tag, FSharpResult$2_$cases<T, TError>[Tag][0]> {
|
|
14
14
|
readonly tag: Tag;
|
|
15
15
|
readonly fields: FSharpResult$2_$cases<T, TError>[Tag][1];
|
package/Result.js
CHANGED
|
@@ -6,7 +6,7 @@ import { some } from "./Option.js";
|
|
|
6
6
|
export function FSharpResult$2_Ok(ResultValue) {
|
|
7
7
|
return new FSharpResult$2(0, [ResultValue]);
|
|
8
8
|
}
|
|
9
|
-
export function FSharpResult$2_Error(ErrorValue) {
|
|
9
|
+
export function FSharpResult$2_Error$(ErrorValue) {
|
|
10
10
|
return new FSharpResult$2(1, [ErrorValue]);
|
|
11
11
|
}
|
|
12
12
|
export class FSharpResult$2 extends Union {
|
|
@@ -27,7 +27,7 @@ export function Result_Map(mapping, result) {
|
|
|
27
27
|
return FSharpResult$2_Ok(mapping(result.fields[0]));
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
|
-
return FSharpResult$2_Error(result.fields[0]);
|
|
30
|
+
return FSharpResult$2_Error$(result.fields[0]);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
export function Result_MapError(mapping, result) {
|
|
@@ -35,7 +35,7 @@ export function Result_MapError(mapping, result) {
|
|
|
35
35
|
return FSharpResult$2_Ok(result.fields[0]);
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
|
-
return FSharpResult$2_Error(mapping(result.fields[0]));
|
|
38
|
+
return FSharpResult$2_Error$(mapping(result.fields[0]));
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
export function Result_Bind(binder, result) {
|
|
@@ -43,7 +43,7 @@ export function Result_Bind(binder, result) {
|
|
|
43
43
|
return binder(result.fields[0]);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
|
-
return FSharpResult$2_Error(result.fields[0]);
|
|
46
|
+
return FSharpResult$2_Error$(result.fields[0]);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
export function Result_IsOk(result) {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
5
|
"name": "@fable-org/fable-library-js",
|
|
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",
|