starlight-fsharp-oracle 0.1.0 → 0.1.2
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/dist/Extensions/StringBuilder.js +2 -5
- package/dist/Extensions/TextNode.js +29 -54
- package/dist/FSharp.Oracle.Schema/Schema.js +113 -218
- package/dist/Generate.js +33 -63
- package/dist/Helpers.js +1 -2
- package/dist/Plugin.js +17 -31
- package/dist/Render/Documentation.js +1 -2
- package/dist/Render/Entries.js +29 -34
- package/dist/Render/Pages.js +10 -19
- package/dist/Render/Primitives.js +19 -32
- package/dist/Themes.js +3 -5
- package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +57 -0
- package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js +105 -0
- package/dist/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +20 -0
- package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs +766 -0
- package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +232 -0
- package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +31 -0
- package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +20 -0
- package/dist/fable_modules/Thoth.Json.Core.0.9.0/Decode.fs +1592 -0
- package/dist/fable_modules/Thoth.Json.Core.0.9.0/Decode.fs.js +1417 -0
- package/dist/fable_modules/Thoth.Json.Core.0.9.0/DecoderCE.fs +106 -0
- package/dist/fable_modules/Thoth.Json.Core.0.9.0/DecoderCE.fs.js +63 -0
- package/dist/fable_modules/Thoth.Json.Core.0.9.0/Encode.fs +380 -0
- package/dist/fable_modules/Thoth.Json.Core.0.9.0/Encode.fs.js +289 -0
- package/dist/fable_modules/Thoth.Json.Core.0.9.0/Thoth.Json.Core.fableproj +37 -0
- package/dist/fable_modules/Thoth.Json.Core.0.9.0/Types.fs +76 -0
- package/dist/fable_modules/Thoth.Json.Core.0.9.0/Types.fs.js +37 -0
- package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Casing.fs +113 -0
- package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Casing.fs.js +173 -0
- package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Decode.fs +1153 -0
- package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Decode.fs.js +622 -0
- package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Domain.fs +91 -0
- package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Domain.fs.js +103 -0
- package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Encode.fs +893 -0
- package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Encode.fs.js +836 -0
- package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Prelude.fs +435 -0
- package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Prelude.fs.js +389 -0
- package/dist/fable_modules/Thoth.Json.Core.Auto.0.1.0/Thoth.Json.Core.Auto.fableproj +43 -0
- package/dist/fable_modules/Thoth.Json.JavaScript.0.5.0/Decode.fs +88 -0
- package/dist/fable_modules/Thoth.Json.JavaScript.0.5.0/Decode.fs.js +102 -0
- package/dist/fable_modules/Thoth.Json.JavaScript.0.5.0/Encode.fs +40 -0
- package/dist/fable_modules/Thoth.Json.JavaScript.0.5.0/Encode.fs.js +59 -0
- package/dist/fable_modules/Thoth.Json.JavaScript.0.5.0/Thoth.Json.JavaScript.fableproj +31 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Array.js +1347 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Async.js +134 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/AsyncBuilder.js +183 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/BigInt.js +306 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/BitConverter.js +138 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Boolean.js +22 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/CHANGELOG.md +191 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Char.js +202 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Choice.js +184 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/CollectionUtil.js +182 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/ConditionalWeakTable.js +21 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Date.js +755 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/DateOffset.js +261 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/DateOnly.js +124 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Decimal.js +236 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Double.js +47 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Encoding.js +185 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Event.js +93 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/FSharp.Collections.js +45 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/FSharp.Core.CompilerServices.js +27 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/FSharp.Core.js +156 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Global.js +29 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Guid.js +161 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Int32.js +135 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/List.js +1323 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Long.js +47 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/MailboxProcessor.js +94 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Map.js +1396 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/MapUtil.js +130 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/MutableMap.js +339 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/MutableSet.js +233 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Native.js +14 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Numeric.js +75 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Observable.js +113 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Option.js +104 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/README.md +3 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Random.js +172 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Range.js +45 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Reflection.js +460 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/RegExp.js +141 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Result.js +165 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Seq.js +1409 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Seq2.js +111 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Set.js +1788 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/String.js +649 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/System.Collections.Generic.js +333 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/System.Text.js +168 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/System.js +283 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/TimeOnly.js +122 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/TimeSpan.js +180 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Timer.js +67 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Types.js +198 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Unicode.13.0.0.js +4 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Uri.js +165 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/Util.js +792 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/big.d.ts +338 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/lib/big.js +825 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/package.json +24 -0
- package/dist/fable_modules/fable-library-js.5.0.0-rc.7/quotation.js +618 -0
- package/package.json +4 -5
- package/packages/FSharp.Oracle/XmlDoc.fs +12 -1
- package/packages/FSharp.Oracle/obj/Debug/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.fs +3 -0
- package/packages/FSharp.Oracle/obj/Debug/net10.0/FSharp.Oracle.AssemblyInfo.fs +17 -0
- package/packages/FSharp.Oracle/obj/Release/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.fs +3 -0
- package/packages/FSharp.Oracle/obj/Release/net10.0/FSharp.Oracle.AssemblyInfo.fs +17 -0
- package/packages/FSharp.Oracle.Schema/obj/Debug/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.fs +3 -0
- package/packages/FSharp.Oracle.Schema/obj/Debug/net10.0/FSharp.Oracle.Schema.AssemblyInfo.fs +17 -0
- package/packages/FSharp.Oracle.Schema/obj/Release/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.fs +3 -0
- package/packages/FSharp.Oracle.Schema/obj/Release/net10.0/FSharp.Oracle.Schema.AssemblyInfo.fs +17 -0
- package/oracle-bin/FSharp.Compiler.Service.dll +0 -0
- package/oracle-bin/FSharp.Core.dll +0 -0
- package/oracle-bin/FSharp.DependencyManager.Nuget.dll +0 -0
- package/oracle-bin/FSharp.Oracle.Schema.dll +0 -0
- package/oracle-bin/FSharp.Oracle.Schema.pdb +0 -0
- package/oracle-bin/FSharp.Oracle.Schema.xml +0 -219
- package/oracle-bin/Fable.Core.dll +0 -0
- package/oracle-bin/Oracle +0 -0
- package/oracle-bin/Oracle.deps.json +0 -280
- package/oracle-bin/Oracle.dll +0 -0
- package/oracle-bin/Oracle.pdb +0 -0
- package/oracle-bin/Oracle.runtimeconfig.json +0 -13
- package/oracle-bin/Oracle.xml +0 -111
- package/oracle-bin/Thoth.Json.Core.Auto.dll +0 -0
- package/oracle-bin/Thoth.Json.Core.dll +0 -0
- package/oracle-bin/Thoth.Json.System.Text.Json.dll +0 -0
- package/oracle-bin/cs/FSharp.Compiler.Service.resources.dll +0 -0
- package/oracle-bin/cs/FSharp.Core.resources.dll +0 -0
- package/oracle-bin/cs/FSharp.DependencyManager.Nuget.resources.dll +0 -0
- package/oracle-bin/de/FSharp.Compiler.Service.resources.dll +0 -0
- package/oracle-bin/de/FSharp.Core.resources.dll +0 -0
- package/oracle-bin/de/FSharp.DependencyManager.Nuget.resources.dll +0 -0
- package/oracle-bin/es/FSharp.Compiler.Service.resources.dll +0 -0
- package/oracle-bin/es/FSharp.Core.resources.dll +0 -0
- package/oracle-bin/es/FSharp.DependencyManager.Nuget.resources.dll +0 -0
- package/oracle-bin/fr/FSharp.Compiler.Service.resources.dll +0 -0
- package/oracle-bin/fr/FSharp.Core.resources.dll +0 -0
- package/oracle-bin/fr/FSharp.DependencyManager.Nuget.resources.dll +0 -0
- package/oracle-bin/it/FSharp.Compiler.Service.resources.dll +0 -0
- package/oracle-bin/it/FSharp.Core.resources.dll +0 -0
- package/oracle-bin/it/FSharp.DependencyManager.Nuget.resources.dll +0 -0
- package/oracle-bin/ja/FSharp.Compiler.Service.resources.dll +0 -0
- package/oracle-bin/ja/FSharp.Core.resources.dll +0 -0
- package/oracle-bin/ja/FSharp.DependencyManager.Nuget.resources.dll +0 -0
- package/oracle-bin/ko/FSharp.Compiler.Service.resources.dll +0 -0
- package/oracle-bin/ko/FSharp.Core.resources.dll +0 -0
- package/oracle-bin/ko/FSharp.DependencyManager.Nuget.resources.dll +0 -0
- package/oracle-bin/pl/FSharp.Compiler.Service.resources.dll +0 -0
- package/oracle-bin/pl/FSharp.Core.resources.dll +0 -0
- package/oracle-bin/pl/FSharp.DependencyManager.Nuget.resources.dll +0 -0
- package/oracle-bin/pt-BR/FSharp.Compiler.Service.resources.dll +0 -0
- package/oracle-bin/pt-BR/FSharp.Core.resources.dll +0 -0
- package/oracle-bin/pt-BR/FSharp.DependencyManager.Nuget.resources.dll +0 -0
- package/oracle-bin/ru/FSharp.Compiler.Service.resources.dll +0 -0
- package/oracle-bin/ru/FSharp.Core.resources.dll +0 -0
- package/oracle-bin/ru/FSharp.DependencyManager.Nuget.resources.dll +0 -0
- package/oracle-bin/tr/FSharp.Compiler.Service.resources.dll +0 -0
- package/oracle-bin/tr/FSharp.Core.resources.dll +0 -0
- package/oracle-bin/tr/FSharp.DependencyManager.Nuget.resources.dll +0 -0
- package/oracle-bin/zh-Hans/FSharp.Compiler.Service.resources.dll +0 -0
- package/oracle-bin/zh-Hans/FSharp.Core.resources.dll +0 -0
- package/oracle-bin/zh-Hans/FSharp.DependencyManager.Nuget.resources.dll +0 -0
- package/oracle-bin/zh-Hant/FSharp.Compiler.Service.resources.dll +0 -0
- package/oracle-bin/zh-Hant/FSharp.Core.resources.dll +0 -0
- package/oracle-bin/zh-Hant/FSharp.DependencyManager.Nuget.resources.dll +0 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { Union } from "./Types.js";
|
|
2
|
+
import { union_type } from "./Reflection.js";
|
|
3
|
+
import { some } from "./Option.js";
|
|
4
|
+
export function FSharpChoice$2_Choice1Of2(Item) {
|
|
5
|
+
return new FSharpChoice$2(0, [Item]);
|
|
6
|
+
}
|
|
7
|
+
export function FSharpChoice$2_Choice2Of2(Item) {
|
|
8
|
+
return new FSharpChoice$2(1, [Item]);
|
|
9
|
+
}
|
|
10
|
+
export class FSharpChoice$2 extends Union {
|
|
11
|
+
constructor(tag, fields) {
|
|
12
|
+
super();
|
|
13
|
+
this.tag = tag;
|
|
14
|
+
this.fields = fields;
|
|
15
|
+
}
|
|
16
|
+
cases() {
|
|
17
|
+
return ["Choice1Of2", "Choice2Of2"];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export function FSharpChoice$2_$reflection(gen0, gen1) {
|
|
21
|
+
return union_type("FSharp.Core.FSharpChoice`2", [gen0, gen1], FSharpChoice$2, () => [[["Item", gen0]], [["Item", gen1]]]);
|
|
22
|
+
}
|
|
23
|
+
export function FSharpChoice$3_Choice1Of3(Item) {
|
|
24
|
+
return new FSharpChoice$3(0, [Item]);
|
|
25
|
+
}
|
|
26
|
+
export function FSharpChoice$3_Choice2Of3(Item) {
|
|
27
|
+
return new FSharpChoice$3(1, [Item]);
|
|
28
|
+
}
|
|
29
|
+
export function FSharpChoice$3_Choice3Of3(Item) {
|
|
30
|
+
return new FSharpChoice$3(2, [Item]);
|
|
31
|
+
}
|
|
32
|
+
export class FSharpChoice$3 extends Union {
|
|
33
|
+
constructor(tag, fields) {
|
|
34
|
+
super();
|
|
35
|
+
this.tag = tag;
|
|
36
|
+
this.fields = fields;
|
|
37
|
+
}
|
|
38
|
+
cases() {
|
|
39
|
+
return ["Choice1Of3", "Choice2Of3", "Choice3Of3"];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export function FSharpChoice$3_$reflection(gen0, gen1, gen2) {
|
|
43
|
+
return union_type("FSharp.Core.FSharpChoice`3", [gen0, gen1, gen2], FSharpChoice$3, () => [[["Item", gen0]], [["Item", gen1]], [["Item", gen2]]]);
|
|
44
|
+
}
|
|
45
|
+
export function FSharpChoice$4_Choice1Of4(Item) {
|
|
46
|
+
return new FSharpChoice$4(0, [Item]);
|
|
47
|
+
}
|
|
48
|
+
export function FSharpChoice$4_Choice2Of4(Item) {
|
|
49
|
+
return new FSharpChoice$4(1, [Item]);
|
|
50
|
+
}
|
|
51
|
+
export function FSharpChoice$4_Choice3Of4(Item) {
|
|
52
|
+
return new FSharpChoice$4(2, [Item]);
|
|
53
|
+
}
|
|
54
|
+
export function FSharpChoice$4_Choice4Of4(Item) {
|
|
55
|
+
return new FSharpChoice$4(3, [Item]);
|
|
56
|
+
}
|
|
57
|
+
export class FSharpChoice$4 extends Union {
|
|
58
|
+
constructor(tag, fields) {
|
|
59
|
+
super();
|
|
60
|
+
this.tag = tag;
|
|
61
|
+
this.fields = fields;
|
|
62
|
+
}
|
|
63
|
+
cases() {
|
|
64
|
+
return ["Choice1Of4", "Choice2Of4", "Choice3Of4", "Choice4Of4"];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export function FSharpChoice$4_$reflection(gen0, gen1, gen2, gen3) {
|
|
68
|
+
return union_type("FSharp.Core.FSharpChoice`4", [gen0, gen1, gen2, gen3], FSharpChoice$4, () => [[["Item", gen0]], [["Item", gen1]], [["Item", gen2]], [["Item", gen3]]]);
|
|
69
|
+
}
|
|
70
|
+
export function FSharpChoice$5_Choice1Of5(Item) {
|
|
71
|
+
return new FSharpChoice$5(0, [Item]);
|
|
72
|
+
}
|
|
73
|
+
export function FSharpChoice$5_Choice2Of5(Item) {
|
|
74
|
+
return new FSharpChoice$5(1, [Item]);
|
|
75
|
+
}
|
|
76
|
+
export function FSharpChoice$5_Choice3Of5(Item) {
|
|
77
|
+
return new FSharpChoice$5(2, [Item]);
|
|
78
|
+
}
|
|
79
|
+
export function FSharpChoice$5_Choice4Of5(Item) {
|
|
80
|
+
return new FSharpChoice$5(3, [Item]);
|
|
81
|
+
}
|
|
82
|
+
export function FSharpChoice$5_Choice5Of5(Item) {
|
|
83
|
+
return new FSharpChoice$5(4, [Item]);
|
|
84
|
+
}
|
|
85
|
+
export class FSharpChoice$5 extends Union {
|
|
86
|
+
constructor(tag, fields) {
|
|
87
|
+
super();
|
|
88
|
+
this.tag = tag;
|
|
89
|
+
this.fields = fields;
|
|
90
|
+
}
|
|
91
|
+
cases() {
|
|
92
|
+
return ["Choice1Of5", "Choice2Of5", "Choice3Of5", "Choice4Of5", "Choice5Of5"];
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
export function FSharpChoice$5_$reflection(gen0, gen1, gen2, gen3, gen4) {
|
|
96
|
+
return union_type("FSharp.Core.FSharpChoice`5", [gen0, gen1, gen2, gen3, gen4], FSharpChoice$5, () => [[["Item", gen0]], [["Item", gen1]], [["Item", gen2]], [["Item", gen3]], [["Item", gen4]]]);
|
|
97
|
+
}
|
|
98
|
+
export function FSharpChoice$6_Choice1Of6(Item) {
|
|
99
|
+
return new FSharpChoice$6(0, [Item]);
|
|
100
|
+
}
|
|
101
|
+
export function FSharpChoice$6_Choice2Of6(Item) {
|
|
102
|
+
return new FSharpChoice$6(1, [Item]);
|
|
103
|
+
}
|
|
104
|
+
export function FSharpChoice$6_Choice3Of6(Item) {
|
|
105
|
+
return new FSharpChoice$6(2, [Item]);
|
|
106
|
+
}
|
|
107
|
+
export function FSharpChoice$6_Choice4Of6(Item) {
|
|
108
|
+
return new FSharpChoice$6(3, [Item]);
|
|
109
|
+
}
|
|
110
|
+
export function FSharpChoice$6_Choice5Of6(Item) {
|
|
111
|
+
return new FSharpChoice$6(4, [Item]);
|
|
112
|
+
}
|
|
113
|
+
export function FSharpChoice$6_Choice6Of6(Item) {
|
|
114
|
+
return new FSharpChoice$6(5, [Item]);
|
|
115
|
+
}
|
|
116
|
+
export class FSharpChoice$6 extends Union {
|
|
117
|
+
constructor(tag, fields) {
|
|
118
|
+
super();
|
|
119
|
+
this.tag = tag;
|
|
120
|
+
this.fields = fields;
|
|
121
|
+
}
|
|
122
|
+
cases() {
|
|
123
|
+
return ["Choice1Of6", "Choice2Of6", "Choice3Of6", "Choice4Of6", "Choice5Of6", "Choice6Of6"];
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
export function FSharpChoice$6_$reflection(gen0, gen1, gen2, gen3, gen4, gen5) {
|
|
127
|
+
return union_type("FSharp.Core.FSharpChoice`6", [gen0, gen1, gen2, gen3, gen4, gen5], FSharpChoice$6, () => [[["Item", gen0]], [["Item", gen1]], [["Item", gen2]], [["Item", gen3]], [["Item", gen4]], [["Item", gen5]]]);
|
|
128
|
+
}
|
|
129
|
+
export function FSharpChoice$7_Choice1Of7(Item) {
|
|
130
|
+
return new FSharpChoice$7(0, [Item]);
|
|
131
|
+
}
|
|
132
|
+
export function FSharpChoice$7_Choice2Of7(Item) {
|
|
133
|
+
return new FSharpChoice$7(1, [Item]);
|
|
134
|
+
}
|
|
135
|
+
export function FSharpChoice$7_Choice3Of7(Item) {
|
|
136
|
+
return new FSharpChoice$7(2, [Item]);
|
|
137
|
+
}
|
|
138
|
+
export function FSharpChoice$7_Choice4Of7(Item) {
|
|
139
|
+
return new FSharpChoice$7(3, [Item]);
|
|
140
|
+
}
|
|
141
|
+
export function FSharpChoice$7_Choice5Of7(Item) {
|
|
142
|
+
return new FSharpChoice$7(4, [Item]);
|
|
143
|
+
}
|
|
144
|
+
export function FSharpChoice$7_Choice6Of7(Item) {
|
|
145
|
+
return new FSharpChoice$7(5, [Item]);
|
|
146
|
+
}
|
|
147
|
+
export function FSharpChoice$7_Choice7Of7(Item) {
|
|
148
|
+
return new FSharpChoice$7(6, [Item]);
|
|
149
|
+
}
|
|
150
|
+
export class FSharpChoice$7 extends Union {
|
|
151
|
+
constructor(tag, fields) {
|
|
152
|
+
super();
|
|
153
|
+
this.tag = tag;
|
|
154
|
+
this.fields = fields;
|
|
155
|
+
}
|
|
156
|
+
cases() {
|
|
157
|
+
return ["Choice1Of7", "Choice2Of7", "Choice3Of7", "Choice4Of7", "Choice5Of7", "Choice6Of7", "Choice7Of7"];
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
export function FSharpChoice$7_$reflection(gen0, gen1, gen2, gen3, gen4, gen5, gen6) {
|
|
161
|
+
return union_type("FSharp.Core.FSharpChoice`7", [gen0, gen1, gen2, gen3, gen4, gen5, gen6], FSharpChoice$7, () => [[["Item", gen0]], [["Item", gen1]], [["Item", gen2]], [["Item", gen3]], [["Item", gen4]], [["Item", gen5]], [["Item", gen6]]]);
|
|
162
|
+
}
|
|
163
|
+
export function Choice_makeChoice1Of2(x) {
|
|
164
|
+
return FSharpChoice$2_Choice1Of2(x);
|
|
165
|
+
}
|
|
166
|
+
export function Choice_makeChoice2Of2(x) {
|
|
167
|
+
return FSharpChoice$2_Choice2Of2(x);
|
|
168
|
+
}
|
|
169
|
+
export function Choice_tryValueIfChoice1Of2(x) {
|
|
170
|
+
if (x.tag === /* Choice1Of2 */ 0) {
|
|
171
|
+
return some(x.fields[0]);
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
return undefined;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
export function Choice_tryValueIfChoice2Of2(x) {
|
|
178
|
+
if (x.tag === /* Choice2Of2 */ 1) {
|
|
179
|
+
return some(x.fields[0]);
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
return undefined;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { Exception, equals, isArrayLike } from "./Util.js";
|
|
2
|
+
export function count(col) {
|
|
3
|
+
if (typeof col["System.Collections.Generic.ICollection`1.get_Count"] === "function") {
|
|
4
|
+
return col["System.Collections.Generic.ICollection`1.get_Count"](); // collection
|
|
5
|
+
}
|
|
6
|
+
else {
|
|
7
|
+
if (typeof col["System.Collections.Generic.IReadOnlyCollection`1.get_Count"] === "function") {
|
|
8
|
+
return col["System.Collections.Generic.IReadOnlyCollection`1.get_Count"](); // collection
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
if (isArrayLike(col)) {
|
|
12
|
+
return col.length; // array, resize array
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
if (typeof col.size === "number") {
|
|
16
|
+
return col.size; // map, set
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
let count = 0;
|
|
20
|
+
for (const _ of col) {
|
|
21
|
+
count++;
|
|
22
|
+
}
|
|
23
|
+
return count; // other collections
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export function isReadOnly(col) {
|
|
30
|
+
if (typeof col["System.Collections.Generic.ICollection`1.get_IsReadOnly"] === "function") {
|
|
31
|
+
return col["System.Collections.Generic.ICollection`1.get_IsReadOnly"](); // collection
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
if (isArrayLike(col)) {
|
|
35
|
+
return false; // array, resize array
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
if (typeof col.size === "number") {
|
|
39
|
+
return false; // map, set
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return true; // other collections
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export function copyTo(col, array, arrayIndex) {
|
|
48
|
+
if (typeof col["System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"] === "function") {
|
|
49
|
+
col["System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"](array, arrayIndex); // collection
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
let i = arrayIndex;
|
|
53
|
+
for (const v of col) {
|
|
54
|
+
array[i] = v;
|
|
55
|
+
i++;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export function contains(col, item) {
|
|
60
|
+
if (typeof col["System.Collections.Generic.ICollection`1.Contains2B595"] === "function") {
|
|
61
|
+
return col["System.Collections.Generic.ICollection`1.Contains2B595"](item); // collection
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
if (isArrayLike(col)) {
|
|
65
|
+
let i = col.findIndex(x => equals(x, item)); // array, resize array
|
|
66
|
+
return i >= 0;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
if (typeof col.has === "function") {
|
|
70
|
+
if (typeof col.set === "function" && isArrayLike(item)) {
|
|
71
|
+
return col.has(item[0]) && equals(col.get(item[0]), item[1]); // map
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
return col.has(item); // set
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
return false; // other collections
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
export function add(col, item) {
|
|
84
|
+
if (typeof col["System.Collections.Generic.ICollection`1.Add2B595"] === "function") {
|
|
85
|
+
return col["System.Collections.Generic.ICollection`1.Add2B595"](item); // collection
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
if (isArrayLike(col)) {
|
|
89
|
+
if (ArrayBuffer.isView(col)) {
|
|
90
|
+
// TODO: throw for typed arrays?
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
col.push(item); // array, resize array
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
if (typeof col.add === "function") {
|
|
98
|
+
return col.add(item); // set
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
if (typeof col.has === "function"
|
|
102
|
+
&& typeof col.set === "function"
|
|
103
|
+
&& isArrayLike(item)) {
|
|
104
|
+
if (col.has(item[0]) === false) {
|
|
105
|
+
col.set(item[0], item[1]); // map
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
throw new Exception("An item with the same key has already been added. Key: " + item[0]);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
// TODO: throw for other collections?
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
export function remove(col, item) {
|
|
119
|
+
if (typeof col["System.Collections.Generic.ICollection`1.Remove2B595"] === "function") {
|
|
120
|
+
return col["System.Collections.Generic.ICollection`1.Remove2B595"](item); // collection
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
if (isArrayLike(col)) {
|
|
124
|
+
if (ArrayBuffer.isView(col)) {
|
|
125
|
+
// TODO: throw for typed arrays
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
let i = col.findIndex(x => equals(x, item));
|
|
130
|
+
if (i >= 0) {
|
|
131
|
+
col.splice(i, 1); // array, resize array
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
if (typeof col.delete === "function") {
|
|
141
|
+
if (typeof col.set === "function" && isArrayLike(item)) {
|
|
142
|
+
if (col.has(item[0]) && equals(col.get(item[0]), item[1])) {
|
|
143
|
+
return col.delete(item[0]); // map
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
return col.delete(item); // set
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
// TODO: throw for other collections?
|
|
155
|
+
return false; // other collections
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
export function clear(col) {
|
|
161
|
+
if (typeof col["System.Collections.Generic.ICollection`1.Clear"] === "function") {
|
|
162
|
+
return col["System.Collections.Generic.ICollection`1.Clear"](); // collection
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
if (isArrayLike(col)) {
|
|
166
|
+
if (ArrayBuffer.isView(col)) {
|
|
167
|
+
// TODO: throw for typed arrays?
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
col.splice(0); // array, resize array
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
if (typeof col.clear === "function") {
|
|
175
|
+
col.clear(); // map, set
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
// TODO: throw for other collections?
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class ConditionalWeakTable {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.weakMap = new WeakMap();
|
|
4
|
+
}
|
|
5
|
+
delete(key) {
|
|
6
|
+
return this.weakMap.delete(key);
|
|
7
|
+
}
|
|
8
|
+
get(key) {
|
|
9
|
+
return this.weakMap.get(key);
|
|
10
|
+
}
|
|
11
|
+
has(key) {
|
|
12
|
+
return this.weakMap.has(key);
|
|
13
|
+
}
|
|
14
|
+
set(key, value) {
|
|
15
|
+
return this.weakMap.set(key, value);
|
|
16
|
+
}
|
|
17
|
+
clear() {
|
|
18
|
+
this.weakMap = new WeakMap();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export default ConditionalWeakTable;
|