compostjs 0.0.8 → 0.0.12

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.
Files changed (141) hide show
  1. package/README.md +4 -4
  2. package/dist/fable_modules/fable-library-js.4.28.0/Array.d.ts +123 -0
  3. package/dist/fable_modules/fable-library-js.4.28.0/Array.js +1242 -0
  4. package/dist/fable_modules/fable-library-js.4.28.0/Async.d.ts +26 -0
  5. package/dist/fable_modules/fable-library-js.4.28.0/Async.js +145 -0
  6. package/dist/fable_modules/fable-library-js.4.28.0/AsyncBuilder.d.ts +59 -0
  7. package/dist/fable_modules/fable-library-js.4.28.0/AsyncBuilder.js +183 -0
  8. package/dist/fable_modules/fable-library-js.4.28.0/BigInt.d.ts +115 -0
  9. package/dist/fable_modules/fable-library-js.4.28.0/BigInt.js +283 -0
  10. package/dist/fable_modules/fable-library-js.4.28.0/BitConverter.d.ts +27 -0
  11. package/dist/fable_modules/fable-library-js.4.28.0/BitConverter.js +138 -0
  12. package/dist/fable_modules/fable-library-js.4.28.0/Boolean.d.ts +3 -0
  13. package/dist/fable_modules/fable-library-js.4.28.0/Boolean.js +21 -0
  14. package/dist/fable_modules/fable-library-js.4.28.0/CHANGELOG.md +100 -0
  15. package/dist/fable_modules/fable-library-js.4.28.0/Char.d.ts +65 -0
  16. package/dist/fable_modules/fable-library-js.4.28.0/Char.js +169 -0
  17. package/dist/fable_modules/fable-library-js.4.28.0/Choice.d.ts +121 -0
  18. package/dist/fable_modules/fable-library-js.4.28.0/Choice.js +184 -0
  19. package/dist/fable_modules/fable-library-js.4.28.0/CollectionUtil.d.ts +7 -0
  20. package/dist/fable_modules/fable-library-js.4.28.0/CollectionUtil.js +182 -0
  21. package/dist/fable_modules/fable-library-js.4.28.0/ConditionalWeakTable.d.ts +9 -0
  22. package/dist/fable_modules/fable-library-js.4.28.0/ConditionalWeakTable.js +21 -0
  23. package/dist/fable_modules/fable-library-js.4.28.0/Date.d.ts +70 -0
  24. package/dist/fable_modules/fable-library-js.4.28.0/Date.js +748 -0
  25. package/dist/fable_modules/fable-library-js.4.28.0/DateOffset.d.ts +63 -0
  26. package/dist/fable_modules/fable-library-js.4.28.0/DateOffset.js +268 -0
  27. package/dist/fable_modules/fable-library-js.4.28.0/DateOnly.d.ts +18 -0
  28. package/dist/fable_modules/fable-library-js.4.28.0/DateOnly.js +124 -0
  29. package/dist/fable_modules/fable-library-js.4.28.0/Decimal.d.ts +45 -0
  30. package/dist/fable_modules/fable-library-js.4.28.0/Decimal.js +212 -0
  31. package/dist/fable_modules/fable-library-js.4.28.0/Double.d.ts +11 -0
  32. package/dist/fable_modules/fable-library-js.4.28.0/Double.js +46 -0
  33. package/dist/fable_modules/fable-library-js.4.28.0/Encoding.d.ts +12 -0
  34. package/dist/fable_modules/fable-library-js.4.28.0/Encoding.js +173 -0
  35. package/dist/fable_modules/fable-library-js.4.28.0/Event.d.ts +31 -0
  36. package/dist/fable_modules/fable-library-js.4.28.0/Event.js +93 -0
  37. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Collections.d.ts +7 -0
  38. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Collections.js +27 -0
  39. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.CompilerServices.d.ts +12 -0
  40. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.CompilerServices.js +27 -0
  41. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.d.ts +17 -0
  42. package/dist/fable_modules/fable-library-js.4.28.0/FSharp.Core.js +69 -0
  43. package/dist/fable_modules/fable-library-js.4.28.0/Global.d.ts +24 -0
  44. package/dist/fable_modules/fable-library-js.4.28.0/Global.js +8 -0
  45. package/dist/fable_modules/fable-library-js.4.28.0/Guid.d.ts +10 -0
  46. package/dist/fable_modules/fable-library-js.4.28.0/Guid.js +142 -0
  47. package/dist/fable_modules/fable-library-js.4.28.0/Int32.d.ts +28 -0
  48. package/dist/fable_modules/fable-library-js.4.28.0/Int32.js +135 -0
  49. package/dist/fable_modules/fable-library-js.4.28.0/List.d.ts +143 -0
  50. package/dist/fable_modules/fable-library-js.4.28.0/List.js +1273 -0
  51. package/dist/fable_modules/fable-library-js.4.28.0/Long.d.ts +3 -0
  52. package/dist/fable_modules/fable-library-js.4.28.0/Long.js +46 -0
  53. package/dist/fable_modules/fable-library-js.4.28.0/MailboxProcessor.d.ts +25 -0
  54. package/dist/fable_modules/fable-library-js.4.28.0/MailboxProcessor.js +93 -0
  55. package/dist/fable_modules/fable-library-js.4.28.0/Map.d.ts +178 -0
  56. package/dist/fable_modules/fable-library-js.4.28.0/Map.js +1396 -0
  57. package/dist/fable_modules/fable-library-js.4.28.0/MapUtil.d.ts +12 -0
  58. package/dist/fable_modules/fable-library-js.4.28.0/MapUtil.js +127 -0
  59. package/dist/fable_modules/fable-library-js.4.28.0/MutableMap.d.ts +52 -0
  60. package/dist/fable_modules/fable-library-js.4.28.0/MutableMap.js +327 -0
  61. package/dist/fable_modules/fable-library-js.4.28.0/MutableSet.d.ts +39 -0
  62. package/dist/fable_modules/fable-library-js.4.28.0/MutableSet.js +233 -0
  63. package/dist/fable_modules/fable-library-js.4.28.0/Native.d.ts +2 -0
  64. package/dist/fable_modules/fable-library-js.4.28.0/Native.js +8 -0
  65. package/dist/fable_modules/fable-library-js.4.28.0/Numeric.d.ts +19 -0
  66. package/dist/fable_modules/fable-library-js.4.28.0/Numeric.js +71 -0
  67. package/dist/fable_modules/fable-library-js.4.28.0/Observable.d.ts +32 -0
  68. package/dist/fable_modules/fable-library-js.4.28.0/Observable.js +113 -0
  69. package/dist/fable_modules/fable-library-js.4.28.0/Option.d.ts +28 -0
  70. package/dist/fable_modules/fable-library-js.4.28.0/Option.js +96 -0
  71. package/dist/fable_modules/fable-library-js.4.28.0/README.md +3 -0
  72. package/dist/fable_modules/fable-library-js.4.28.0/Random.d.ts +37 -0
  73. package/dist/fable_modules/fable-library-js.4.28.0/Random.js +170 -0
  74. package/dist/fable_modules/fable-library-js.4.28.0/Range.d.ts +12 -0
  75. package/dist/fable_modules/fable-library-js.4.28.0/Range.js +45 -0
  76. package/dist/fable_modules/fable-library-js.4.28.0/Reflection.d.ts +119 -0
  77. package/dist/fable_modules/fable-library-js.4.28.0/Reflection.js +461 -0
  78. package/dist/fable_modules/fable-library-js.4.28.0/RegExp.d.ts +10 -0
  79. package/dist/fable_modules/fable-library-js.4.28.0/RegExp.js +131 -0
  80. package/dist/fable_modules/fable-library-js.4.28.0/Result.d.ts +37 -0
  81. package/dist/fable_modules/fable-library-js.4.28.0/Result.js +165 -0
  82. package/dist/fable_modules/fable-library-js.4.28.0/Seq.d.ts +165 -0
  83. package/dist/fable_modules/fable-library-js.4.28.0/Seq.js +1378 -0
  84. package/dist/fable_modules/fable-library-js.4.28.0/Seq2.d.ts +18 -0
  85. package/dist/fable_modules/fable-library-js.4.28.0/Seq2.js +111 -0
  86. package/dist/fable_modules/fable-library-js.4.28.0/Set.d.ts +190 -0
  87. package/dist/fable_modules/fable-library-js.4.28.0/Set.js +1789 -0
  88. package/dist/fable_modules/fable-library-js.4.28.0/String.d.ts +58 -0
  89. package/dist/fable_modules/fable-library-js.4.28.0/String.js +554 -0
  90. package/dist/fable_modules/fable-library-js.4.28.0/System.Collections.Generic.d.ts +79 -0
  91. package/dist/fable_modules/fable-library-js.4.28.0/System.Collections.Generic.js +317 -0
  92. package/dist/fable_modules/fable-library-js.4.28.0/System.Text.d.ts +38 -0
  93. package/dist/fable_modules/fable-library-js.4.28.0/System.Text.js +162 -0
  94. package/dist/fable_modules/fable-library-js.4.28.0/SystemException.d.ts +5 -0
  95. package/dist/fable_modules/fable-library-js.4.28.0/SystemException.js +5 -0
  96. package/dist/fable_modules/fable-library-js.4.28.0/TimeOnly.d.ts +15 -0
  97. package/dist/fable_modules/fable-library-js.4.28.0/TimeOnly.js +122 -0
  98. package/dist/fable_modules/fable-library-js.4.28.0/TimeSpan.d.ts +34 -0
  99. package/dist/fable_modules/fable-library-js.4.28.0/TimeSpan.js +177 -0
  100. package/dist/fable_modules/fable-library-js.4.28.0/Timer.d.ts +19 -0
  101. package/dist/fable_modules/fable-library-js.4.28.0/Timer.js +67 -0
  102. package/dist/fable_modules/fable-library-js.4.28.0/Types.d.ts +58 -0
  103. package/dist/fable_modules/fable-library-js.4.28.0/Types.js +208 -0
  104. package/dist/fable_modules/fable-library-js.4.28.0/Unicode.13.0.0.d.ts +2 -0
  105. package/dist/fable_modules/fable-library-js.4.28.0/Unicode.13.0.0.js +4 -0
  106. package/dist/fable_modules/fable-library-js.4.28.0/Uri.d.ts +31 -0
  107. package/dist/fable_modules/fable-library-js.4.28.0/Uri.js +159 -0
  108. package/dist/fable_modules/fable-library-js.4.28.0/Util.d.ts +210 -0
  109. package/dist/fable_modules/fable-library-js.4.28.0/Util.js +769 -0
  110. package/dist/fable_modules/fable-library-js.4.28.0/big.d.ts +338 -0
  111. package/dist/fable_modules/fable-library-js.4.28.0/lib/big.d.ts +5 -0
  112. package/dist/fable_modules/fable-library-js.4.28.0/lib/big.js +825 -0
  113. package/dist/fable_modules/fable-library-js.4.28.0/package.json +24 -0
  114. package/dist/fable_modules/project_cracked.json +1 -0
  115. package/package.json +6 -5
  116. package/.claude/settings.local.json +0 -11
  117. package/dist/fable-library.2.10.1/Array.js +0 -1336
  118. package/dist/fable-library.2.10.1/Async.js +0 -121
  119. package/dist/fable-library.2.10.1/AsyncBuilder.js +0 -200
  120. package/dist/fable-library.2.10.1/Date.js +0 -501
  121. package/dist/fable-library.2.10.1/Decimal.js +0 -208
  122. package/dist/fable-library.2.10.1/Event.js +0 -193
  123. package/dist/fable-library.2.10.1/Int32.js +0 -157
  124. package/dist/fable-library.2.10.1/List.js +0 -1234
  125. package/dist/fable-library.2.10.1/Long.js +0 -155
  126. package/dist/fable-library.2.10.1/Map.js +0 -1292
  127. package/dist/fable-library.2.10.1/MutableMap.js +0 -360
  128. package/dist/fable-library.2.10.1/MutableSet.js +0 -279
  129. package/dist/fable-library.2.10.1/Observable.js +0 -131
  130. package/dist/fable-library.2.10.1/Option.js +0 -118
  131. package/dist/fable-library.2.10.1/Reflection.js +0 -345
  132. package/dist/fable-library.2.10.1/RegExp.js +0 -118
  133. package/dist/fable-library.2.10.1/Seq.js +0 -917
  134. package/dist/fable-library.2.10.1/Set.js +0 -1692
  135. package/dist/fable-library.2.10.1/String.js +0 -679
  136. package/dist/fable-library.2.10.1/Types.js +0 -308
  137. package/dist/fable-library.2.10.1/Util.js +0 -761
  138. package/dist/helpers.js +0 -31
  139. package/dist/lib/big.js +0 -905
  140. package/dist/lib/long.js +0 -1375
  141. package/index.html +0 -49
@@ -0,0 +1,170 @@
1
+ import { class_type } from "./Reflection.js";
2
+ import { fromFloat64, op_Addition, toInt32, toFloat64, compare, fromInt32, toInt64 } from "./BigInt.js";
3
+ import { item, fill, setItem } from "./Array.js";
4
+ function Native_random() {
5
+ return Math.random();
6
+ }
7
+ function Native_randomNext(min, max) {
8
+ if (max < min) {
9
+ throw new Error("minValue must be less than maxValue");
10
+ }
11
+ return Math.floor(Math.random() * (max - min)) + min;
12
+ }
13
+ function Native_randomBytes(buffer) {
14
+ if (buffer == null) {
15
+ throw new Error("Buffer cannot be null");
16
+ }
17
+ for (let i = 0; i < buffer.length; i += 6) {
18
+ // Pick random 48-bit number. Fill buffer in 2 24-bit chunks to avoid bitwise truncation.
19
+ let r = Math.floor(Math.random() * 281474976710656); // Low 24 bits = chunk 1.
20
+ const rhi = Math.floor(r / 16777216); // High 24 bits shifted via division = chunk 2.
21
+ for (let j = 0; j < 6 && i + j < buffer.length; j++) {
22
+ if (j === 3) {
23
+ r = rhi;
24
+ }
25
+ buffer[i + j] = r & 255;
26
+ r >>>= 8;
27
+ }
28
+ }
29
+ ;
30
+ }
31
+ export class NonSeeded {
32
+ constructor() {
33
+ }
34
+ Next0() {
35
+ return Native_randomNext(0, 2147483647);
36
+ }
37
+ Next1(maxValue) {
38
+ return Native_randomNext(0, maxValue);
39
+ }
40
+ Next2(minValue, maxValue) {
41
+ return Native_randomNext(minValue, maxValue);
42
+ }
43
+ NextDouble() {
44
+ return Native_random();
45
+ }
46
+ NextBytes(buffer) {
47
+ Native_randomBytes(buffer);
48
+ }
49
+ }
50
+ export function NonSeeded_$reflection() {
51
+ return class_type("Random.NonSeeded", undefined, NonSeeded);
52
+ }
53
+ export function NonSeeded_$ctor() {
54
+ return new NonSeeded();
55
+ }
56
+ export class Seeded {
57
+ constructor(seed) {
58
+ this.MBIG = 2147483647;
59
+ this.inext = 0;
60
+ this.inextp = 0;
61
+ this.seedArray = fill(new Array(56), 0, 56, 0);
62
+ let ii = 0;
63
+ let mj = 0;
64
+ let mk = 0;
65
+ const subtraction = ((seed === -2147483648) ? 2147483647 : Math.abs(seed)) | 0;
66
+ mj = ((161803398 - subtraction) | 0);
67
+ this.seedArray[55] = (mj | 0);
68
+ mk = 1;
69
+ for (let i = 1; i <= 54; i++) {
70
+ ii = (((21 * i) % 55) | 0);
71
+ this.seedArray[ii] = (mk | 0);
72
+ mk = ((mj - mk) | 0);
73
+ if (mk < 0) {
74
+ mk = ((mk + this.MBIG) | 0);
75
+ }
76
+ mj = (item(ii, this.seedArray) | 0);
77
+ }
78
+ for (let k = 1; k <= 4; k++) {
79
+ for (let i_1 = 1; i_1 <= 55; i_1++) {
80
+ this.seedArray[i_1] = ((item(i_1, this.seedArray) - item(1 + ((i_1 + 30) % 55), this.seedArray)) | 0);
81
+ if (item(i_1, this.seedArray) < 0) {
82
+ this.seedArray[i_1] = ((item(i_1, this.seedArray) + this.MBIG) | 0);
83
+ }
84
+ }
85
+ }
86
+ this.inext = 0;
87
+ this.inextp = 21;
88
+ }
89
+ Next0() {
90
+ const this$ = this;
91
+ return Seeded__InternalSample(this$) | 0;
92
+ }
93
+ Next1(maxValue) {
94
+ const this$ = this;
95
+ if (maxValue < 0) {
96
+ throw new Error("maxValue must be positive");
97
+ }
98
+ return ~~(Seeded__Sample(this$) * maxValue) | 0;
99
+ }
100
+ Next2(minValue, maxValue) {
101
+ const this$ = this;
102
+ if (minValue > maxValue) {
103
+ throw new Error("minValue must be less than maxValue");
104
+ }
105
+ const range = toInt64(fromInt32(maxValue - minValue));
106
+ return ((compare(range, toInt64(fromInt32(2147483647))) <= 0) ? (~~(Seeded__Sample(this$) * toFloat64(range)) + minValue) : ~~toInt32(toInt64(op_Addition(toInt64(fromFloat64(Seeded__GetSampleForLargeRange(this$) * toFloat64(range))), toInt64(fromInt32(minValue)))))) | 0;
107
+ }
108
+ NextDouble() {
109
+ const this$ = this;
110
+ return Seeded__Sample(this$);
111
+ }
112
+ NextBytes(buffer) {
113
+ const this$ = this;
114
+ if (buffer == null) {
115
+ throw new Error("buffer");
116
+ }
117
+ for (let i = 0; i <= (buffer.length - 1); i++) {
118
+ setItem(buffer, i, (Seeded__InternalSample(this$) % (~~255 + 1)) & 0xFF);
119
+ }
120
+ }
121
+ }
122
+ export function Seeded_$reflection() {
123
+ return class_type("Random.Seeded", undefined, Seeded);
124
+ }
125
+ export function Seeded_$ctor_Z524259A4(seed) {
126
+ return new Seeded(seed);
127
+ }
128
+ function Seeded__InternalSample(_) {
129
+ let retVal = 0;
130
+ let locINext = _.inext;
131
+ let locINextp = _.inextp;
132
+ locINext = ((locINext + 1) | 0);
133
+ if (locINext >= 56) {
134
+ locINext = 1;
135
+ }
136
+ locINextp = ((locINextp + 1) | 0);
137
+ if (locINextp >= 56) {
138
+ locINextp = 1;
139
+ }
140
+ retVal = ((item(locINext, _.seedArray) - item(locINextp, _.seedArray)) | 0);
141
+ if (retVal === _.MBIG) {
142
+ retVal = ((retVal - 1) | 0);
143
+ }
144
+ if (retVal < 0) {
145
+ retVal = ((retVal + _.MBIG) | 0);
146
+ }
147
+ _.seedArray[locINext] = (retVal | 0);
148
+ _.inext = (locINext | 0);
149
+ _.inextp = (locINextp | 0);
150
+ return retVal | 0;
151
+ }
152
+ export function Seeded__Sample(this$) {
153
+ return Seeded__InternalSample(this$) * (1 / this$.MBIG);
154
+ }
155
+ export function Seeded__GetSampleForLargeRange(this$) {
156
+ let result = Seeded__InternalSample(this$);
157
+ if ((Seeded__InternalSample(this$) % 2) === 0) {
158
+ result = -result;
159
+ }
160
+ let d = result;
161
+ d = (d + (2147483647 - 1));
162
+ d = (d / (2 * ((2147483647 - 1) >>> 0)));
163
+ return d;
164
+ }
165
+ export function nonSeeded() {
166
+ return NonSeeded_$ctor();
167
+ }
168
+ export function seeded(seed) {
169
+ return Seeded_$ctor_Z524259A4(seed);
170
+ }
@@ -0,0 +1,12 @@
1
+ import { float64 } from "./Int32.js";
2
+ import { Option } from "./Option.js";
3
+ import { uint64, int64 } from "./BigInt.js";
4
+ import { decimal } from "./Decimal.js";
5
+ export declare function makeRangeStepFunction<T>(step: T, stop: T, zero: T, add: ((arg0: T, arg1: T) => T)): ((arg0: T) => Option<[T, T]>);
6
+ export declare function integralRangeStep<T>(start: T, step: T, stop: T, zero: T, add: ((arg0: T, arg1: T) => T)): Iterable<T>;
7
+ export declare function rangeBigInt(start: bigint, step: bigint, stop: bigint): Iterable<bigint>;
8
+ export declare function rangeDecimal(start: decimal, step: decimal, stop: decimal): Iterable<decimal>;
9
+ export declare function rangeDouble(start: float64, step: float64, stop: float64): Iterable<float64>;
10
+ export declare function rangeInt64(start: int64, step: int64, stop: int64): Iterable<int64>;
11
+ export declare function rangeUInt64(start: uint64, step: uint64, stop: uint64): Iterable<uint64>;
12
+ export declare function rangeChar(start: string, stop: string): Iterable<string>;
@@ -0,0 +1,45 @@
1
+ import { compare } from "./Util.js";
2
+ import { unfold, delay } from "./Seq.js";
3
+ import { toUInt64, toInt64, op_Addition, fromZero } from "./BigInt.js";
4
+ import { op_Addition as op_Addition_1, fromParts } from "./Decimal.js";
5
+ export function makeRangeStepFunction(step, stop, zero, add) {
6
+ const stepComparedWithZero = compare(step, zero) | 0;
7
+ if (stepComparedWithZero === 0) {
8
+ throw new Error("The step of a range cannot be zero");
9
+ }
10
+ const stepGreaterThanZero = stepComparedWithZero > 0;
11
+ return (x) => {
12
+ const comparedWithLast = compare(x, stop) | 0;
13
+ return ((stepGreaterThanZero && (comparedWithLast <= 0)) ? true : (!stepGreaterThanZero && (comparedWithLast >= 0))) ? [x, add(x, step)] : undefined;
14
+ };
15
+ }
16
+ export function integralRangeStep(start, step, stop, zero, add) {
17
+ const stepFn = makeRangeStepFunction(step, stop, zero, add);
18
+ return delay(() => unfold(stepFn, start));
19
+ }
20
+ export function rangeBigInt(start, step, stop) {
21
+ return integralRangeStep(start, step, stop, fromZero(), op_Addition);
22
+ }
23
+ export function rangeDecimal(start, step, stop) {
24
+ return integralRangeStep(start, step, stop, fromParts(0, 0, 0, false, 0), op_Addition_1);
25
+ }
26
+ export function rangeDouble(start, step, stop) {
27
+ return integralRangeStep(start, step, stop, 0, (x, y) => (x + y));
28
+ }
29
+ export function rangeInt64(start, step, stop) {
30
+ return integralRangeStep(start, step, stop, 0n, (x, y) => toInt64(op_Addition(x, y)));
31
+ }
32
+ export function rangeUInt64(start, step, stop) {
33
+ return integralRangeStep(start, step, stop, 0n, (x, y) => toUInt64(op_Addition(x, y)));
34
+ }
35
+ export function rangeChar(start, stop) {
36
+ const intStop = ~~stop.charCodeAt(0) | 0;
37
+ return delay(() => unfold((c) => {
38
+ if (c <= intStop) {
39
+ return [String.fromCharCode(c), c + 1];
40
+ }
41
+ else {
42
+ return undefined;
43
+ }
44
+ }, ~~start.charCodeAt(0)));
45
+ }
@@ -0,0 +1,119 @@
1
+ import { FSharpRef } from "./Types.js";
2
+ import { IEquatable } from "./Util.js";
3
+ export type FieldInfo = [string, TypeInfo];
4
+ export type PropertyInfo = FieldInfo;
5
+ export type ParameterInfo = FieldInfo;
6
+ export type Constructor = new (...args: any[]) => any;
7
+ export declare class CaseInfo {
8
+ declaringType: TypeInfo;
9
+ tag: number;
10
+ name: string;
11
+ fields?: FieldInfo[] | undefined;
12
+ constructor(declaringType: TypeInfo, tag: number, name: string, fields?: FieldInfo[] | undefined);
13
+ }
14
+ export type EnumCase = [string, number];
15
+ export declare class MethodInfo {
16
+ name: string;
17
+ parameters: ParameterInfo[];
18
+ returnType: TypeInfo;
19
+ constructor(name: string, parameters: ParameterInfo[], returnType: TypeInfo);
20
+ }
21
+ export declare class TypeInfo implements IEquatable<TypeInfo> {
22
+ fullname: string;
23
+ generics?: TypeInfo[] | undefined;
24
+ construct?: Constructor | undefined;
25
+ parent?: TypeInfo | undefined;
26
+ fields?: (() => FieldInfo[]) | undefined;
27
+ cases?: (() => CaseInfo[]) | undefined;
28
+ enumCases?: EnumCase[] | undefined;
29
+ constructor(fullname: string, generics?: TypeInfo[] | undefined, construct?: Constructor | undefined, parent?: TypeInfo | undefined, fields?: (() => FieldInfo[]) | undefined, cases?: (() => CaseInfo[]) | undefined, enumCases?: EnumCase[] | undefined);
30
+ toString(): string;
31
+ GetHashCode(): number;
32
+ Equals(other: TypeInfo): boolean;
33
+ }
34
+ export declare class GenericParameter extends TypeInfo {
35
+ constructor(name: string);
36
+ }
37
+ export declare function getGenerics(t: TypeInfo): TypeInfo[];
38
+ export declare function getHashCode(t: TypeInfo): number;
39
+ export declare function equals(t1: TypeInfo, t2: TypeInfo): boolean;
40
+ export declare function class_type(fullname: string, generics?: TypeInfo[], construct?: Constructor, parent?: TypeInfo): TypeInfo;
41
+ export declare function record_type(fullname: string, generics: TypeInfo[], construct: Constructor, fields: () => FieldInfo[]): TypeInfo;
42
+ export declare function anonRecord_type(...fields: FieldInfo[]): TypeInfo;
43
+ export declare function union_type(fullname: string, generics: TypeInfo[], construct: Constructor, cases: () => FieldInfo[][]): TypeInfo;
44
+ export declare function tuple_type(...generics: TypeInfo[]): TypeInfo;
45
+ export declare function delegate_type(...generics: TypeInfo[]): TypeInfo;
46
+ export declare function lambda_type(argType: TypeInfo, returnType: TypeInfo): TypeInfo;
47
+ export declare function option_type(generic: TypeInfo): TypeInfo;
48
+ export declare function list_type(generic: TypeInfo): TypeInfo;
49
+ export declare function array_type(generic: TypeInfo): TypeInfo;
50
+ export declare function enum_type(fullname: string, underlyingType: TypeInfo, enumCases: EnumCase[]): TypeInfo;
51
+ export declare function measure_type(fullname: string): TypeInfo;
52
+ export declare function generic_type(name: string): TypeInfo;
53
+ export declare const obj_type: TypeInfo;
54
+ export declare const unit_type: TypeInfo;
55
+ export declare const char_type: TypeInfo;
56
+ export declare const string_type: TypeInfo;
57
+ export declare const bool_type: TypeInfo;
58
+ export declare const int8_type: TypeInfo;
59
+ export declare const uint8_type: TypeInfo;
60
+ export declare const int16_type: TypeInfo;
61
+ export declare const uint16_type: TypeInfo;
62
+ export declare const int32_type: TypeInfo;
63
+ export declare const uint32_type: TypeInfo;
64
+ export declare const int64_type: TypeInfo;
65
+ export declare const uint64_type: TypeInfo;
66
+ export declare const int128_type: TypeInfo;
67
+ export declare const uint128_type: TypeInfo;
68
+ export declare const nativeint_type: TypeInfo;
69
+ export declare const unativeint_type: TypeInfo;
70
+ export declare const float16_type: TypeInfo;
71
+ export declare const float32_type: TypeInfo;
72
+ export declare const float64_type: TypeInfo;
73
+ export declare const decimal_type: TypeInfo;
74
+ export declare const bigint_type: TypeInfo;
75
+ export declare function name(info: FieldInfo | TypeInfo | CaseInfo | MethodInfo): string;
76
+ export declare function fullName(t: TypeInfo): string;
77
+ export declare function namespace(t: TypeInfo): string;
78
+ export declare function isArray(t: TypeInfo): boolean;
79
+ export declare function getElementType(t: TypeInfo): TypeInfo | undefined;
80
+ export declare function isGenericType(t: TypeInfo): boolean;
81
+ export declare function isGenericParameter(t: TypeInfo): t is GenericParameter;
82
+ export declare function isEnum(t: TypeInfo): boolean;
83
+ export declare function isSubclassOf(t1: TypeInfo, t2: TypeInfo): boolean;
84
+ export declare function isInstanceOfType(t: TypeInfo, o: any): boolean;
85
+ /**
86
+ * This doesn't replace types for fields (records) or cases (unions)
87
+ * but it should be enough for type comparison purposes
88
+ */
89
+ export declare function getGenericTypeDefinition(t: TypeInfo): TypeInfo;
90
+ export declare function getEnumUnderlyingType(t: TypeInfo): TypeInfo | undefined;
91
+ export declare function getEnumValues(t: TypeInfo): number[];
92
+ export declare function getEnumNames(t: TypeInfo): string[];
93
+ export declare function parseEnum(t: TypeInfo, str: string): number;
94
+ export declare function tryParseEnum(t: TypeInfo, str: string, defValue: FSharpRef<number>): boolean;
95
+ export declare function getEnumName(t: TypeInfo, v: number): string;
96
+ export declare function isEnumDefined(t: TypeInfo, v: string | number): boolean;
97
+ export declare function getUnionCases(t: TypeInfo): CaseInfo[];
98
+ export declare function getRecordElements(t: TypeInfo): FieldInfo[];
99
+ export declare function getTupleElements(t: TypeInfo): TypeInfo[];
100
+ export declare function getFunctionElements(t: TypeInfo): [TypeInfo, TypeInfo];
101
+ export declare function isUnion(t: any): boolean;
102
+ export declare function isRecord(t: any): boolean;
103
+ export declare function isTuple(t: TypeInfo): boolean;
104
+ export declare function isFunction(t: TypeInfo): boolean;
105
+ export declare function getUnionFields(v: any, t: TypeInfo): [CaseInfo, any[]];
106
+ export declare function getUnionCaseFields(uci: CaseInfo): FieldInfo[];
107
+ export declare function getRecordFields(v: any): any[];
108
+ export declare function getRecordField(v: any, field: FieldInfo): any;
109
+ export declare function getTupleFields(v: any): any[];
110
+ export declare function getTupleField(v: any, i: number): any;
111
+ export declare function makeUnion(uci: CaseInfo, values: any[]): any;
112
+ export declare function makeRecord(t: TypeInfo, values: any[]): any;
113
+ export declare function makeTuple(values: any[], _t: TypeInfo): any;
114
+ export declare function makeGenericType(t: TypeInfo, generics: TypeInfo[]): TypeInfo;
115
+ export declare function createInstance(t: TypeInfo, consArgs?: any[]): any;
116
+ export declare function getValue(propertyInfo: PropertyInfo, v: any): any;
117
+ export declare function getCaseTag(x: any): number;
118
+ export declare function getCaseName(x: any): string;
119
+ export declare function getCaseFields(x: any): any[];