@glutinum/cli 0.4.0 → 0.6.0
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/README.md +74 -7
- package/dist/Glutinum.Converter/FsharpAST.js +152 -20
- package/dist/Glutinum.Converter/FsharpAST.js.map +1 -1
- package/dist/Glutinum.Converter/Generate.js +17 -5
- package/dist/Glutinum.Converter/Generate.js.map +1 -1
- package/dist/Glutinum.Converter/GlueAST.js +110 -17
- package/dist/Glutinum.Converter/GlueAST.js.map +1 -1
- package/dist/Glutinum.Converter/Log.js +9 -5
- package/dist/Glutinum.Converter/Log.js.map +1 -1
- package/dist/Glutinum.Converter/Printer.js +486 -132
- package/dist/Glutinum.Converter/Printer.js.map +1 -1
- package/dist/Glutinum.Converter/Read.js +8 -5
- package/dist/Glutinum.Converter/Read.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +14 -6
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/Declaration.js +50 -0
- package/dist/Glutinum.Converter/Reader/Declaration.js.map +1 -0
- package/dist/Glutinum.Converter/Reader/Documentation.js +119 -0
- package/dist/Glutinum.Converter/Reader/Documentation.js.map +1 -0
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +9 -8
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js +42 -0
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js.map +1 -0
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +13 -4
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +4 -2
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +3 -3
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js +3 -3
- package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/NamedTupleMember.js +7 -0
- package/dist/Glutinum.Converter/Reader/NamedTupleMember.js.map +1 -0
- package/dist/Glutinum.Converter/Reader/Node.js +23 -11
- package/dist/Glutinum.Converter/Reader/Node.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/Parameters.js +3 -3
- package/dist/Glutinum.Converter/Reader/Parameters.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +5 -5
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeNode.js +160 -18
- package/dist/Glutinum.Converter/Reader/TypeNode.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +32 -21
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeParameters.js +2 -2
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +107 -77
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +14 -8
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/Utils.js +73 -7
- package/dist/Glutinum.Converter/Reader/Utils.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/VariableStatement.js +13 -7
- package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +1 -1
- package/dist/Glutinum.Converter/Transform.js +599 -203
- package/dist/Glutinum.Converter/Transform.js.map +1 -1
- package/dist/Glutinum.Converter/TypeScript.js +1 -1
- package/dist/Glutinum.Converter/Utils/Keywords.js +3 -3
- package/dist/Glutinum.Converter/Utils/List.js +62 -0
- package/dist/Glutinum.Converter/Utils/List.js.map +1 -0
- package/dist/Glutinum.Converter/Utils/Naming.js +96 -17
- package/dist/Glutinum.Converter/Utils/Naming.js.map +1 -1
- package/dist/Glutinum.Converter/Utils/String.js +6 -1
- package/dist/Glutinum.Converter/Utils/String.js.map +1 -1
- package/dist/Program.js +9 -10
- package/dist/Program.js.map +1 -1
- package/package.json +22 -3
- package/dist/Glutinum.Converter/Reader/NamedDeclaration.js +0 -36
- package/dist/Glutinum.Converter/Reader/NamedDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Types.js +0 -16
- package/dist/Glutinum.Converter/Reader/Types.js.map +0 -1
- package/dist/fable_modules/fable-library.4.5.0/Array.d.ts +0 -120
- package/dist/fable_modules/fable-library.4.5.0/Array.js +0 -1204
- package/dist/fable_modules/fable-library.4.5.0/Async.d.ts +0 -32
- package/dist/fable_modules/fable-library.4.5.0/Async.js +0 -158
- package/dist/fable_modules/fable-library.4.5.0/AsyncBuilder.d.ts +0 -59
- package/dist/fable_modules/fable-library.4.5.0/AsyncBuilder.js +0 -183
- package/dist/fable_modules/fable-library.4.5.0/BigInt.d.ts +0 -115
- package/dist/fable_modules/fable-library.4.5.0/BigInt.js +0 -282
- package/dist/fable_modules/fable-library.4.5.0/BitConverter.d.ts +0 -27
- package/dist/fable_modules/fable-library.4.5.0/BitConverter.js +0 -138
- package/dist/fable_modules/fable-library.4.5.0/Boolean.d.ts +0 -3
- package/dist/fable_modules/fable-library.4.5.0/Boolean.js +0 -21
- package/dist/fable_modules/fable-library.4.5.0/CHANGELOG.md +0 -11
- package/dist/fable_modules/fable-library.4.5.0/Char.d.ts +0 -65
- package/dist/fable_modules/fable-library.4.5.0/Char.js +0 -169
- package/dist/fable_modules/fable-library.4.5.0/Choice.d.ts +0 -138
- package/dist/fable_modules/fable-library.4.5.0/Choice.js +0 -227
- package/dist/fable_modules/fable-library.4.5.0/Date.d.ts +0 -70
- package/dist/fable_modules/fable-library.4.5.0/Date.js +0 -451
- package/dist/fable_modules/fable-library.4.5.0/DateOffset.d.ts +0 -63
- package/dist/fable_modules/fable-library.4.5.0/DateOffset.js +0 -268
- package/dist/fable_modules/fable-library.4.5.0/DateOnly.d.ts +0 -18
- package/dist/fable_modules/fable-library.4.5.0/DateOnly.js +0 -124
- package/dist/fable_modules/fable-library.4.5.0/Decimal.d.ts +0 -45
- package/dist/fable_modules/fable-library.4.5.0/Decimal.js +0 -212
- package/dist/fable_modules/fable-library.4.5.0/Double.d.ts +0 -11
- package/dist/fable_modules/fable-library.4.5.0/Double.js +0 -46
- package/dist/fable_modules/fable-library.4.5.0/Encoding.d.ts +0 -12
- package/dist/fable_modules/fable-library.4.5.0/Encoding.js +0 -173
- package/dist/fable_modules/fable-library.4.5.0/Event.d.ts +0 -31
- package/dist/fable_modules/fable-library.4.5.0/Event.js +0 -93
- package/dist/fable_modules/fable-library.4.5.0/FSharp.Collections.d.ts +0 -7
- package/dist/fable_modules/fable-library.4.5.0/FSharp.Collections.js +0 -27
- package/dist/fable_modules/fable-library.4.5.0/FSharp.Core.d.ts +0 -17
- package/dist/fable_modules/fable-library.4.5.0/FSharp.Core.js +0 -69
- package/dist/fable_modules/fable-library.4.5.0/Global.d.ts +0 -24
- package/dist/fable_modules/fable-library.4.5.0/Global.js +0 -8
- package/dist/fable_modules/fable-library.4.5.0/Guid.d.ts +0 -10
- package/dist/fable_modules/fable-library.4.5.0/Guid.js +0 -142
- package/dist/fable_modules/fable-library.4.5.0/Int32.d.ts +0 -28
- package/dist/fable_modules/fable-library.4.5.0/Int32.js +0 -135
- package/dist/fable_modules/fable-library.4.5.0/List.d.ts +0 -143
- package/dist/fable_modules/fable-library.4.5.0/List.js +0 -1273
- package/dist/fable_modules/fable-library.4.5.0/Long.d.ts +0 -3
- package/dist/fable_modules/fable-library.4.5.0/Long.js +0 -46
- package/dist/fable_modules/fable-library.4.5.0/MailboxProcessor.d.ts +0 -25
- package/dist/fable_modules/fable-library.4.5.0/MailboxProcessor.js +0 -93
- package/dist/fable_modules/fable-library.4.5.0/Map.d.ts +0 -178
- package/dist/fable_modules/fable-library.4.5.0/Map.js +0 -1396
- package/dist/fable_modules/fable-library.4.5.0/MapUtil.d.ts +0 -10
- package/dist/fable_modules/fable-library.4.5.0/MapUtil.js +0 -112
- package/dist/fable_modules/fable-library.4.5.0/MutableMap.d.ts +0 -52
- package/dist/fable_modules/fable-library.4.5.0/MutableMap.js +0 -326
- package/dist/fable_modules/fable-library.4.5.0/MutableSet.d.ts +0 -39
- package/dist/fable_modules/fable-library.4.5.0/MutableSet.js +0 -232
- package/dist/fable_modules/fable-library.4.5.0/Native.d.ts +0 -2
- package/dist/fable_modules/fable-library.4.5.0/Native.js +0 -8
- package/dist/fable_modules/fable-library.4.5.0/Numeric.d.ts +0 -19
- package/dist/fable_modules/fable-library.4.5.0/Numeric.js +0 -71
- package/dist/fable_modules/fable-library.4.5.0/Observable.d.ts +0 -32
- package/dist/fable_modules/fable-library.4.5.0/Observable.js +0 -113
- package/dist/fable_modules/fable-library.4.5.0/Option.d.ts +0 -28
- package/dist/fable_modules/fable-library.4.5.0/Option.js +0 -96
- package/dist/fable_modules/fable-library.4.5.0/README.md +0 -3
- package/dist/fable_modules/fable-library.4.5.0/Random.d.ts +0 -37
- package/dist/fable_modules/fable-library.4.5.0/Random.js +0 -170
- package/dist/fable_modules/fable-library.4.5.0/Range.d.ts +0 -12
- package/dist/fable_modules/fable-library.4.5.0/Range.js +0 -45
- package/dist/fable_modules/fable-library.4.5.0/Reflection.d.ts +0 -119
- package/dist/fable_modules/fable-library.4.5.0/Reflection.js +0 -461
- package/dist/fable_modules/fable-library.4.5.0/RegExp.d.ts +0 -10
- package/dist/fable_modules/fable-library.4.5.0/RegExp.js +0 -132
- package/dist/fable_modules/fable-library.4.5.0/Seq.d.ts +0 -165
- package/dist/fable_modules/fable-library.4.5.0/Seq.js +0 -1379
- package/dist/fable_modules/fable-library.4.5.0/Seq2.d.ts +0 -18
- package/dist/fable_modules/fable-library.4.5.0/Seq2.js +0 -111
- package/dist/fable_modules/fable-library.4.5.0/Set.d.ts +0 -190
- package/dist/fable_modules/fable-library.4.5.0/Set.js +0 -1789
- package/dist/fable_modules/fable-library.4.5.0/String.d.ts +0 -49
- package/dist/fable_modules/fable-library.4.5.0/String.js +0 -540
- package/dist/fable_modules/fable-library.4.5.0/System.Collections.Generic.d.ts +0 -71
- package/dist/fable_modules/fable-library.4.5.0/System.Collections.Generic.js +0 -307
- package/dist/fable_modules/fable-library.4.5.0/System.Text.d.ts +0 -30
- package/dist/fable_modules/fable-library.4.5.0/System.Text.js +0 -110
- package/dist/fable_modules/fable-library.4.5.0/SystemException.d.ts +0 -5
- package/dist/fable_modules/fable-library.4.5.0/SystemException.js +0 -5
- package/dist/fable_modules/fable-library.4.5.0/TimeOnly.d.ts +0 -15
- package/dist/fable_modules/fable-library.4.5.0/TimeOnly.js +0 -122
- package/dist/fable_modules/fable-library.4.5.0/TimeSpan.d.ts +0 -34
- package/dist/fable_modules/fable-library.4.5.0/TimeSpan.js +0 -177
- package/dist/fable_modules/fable-library.4.5.0/Timer.d.ts +0 -19
- package/dist/fable_modules/fable-library.4.5.0/Timer.js +0 -67
- package/dist/fable_modules/fable-library.4.5.0/Types.d.ts +0 -58
- package/dist/fable_modules/fable-library.4.5.0/Types.js +0 -208
- package/dist/fable_modules/fable-library.4.5.0/Unicode.13.0.0.d.ts +0 -2
- package/dist/fable_modules/fable-library.4.5.0/Unicode.13.0.0.js +0 -4
- package/dist/fable_modules/fable-library.4.5.0/Uri.d.ts +0 -29
- package/dist/fable_modules/fable-library.4.5.0/Uri.js +0 -142
- package/dist/fable_modules/fable-library.4.5.0/Util.d.ts +0 -207
- package/dist/fable_modules/fable-library.4.5.0/Util.js +0 -781
- package/dist/fable_modules/fable-library.4.5.0/lib/big.d.ts +0 -5
- package/dist/fable_modules/fable-library.4.5.0/lib/big.js +0 -826
- package/dist/fable_modules/fable-library.4.5.0/package.json +0 -23
- package/dist/fable_modules/project_cracked.json +0 -1
package/README.md
CHANGED
|
@@ -12,11 +12,11 @@ You can see the available options by running:
|
|
|
12
12
|
./build.sh --help
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
When using the test command, you can focus on a specific by forwarding arguments to
|
|
15
|
+
When using the test command, you can focus on a specific by forwarding arguments to `vitest`:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
# Focus all tests containing
|
|
19
|
-
./build.sh test --watch --
|
|
18
|
+
# Focus all tests containing related to specs/class/
|
|
19
|
+
./build.sh test --watch -- -t class/
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
If you need to run a local version of `@glutinum/cli`, you can use `./build.sh cli [--watch]` and then run `node cli.js <args>`.
|
|
@@ -73,14 +73,71 @@ type FSharpAttribute =
|
|
|
73
73
|
|
|
74
74
|
### Tests
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
#### Vitest
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
This project use [Vitest](https://vitest.dev/) for running tests.
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Vitest was chosen because it seems to have a lot of attention and is actively maintained. Plus, it seems well integrated with VSCode and Rider, allowing us to use the test explorer and even debug the tests using source maps.
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
If you prefer, it is possible to run the tests via the CLI.
|
|
83
83
|
|
|
84
|
+
##### VSCode
|
|
85
|
+
|
|
86
|
+
Install [Vitest plugin](https://marketplace.visualstudio.com/items?itemName=vitest.explorer), then you will be able to run the tests from the test explorer.
|
|
87
|
+
|
|
88
|
+
##### Rider
|
|
89
|
+
|
|
90
|
+
You need to add a new configuration of type `Vitest`.
|
|
91
|
+
|
|
92
|
+
1. `Run > Edit Configurations...`
|
|
93
|
+
2. Add a new configuration of type `Vitest`
|
|
94
|
+
3. Then you can run the tests by selecting the configuration in the top right corner of the IDE.
|
|
95
|
+
|
|
96
|
+
##### Specs
|
|
97
|
+
|
|
98
|
+
> [!TIP]
|
|
99
|
+
> Run `./build.sh --help` to see the available options (look for `test specs` command).
|
|
100
|
+
|
|
101
|
+
Specs tests are used to test isolated TypeScript syntax and their conversion to F#.
|
|
102
|
+
|
|
103
|
+
They are generated based on the `tests/specs/references` folder.
|
|
104
|
+
|
|
105
|
+
Each `.d.ts` correspond to a test and have a matching `.fsx` file.
|
|
106
|
+
|
|
107
|
+
When running `./build.sh test specs`, it will generate a similar hierarchy in the `tests/specs/generated` folder.
|
|
108
|
+
|
|
109
|
+
Example:
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
tests/specs/references
|
|
113
|
+
├── interfaces
|
|
114
|
+
│ ├── callSignature.d.ts
|
|
115
|
+
│ ├── callSignature.fsx
|
|
116
|
+
│ └── indexSignature
|
|
117
|
+
│ ├── numberParameter.d.ts
|
|
118
|
+
│ └── numberParameter.fsx
|
|
119
|
+
└── typeQuery
|
|
120
|
+
├── class.d.ts
|
|
121
|
+
├── class.fsx
|
|
122
|
+
├── defaultToObj.d.ts
|
|
123
|
+
└── defaultToObj.fsx
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
generates:
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
tests/specs/generated
|
|
130
|
+
├── interfaces
|
|
131
|
+
│ ├── index.test.js
|
|
132
|
+
│ └── indexSignature
|
|
133
|
+
│ └── index.test.js
|
|
134
|
+
└── typeQuery
|
|
135
|
+
└── index.test.js
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
`index.test.js` contains all the tests for the `.d.ts` of the same folder.
|
|
139
|
+
|
|
140
|
+
> [!NOTE]
|
|
84
141
|
> If you are using VSCode, the `fsx` file will be nested under the `d.ts` file in your explorer.
|
|
85
142
|
|
|
86
143
|
The `.fsx` correspond to the expected result suffixed with the following:
|
|
@@ -95,6 +152,16 @@ The `.fsx` correspond to the expected result suffixed with the following:
|
|
|
95
152
|
|
|
96
153
|
> This allows us to have IDE support in the `.fsx` file instead of having a lot of syntax errors.
|
|
97
154
|
|
|
155
|
+
#### `tests/specs/index.js`
|
|
156
|
+
|
|
157
|
+
Sometimes debugging tests through Vitest runner / extensions, is not easy. This is why, we provide a `./tests/index.js` scripts which allows you to manually check a specs transformation.
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
node --enable-source-maps tests/specs tests/specs/references/exports/variable.d.ts
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
This avoid situation where Vitest extension needs a restart of VSCode to work again, etc.
|
|
164
|
+
|
|
98
165
|
## Tools
|
|
99
166
|
|
|
100
167
|
One handy tool when working on the TypeScript AST is [TypeScript AST Viewer](https://ts-ast-viewer.com/).
|
|
@@ -1,7 +1,34 @@
|
|
|
1
|
-
import { toString,
|
|
2
|
-
import { option_type,
|
|
3
|
-
import { int32ToString } from "../fable_modules/fable-library.4.
|
|
4
|
-
import { forAll } from "../fable_modules/fable-library.4.
|
|
1
|
+
import { toString, Union, Record } from "../fable_modules/fable-library-js.4.14.0/Types.js";
|
|
2
|
+
import { enum_type, option_type, bool_type, float64_type, int32_type, union_type, list_type, record_type, string_type } from "../fable_modules/fable-library-js.4.14.0/Reflection.js";
|
|
3
|
+
import { int32ToString } from "../fable_modules/fable-library-js.4.14.0/Util.js";
|
|
4
|
+
import { empty, forAll } from "../fable_modules/fable-library-js.4.14.0/List.js";
|
|
5
|
+
|
|
6
|
+
export class FSharpCommentParam extends Record {
|
|
7
|
+
constructor(Name, Content) {
|
|
8
|
+
super();
|
|
9
|
+
this.Name = Name;
|
|
10
|
+
this.Content = Content;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function FSharpCommentParam_$reflection() {
|
|
15
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpCommentParam", [], FSharpCommentParam, () => [["Name", string_type], ["Content", string_type]]);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class FSharpXmlDoc extends Union {
|
|
19
|
+
constructor(tag, fields) {
|
|
20
|
+
super();
|
|
21
|
+
this.tag = tag;
|
|
22
|
+
this.fields = fields;
|
|
23
|
+
}
|
|
24
|
+
cases() {
|
|
25
|
+
return ["Summary", "Param", "Returns", "Remarks", "DefaultValue", "Example"];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function FSharpXmlDoc_$reflection() {
|
|
30
|
+
return union_type("Glutinum.Converter.FSharpAST.FSharpXmlDoc", [], FSharpXmlDoc, () => [[["Item", list_type(string_type)]], [["Item", FSharpCommentParam_$reflection()]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]]]);
|
|
31
|
+
}
|
|
5
32
|
|
|
6
33
|
export class FSharpLiteral extends Union {
|
|
7
34
|
constructor(tag, fields) {
|
|
@@ -10,12 +37,12 @@ export class FSharpLiteral extends Union {
|
|
|
10
37
|
this.fields = fields;
|
|
11
38
|
}
|
|
12
39
|
cases() {
|
|
13
|
-
return ["String", "Int", "Float", "Bool"];
|
|
40
|
+
return ["String", "Int", "Float", "Bool", "Null"];
|
|
14
41
|
}
|
|
15
42
|
}
|
|
16
43
|
|
|
17
44
|
export function FSharpLiteral_$reflection() {
|
|
18
|
-
return union_type("Glutinum.Converter.FSharpAST.FSharpLiteral", [], FSharpLiteral, () => [[["Item", string_type]], [["Item", int32_type]], [["Item", float64_type]], [["Item", bool_type]]]);
|
|
45
|
+
return union_type("Glutinum.Converter.FSharpAST.FSharpLiteral", [], FSharpLiteral, () => [[["Item", string_type]], [["Item", int32_type]], [["Item", float64_type]], [["Item", bool_type]], []]);
|
|
19
46
|
}
|
|
20
47
|
|
|
21
48
|
export class FSharpEnumCase extends Record {
|
|
@@ -163,17 +190,18 @@ export class FSharpAttribute extends Union {
|
|
|
163
190
|
this.fields = fields;
|
|
164
191
|
}
|
|
165
192
|
cases() {
|
|
166
|
-
return ["Text", "EmitSelfInvoke", "Import", "ImportAll", "Erase", "AllowNullLiteral", "StringEnum", "CompiledName", "RequireQualifiedAccess", "EmitConstructor", "EmitMacroConstructor", "EmitIndexer"];
|
|
193
|
+
return ["Text", "EmitSelfInvoke", "EmitSelf", "Import", "ImportAll", "ImportDefault", "Erase", "AllowNullLiteral", "Obsolete", "StringEnum", "CompiledName", "RequireQualifiedAccess", "EmitConstructor", "EmitMacroConstructor", "EmitIndexer", "Global", "ParamObject", "ParamArray", "Interface"];
|
|
167
194
|
}
|
|
168
195
|
}
|
|
169
196
|
|
|
170
197
|
export function FSharpAttribute_$reflection() {
|
|
171
|
-
return union_type("Glutinum.Converter.FSharpAST.FSharpAttribute", [], FSharpAttribute, () => [[["Item", string_type]], [], [["
|
|
198
|
+
return union_type("Glutinum.Converter.FSharpAST.FSharpAttribute", [], FSharpAttribute, () => [[["Item", string_type]], [], [], [["selector", string_type], ["from", string_type]], [["moduleName", string_type]], [["moduleName", string_type]], [], [], [["Item", option_type(string_type)]], [["Item", enum_type("Fable.Core.CaseRules", int32_type, [["None", 0], ["LowerFirst", 1], ["SnakeCase", 2], ["SnakeCaseAllCaps", 3], ["KebabCase", 4]])]], [["Item", string_type]], [], [], [["className", string_type]], [], [], [], [], []]);
|
|
172
199
|
}
|
|
173
200
|
|
|
174
201
|
export class FSharpParameter extends Record {
|
|
175
|
-
constructor(Name, IsOptional, Type) {
|
|
202
|
+
constructor(Attributes, Name, IsOptional, Type) {
|
|
176
203
|
super();
|
|
204
|
+
this.Attributes = Attributes;
|
|
177
205
|
this.Name = Name;
|
|
178
206
|
this.IsOptional = IsOptional;
|
|
179
207
|
this.Type = Type;
|
|
@@ -181,14 +209,15 @@ export class FSharpParameter extends Record {
|
|
|
181
209
|
}
|
|
182
210
|
|
|
183
211
|
export function FSharpParameter_$reflection() {
|
|
184
|
-
return record_type("Glutinum.Converter.FSharpAST.FSharpParameter", [], FSharpParameter, () => [["Name", string_type], ["IsOptional", bool_type], ["Type", FSharpType_$reflection()]]);
|
|
212
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpParameter", [], FSharpParameter, () => [["Attributes", list_type(FSharpAttribute_$reflection())], ["Name", string_type], ["IsOptional", bool_type], ["Type", FSharpType_$reflection()]]);
|
|
185
213
|
}
|
|
186
214
|
|
|
187
215
|
export class FSharpMemberInfo extends Record {
|
|
188
|
-
constructor(Attributes, Name, TypeParameters, Parameters, Type, IsOptional, IsStatic, Accessor, Accessibility) {
|
|
216
|
+
constructor(Attributes, Name, OriginalName, TypeParameters, Parameters, Type, IsOptional, IsStatic, Accessor, Accessibility, XmlDoc) {
|
|
189
217
|
super();
|
|
190
218
|
this.Attributes = Attributes;
|
|
191
219
|
this.Name = Name;
|
|
220
|
+
this.OriginalName = OriginalName;
|
|
192
221
|
this.TypeParameters = TypeParameters;
|
|
193
222
|
this.Parameters = Parameters;
|
|
194
223
|
this.Type = Type;
|
|
@@ -196,11 +225,31 @@ export class FSharpMemberInfo extends Record {
|
|
|
196
225
|
this.IsStatic = IsStatic;
|
|
197
226
|
this.Accessor = Accessor;
|
|
198
227
|
this.Accessibility = Accessibility;
|
|
228
|
+
this.XmlDoc = XmlDoc;
|
|
199
229
|
}
|
|
200
230
|
}
|
|
201
231
|
|
|
202
232
|
export function FSharpMemberInfo_$reflection() {
|
|
203
|
-
return record_type("Glutinum.Converter.FSharpAST.FSharpMemberInfo", [], FSharpMemberInfo, () => [["Attributes", list_type(FSharpAttribute_$reflection())], ["Name", string_type], ["TypeParameters", list_type(FSharpTypeParameter_$reflection())], ["Parameters", list_type(FSharpParameter_$reflection())], ["Type", FSharpType_$reflection()], ["IsOptional", bool_type], ["IsStatic", bool_type], ["Accessor", option_type(FSharpAccessor_$reflection())], ["Accessibility", FSharpAccessibility_$reflection()]]);
|
|
233
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpMemberInfo", [], FSharpMemberInfo, () => [["Attributes", list_type(FSharpAttribute_$reflection())], ["Name", string_type], ["OriginalName", string_type], ["TypeParameters", list_type(FSharpTypeParameter_$reflection())], ["Parameters", list_type(FSharpParameter_$reflection())], ["Type", FSharpType_$reflection()], ["IsOptional", bool_type], ["IsStatic", bool_type], ["Accessor", option_type(FSharpAccessor_$reflection())], ["Accessibility", FSharpAccessibility_$reflection()], ["XmlDoc", list_type(FSharpXmlDoc_$reflection())]]);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export class FSharpStaticMemberInfo extends Record {
|
|
237
|
+
constructor(Attributes, Name, OriginalName, TypeParameters, Parameters, Type, IsOptional, Accessor, Accessibility) {
|
|
238
|
+
super();
|
|
239
|
+
this.Attributes = Attributes;
|
|
240
|
+
this.Name = Name;
|
|
241
|
+
this.OriginalName = OriginalName;
|
|
242
|
+
this.TypeParameters = TypeParameters;
|
|
243
|
+
this.Parameters = Parameters;
|
|
244
|
+
this.Type = Type;
|
|
245
|
+
this.IsOptional = IsOptional;
|
|
246
|
+
this.Accessor = Accessor;
|
|
247
|
+
this.Accessibility = Accessibility;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export function FSharpStaticMemberInfo_$reflection() {
|
|
252
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpStaticMemberInfo", [], FSharpStaticMemberInfo, () => [["Attributes", list_type(FSharpAttribute_$reflection())], ["Name", string_type], ["OriginalName", string_type], ["TypeParameters", list_type(FSharpTypeParameter_$reflection())], ["Parameters", list_type(FSharpParameter_$reflection())], ["Type", FSharpType_$reflection()], ["IsOptional", bool_type], ["Accessor", option_type(FSharpAccessor_$reflection())], ["Accessibility", FSharpAccessibility_$reflection()]]);
|
|
204
253
|
}
|
|
205
254
|
|
|
206
255
|
export class FSharpMember extends Union {
|
|
@@ -210,26 +259,68 @@ export class FSharpMember extends Union {
|
|
|
210
259
|
this.fields = fields;
|
|
211
260
|
}
|
|
212
261
|
cases() {
|
|
213
|
-
return ["Method", "Property"];
|
|
262
|
+
return ["Method", "Property", "StaticMember"];
|
|
214
263
|
}
|
|
215
264
|
}
|
|
216
265
|
|
|
217
266
|
export function FSharpMember_$reflection() {
|
|
218
|
-
return union_type("Glutinum.Converter.FSharpAST.FSharpMember", [], FSharpMember, () => [[["Item", FSharpMemberInfo_$reflection()]], [["Item", FSharpMemberInfo_$reflection()]]]);
|
|
267
|
+
return union_type("Glutinum.Converter.FSharpAST.FSharpMember", [], FSharpMember, () => [[["Item", FSharpMemberInfo_$reflection()]], [["Item", FSharpMemberInfo_$reflection()]], [["Item", FSharpStaticMemberInfo_$reflection()]]]);
|
|
219
268
|
}
|
|
220
269
|
|
|
221
270
|
export class FSharpInterface extends Record {
|
|
222
|
-
constructor(Attributes, Name, TypeParameters, Members) {
|
|
271
|
+
constructor(Attributes, Name, OriginalName, TypeParameters, Members) {
|
|
223
272
|
super();
|
|
224
273
|
this.Attributes = Attributes;
|
|
225
274
|
this.Name = Name;
|
|
275
|
+
this.OriginalName = OriginalName;
|
|
226
276
|
this.TypeParameters = TypeParameters;
|
|
227
277
|
this.Members = Members;
|
|
228
278
|
}
|
|
229
279
|
}
|
|
230
280
|
|
|
231
281
|
export function FSharpInterface_$reflection() {
|
|
232
|
-
return record_type("Glutinum.Converter.FSharpAST.FSharpInterface", [], FSharpInterface, () => [["Attributes", list_type(FSharpAttribute_$reflection())], ["Name", string_type], ["TypeParameters", list_type(FSharpTypeParameter_$reflection())], ["Members", list_type(FSharpMember_$reflection())]]);
|
|
282
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpInterface", [], FSharpInterface, () => [["Attributes", list_type(FSharpAttribute_$reflection())], ["Name", string_type], ["OriginalName", string_type], ["TypeParameters", list_type(FSharpTypeParameter_$reflection())], ["Members", list_type(FSharpMember_$reflection())]]);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export class FSharpExplicitField extends Record {
|
|
286
|
+
constructor(Name, Type) {
|
|
287
|
+
super();
|
|
288
|
+
this.Name = Name;
|
|
289
|
+
this.Type = Type;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export function FSharpExplicitField_$reflection() {
|
|
294
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpExplicitField", [], FSharpExplicitField, () => [["Name", string_type], ["Type", FSharpType_$reflection()]]);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export class FSharpConstructor extends Record {
|
|
298
|
+
constructor(Parameters, Attributes, Accessibility) {
|
|
299
|
+
super();
|
|
300
|
+
this.Parameters = Parameters;
|
|
301
|
+
this.Attributes = Attributes;
|
|
302
|
+
this.Accessibility = Accessibility;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export function FSharpConstructor_$reflection() {
|
|
307
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpConstructor", [], FSharpConstructor, () => [["Parameters", list_type(FSharpParameter_$reflection())], ["Attributes", list_type(FSharpAttribute_$reflection())], ["Accessibility", FSharpAccessibility_$reflection()]]);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export class FSharpClass extends Record {
|
|
311
|
+
constructor(Attributes, Name, TypeParameters, PrimaryConstructor, SecondaryConstructors, ExplicitFields) {
|
|
312
|
+
super();
|
|
313
|
+
this.Attributes = Attributes;
|
|
314
|
+
this.Name = Name;
|
|
315
|
+
this.TypeParameters = TypeParameters;
|
|
316
|
+
this.PrimaryConstructor = PrimaryConstructor;
|
|
317
|
+
this.SecondaryConstructors = SecondaryConstructors;
|
|
318
|
+
this.ExplicitFields = ExplicitFields;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export function FSharpClass_$reflection() {
|
|
323
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpClass", [], FSharpClass, () => [["Attributes", list_type(FSharpAttribute_$reflection())], ["Name", string_type], ["TypeParameters", list_type(FSharpTypeParameter_$reflection())], ["PrimaryConstructor", FSharpConstructor_$reflection()], ["SecondaryConstructors", list_type(FSharpConstructor_$reflection())], ["ExplicitFields", list_type(FSharpExplicitField_$reflection())]]);
|
|
233
324
|
}
|
|
234
325
|
|
|
235
326
|
export class FSharpMapped extends Record {
|
|
@@ -286,16 +377,30 @@ export function FSharpTypeAlias_$reflection() {
|
|
|
286
377
|
}
|
|
287
378
|
|
|
288
379
|
export class FSharpTypeReference extends Record {
|
|
289
|
-
constructor(Name, FullName, TypeArguments) {
|
|
380
|
+
constructor(Name, FullName, TypeArguments, Type) {
|
|
290
381
|
super();
|
|
291
382
|
this.Name = Name;
|
|
292
383
|
this.FullName = FullName;
|
|
293
384
|
this.TypeArguments = TypeArguments;
|
|
385
|
+
this.Type = Type;
|
|
294
386
|
}
|
|
295
387
|
}
|
|
296
388
|
|
|
297
389
|
export function FSharpTypeReference_$reflection() {
|
|
298
|
-
return record_type("Glutinum.Converter.FSharpAST.FSharpTypeReference", [], FSharpTypeReference, () => [["Name", string_type], ["FullName", string_type], ["TypeArguments", list_type(FSharpType_$reflection())]]);
|
|
390
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpTypeReference", [], FSharpTypeReference, () => [["Name", string_type], ["FullName", string_type], ["TypeArguments", list_type(FSharpType_$reflection())], ["Type", FSharpType_$reflection()]]);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export class FSharpFunctionType extends Record {
|
|
394
|
+
constructor(Parameters, TypeArguments, ReturnType) {
|
|
395
|
+
super();
|
|
396
|
+
this.Parameters = Parameters;
|
|
397
|
+
this.TypeArguments = TypeArguments;
|
|
398
|
+
this.ReturnType = ReturnType;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export function FSharpFunctionType_$reflection() {
|
|
403
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpFunctionType", [], FSharpFunctionType, () => [["Parameters", list_type(FSharpParameter_$reflection())], ["TypeArguments", list_type(FSharpType_$reflection())], ["ReturnType", FSharpType_$reflection()]]);
|
|
299
404
|
}
|
|
300
405
|
|
|
301
406
|
export class FSharpType extends Union {
|
|
@@ -305,12 +410,12 @@ export class FSharpType extends Union {
|
|
|
305
410
|
this.fields = fields;
|
|
306
411
|
}
|
|
307
412
|
cases() {
|
|
308
|
-
return ["Enum", "Union", "Option", "Module", "Interface", "Unsupported", "Mapped", "Primitive", "TypeAlias", "Discard", "TypeReference", "TypeParameter", "ResizeArray"];
|
|
413
|
+
return ["Enum", "Union", "Option", "Module", "Interface", "Unsupported", "Mapped", "Primitive", "TypeAlias", "Discard", "TypeReference", "Tuple", "TypeParameter", "ResizeArray", "ThisType", "Function", "Class", "Object"];
|
|
309
414
|
}
|
|
310
415
|
}
|
|
311
416
|
|
|
312
417
|
export function FSharpType_$reflection() {
|
|
313
|
-
return union_type("Glutinum.Converter.FSharpAST.FSharpType", [], FSharpType, () => [[["Item", FSharpEnum_$reflection()]], [["Item", FSharpUnion_$reflection()]], [["Item", FSharpType_$reflection()]], [["Item", FSharpModule_$reflection()]], [["Item", FSharpInterface_$reflection()]], [["Item", enum_type("TypeScript.Ts.SyntaxKind", int32_type, [["Unknown", 0], ["EndOfFileToken", 1], ["SingleLineCommentTrivia", 2], ["MultiLineCommentTrivia", 3], ["NewLineTrivia", 4], ["WhitespaceTrivia", 5], ["ShebangTrivia", 6], ["ConflictMarkerTrivia", 7], ["NonTextFileMarkerTrivia", 8], ["NumericLiteral", 9], ["BigIntLiteral", 10], ["StringLiteral", 11], ["JsxText", 12], ["JsxTextAllWhiteSpaces", 13], ["RegularExpressionLiteral", 14], ["NoSubstitutionTemplateLiteral", 15], ["TemplateHead", 16], ["TemplateMiddle", 17], ["TemplateTail", 18], ["OpenBraceToken", 19], ["CloseBraceToken", 20], ["OpenParenToken", 21], ["CloseParenToken", 22], ["OpenBracketToken", 23], ["CloseBracketToken", 24], ["DotToken", 25], ["DotDotDotToken", 26], ["SemicolonToken", 27], ["CommaToken", 28], ["QuestionDotToken", 29], ["LessThanToken", 30], ["LessThanSlashToken", 31], ["GreaterThanToken", 32], ["LessThanEqualsToken", 33], ["GreaterThanEqualsToken", 34], ["EqualsEqualsToken", 35], ["ExclamationEqualsToken", 36], ["EqualsEqualsEqualsToken", 37], ["ExclamationEqualsEqualsToken", 38], ["EqualsGreaterThanToken", 39], ["PlusToken", 40], ["MinusToken", 41], ["AsteriskToken", 42], ["AsteriskAsteriskToken", 43], ["SlashToken", 44], ["PercentToken", 45], ["PlusPlusToken", 46], ["MinusMinusToken", 47], ["LessThanLessThanToken", 48], ["GreaterThanGreaterThanToken", 49], ["GreaterThanGreaterThanGreaterThanToken", 50], ["AmpersandToken", 51], ["BarToken", 52], ["CaretToken", 53], ["ExclamationToken", 54], ["TildeToken", 55], ["AmpersandAmpersandToken", 56], ["BarBarToken", 57], ["QuestionToken", 58], ["ColonToken", 59], ["AtToken", 60], ["QuestionQuestionToken", 61], ["BacktickToken", 62], ["HashToken", 63], ["EqualsToken", 64], ["PlusEqualsToken", 65], ["MinusEqualsToken", 66], ["AsteriskEqualsToken", 67], ["AsteriskAsteriskEqualsToken", 68], ["SlashEqualsToken", 69], ["PercentEqualsToken", 70], ["LessThanLessThanEqualsToken", 71], ["GreaterThanGreaterThanEqualsToken", 72], ["GreaterThanGreaterThanGreaterThanEqualsToken", 73], ["AmpersandEqualsToken", 74], ["BarEqualsToken", 75], ["BarBarEqualsToken", 76], ["AmpersandAmpersandEqualsToken", 77], ["QuestionQuestionEqualsToken", 78], ["CaretEqualsToken", 79], ["Identifier", 80], ["PrivateIdentifier", 81], ["BreakKeyword", 83], ["CaseKeyword", 84], ["CatchKeyword", 85], ["ClassKeyword", 86], ["ConstKeyword", 87], ["ContinueKeyword", 88], ["DebuggerKeyword", 89], ["DefaultKeyword", 90], ["DeleteKeyword", 91], ["DoKeyword", 92], ["ElseKeyword", 93], ["EnumKeyword", 94], ["ExportKeyword", 95], ["ExtendsKeyword", 96], ["FalseKeyword", 97], ["FinallyKeyword", 98], ["ForKeyword", 99], ["FunctionKeyword", 100], ["IfKeyword", 101], ["ImportKeyword", 102], ["InKeyword", 103], ["InstanceOfKeyword", 104], ["NewKeyword", 105], ["NullKeyword", 106], ["ReturnKeyword", 107], ["SuperKeyword", 108], ["SwitchKeyword", 109], ["ThisKeyword", 110], ["ThrowKeyword", 111], ["TrueKeyword", 112], ["TryKeyword", 113], ["TypeOfKeyword", 114], ["VarKeyword", 115], ["VoidKeyword", 116], ["WhileKeyword", 117], ["WithKeyword", 118], ["ImplementsKeyword", 119], ["InterfaceKeyword", 120], ["LetKeyword", 121], ["PackageKeyword", 122], ["PrivateKeyword", 123], ["ProtectedKeyword", 124], ["PublicKeyword", 125], ["StaticKeyword", 126], ["YieldKeyword", 127], ["AbstractKeyword", 128], ["AccessorKeyword", 129], ["AsKeyword", 130], ["AssertsKeyword", 131], ["AssertKeyword", 132], ["AnyKeyword", 133], ["AsyncKeyword", 134], ["AwaitKeyword", 135], ["BooleanKeyword", 136], ["ConstructorKeyword", 137], ["DeclareKeyword", 138], ["GetKeyword", 139], ["InferKeyword", 140], ["IntrinsicKeyword", 141], ["IsKeyword", 142], ["KeyOfKeyword", 143], ["ModuleKeyword", 144], ["NamespaceKeyword", 145], ["NeverKeyword", 146], ["OutKeyword", 147], ["ReadonlyKeyword", 148], ["RequireKeyword", 149], ["NumberKeyword", 150], ["ObjectKeyword", 151], ["SatisfiesKeyword", 152], ["SetKeyword", 153], ["StringKeyword", 154], ["SymbolKeyword", 155], ["TypeKeyword", 156], ["UndefinedKeyword", 157], ["UniqueKeyword", 158], ["UnknownKeyword", 159], ["UsingKeyword", 160], ["FromKeyword", 161], ["GlobalKeyword", 162], ["BigIntKeyword", 163], ["OverrideKeyword", 164], ["OfKeyword", 165], ["QualifiedName", 166], ["ComputedPropertyName", 167], ["TypeParameter", 168], ["Parameter", 169], ["Decorator", 170], ["PropertySignature", 171], ["PropertyDeclaration", 172], ["MethodSignature", 173], ["MethodDeclaration", 174], ["ClassStaticBlockDeclaration", 175], ["Constructor", 176], ["GetAccessor", 177], ["SetAccessor", 178], ["CallSignature", 179], ["ConstructSignature", 180], ["IndexSignature", 181], ["TypePredicate", 182], ["TypeReference", 183], ["FunctionType", 184], ["ConstructorType", 185], ["TypeQuery", 186], ["TypeLiteral", 187], ["ArrayType", 188], ["TupleType", 189], ["OptionalType", 190], ["RestType", 191], ["UnionType", 192], ["IntersectionType", 193], ["ConditionalType", 194], ["InferType", 195], ["ParenthesizedType", 196], ["ThisType", 197], ["TypeOperator", 198], ["IndexedAccessType", 199], ["MappedType", 200], ["LiteralType", 201], ["NamedTupleMember", 202], ["TemplateLiteralType", 203], ["TemplateLiteralTypeSpan", 204], ["ImportType", 205], ["ObjectBindingPattern", 206], ["ArrayBindingPattern", 207], ["BindingElement", 208], ["ArrayLiteralExpression", 209], ["ObjectLiteralExpression", 210], ["PropertyAccessExpression", 211], ["ElementAccessExpression", 212], ["CallExpression", 213], ["NewExpression", 214], ["TaggedTemplateExpression", 215], ["TypeAssertionExpression", 216], ["ParenthesizedExpression", 217], ["FunctionExpression", 218], ["ArrowFunction", 219], ["DeleteExpression", 220], ["TypeOfExpression", 221], ["VoidExpression", 222], ["AwaitExpression", 223], ["PrefixUnaryExpression", 224], ["PostfixUnaryExpression", 225], ["BinaryExpression", 226], ["ConditionalExpression", 227], ["TemplateExpression", 228], ["YieldExpression", 229], ["SpreadElement", 230], ["ClassExpression", 231], ["OmittedExpression", 232], ["ExpressionWithTypeArguments", 233], ["AsExpression", 234], ["NonNullExpression", 235], ["MetaProperty", 236], ["SyntheticExpression", 237], ["SatisfiesExpression", 238], ["TemplateSpan", 239], ["SemicolonClassElement", 240], ["Block", 241], ["EmptyStatement", 242], ["VariableStatement", 243], ["ExpressionStatement", 244], ["IfStatement", 245], ["DoStatement", 246], ["WhileStatement", 247], ["ForStatement", 248], ["ForInStatement", 249], ["ForOfStatement", 250], ["ContinueStatement", 251], ["BreakStatement", 252], ["ReturnStatement", 253], ["WithStatement", 254], ["SwitchStatement", 255], ["LabeledStatement", 256], ["ThrowStatement", 257], ["TryStatement", 258], ["DebuggerStatement", 259], ["VariableDeclaration", 260], ["VariableDeclarationList", 261], ["FunctionDeclaration", 262], ["ClassDeclaration", 263], ["InterfaceDeclaration", 264], ["TypeAliasDeclaration", 265], ["EnumDeclaration", 266], ["ModuleDeclaration", 267], ["ModuleBlock", 268], ["CaseBlock", 269], ["NamespaceExportDeclaration", 270], ["ImportEqualsDeclaration", 271], ["ImportDeclaration", 272], ["ImportClause", 273], ["NamespaceImport", 274], ["NamedImports", 275], ["ImportSpecifier", 276], ["ExportAssignment", 277], ["ExportDeclaration", 278], ["NamedExports", 279], ["NamespaceExport", 280], ["ExportSpecifier", 281], ["MissingDeclaration", 282], ["ExternalModuleReference", 283], ["JsxElement", 284], ["JsxSelfClosingElement", 285], ["JsxOpeningElement", 286], ["JsxClosingElement", 287], ["JsxFragment", 288], ["JsxOpeningFragment", 289], ["JsxClosingFragment", 290], ["JsxAttribute", 291], ["JsxAttributes", 292], ["JsxSpreadAttribute", 293], ["JsxExpression", 294], ["JsxNamespacedName", 295], ["CaseClause", 296], ["DefaultClause", 297], ["HeritageClause", 298], ["CatchClause", 299], ["AssertClause", 300], ["AssertEntry", 301], ["ImportTypeAssertionContainer", 302], ["PropertyAssignment", 303], ["ShorthandPropertyAssignment", 304], ["SpreadAssignment", 305], ["EnumMember", 306], ["UnparsedPrologue", 307], ["UnparsedPrepend", 308], ["UnparsedText", 309], ["UnparsedInternalText", 310], ["UnparsedSyntheticReference", 311], ["SourceFile", 312], ["Bundle", 313], ["UnparsedSource", 314], ["InputFiles", 315], ["JSDocTypeExpression", 316], ["JSDocNameReference", 317], ["JSDocMemberName", 318], ["JSDocAllType", 319], ["JSDocUnknownType", 320], ["JSDocNullableType", 321], ["JSDocNonNullableType", 322], ["JSDocOptionalType", 323], ["JSDocFunctionType", 324], ["JSDocVariadicType", 325], ["JSDocNamepathType", 326], ["JSDoc", 327], ["JSDocComment", 327], ["JSDocText", 328], ["JSDocTypeLiteral", 329], ["JSDocSignature", 330], ["JSDocLink", 331], ["JSDocLinkCode", 332], ["JSDocLinkPlain", 333], ["JSDocTag", 334], ["JSDocAugmentsTag", 335], ["JSDocImplementsTag", 336], ["JSDocAuthorTag", 337], ["JSDocDeprecatedTag", 338], ["JSDocClassTag", 339], ["JSDocPublicTag", 340], ["JSDocPrivateTag", 341], ["JSDocProtectedTag", 342], ["JSDocReadonlyTag", 343], ["JSDocOverrideTag", 344], ["JSDocCallbackTag", 345], ["JSDocOverloadTag", 346], ["JSDocEnumTag", 347], ["JSDocParameterTag", 348], ["JSDocReturnTag", 349], ["JSDocThisTag", 350], ["JSDocTypeTag", 351], ["JSDocTemplateTag", 352], ["JSDocTypedefTag", 353], ["JSDocSeeTag", 354], ["JSDocPropertyTag", 355], ["JSDocThrowsTag", 356], ["JSDocSatisfiesTag", 357], ["SyntaxList", 358], ["NotEmittedStatement", 359], ["PartiallyEmittedExpression", 360], ["CommaListExpression", 361], ["SyntheticReferenceExpression", 362], ["Count", 363], ["FirstAssignment", 64], ["LastAssignment", 79], ["FirstCompoundAssignment", 65], ["LastCompoundAssignment", 79], ["FirstReservedWord", 83], ["LastReservedWord", 118], ["FirstKeyword", 83], ["LastKeyword", 165], ["FirstFutureReservedWord", 119], ["LastFutureReservedWord", 127], ["FirstTypeNode", 182], ["LastTypeNode", 205], ["FirstPunctuation", 19], ["LastPunctuation", 79], ["FirstToken", 0], ["LastToken", 165], ["FirstTriviaToken", 2], ["LastTriviaToken", 7], ["FirstLiteralToken", 9], ["LastLiteralToken", 15], ["FirstTemplateToken", 15], ["LastTemplateToken", 18], ["FirstBinaryOperator", 30], ["LastBinaryOperator", 79], ["FirstStatement", 243], ["LastStatement", 259], ["FirstNode", 166], ["FirstJSDocNode", 316], ["LastJSDocNode", 357], ["FirstJSDocTagNode", 334], ["LastJSDocTagNode", 357]])]], [["Item", FSharpMapped_$reflection()]], [["Item", FSharpPrimitive_$reflection()]], [["Item", FSharpTypeAlias_$reflection()]], [], [["Item", FSharpTypeReference_$reflection()]], [["Item", string_type]], [["Item", FSharpType_$reflection()]]]);
|
|
418
|
+
return union_type("Glutinum.Converter.FSharpAST.FSharpType", [], FSharpType, () => [[["Item", FSharpEnum_$reflection()]], [["Item", FSharpUnion_$reflection()]], [["Item", FSharpType_$reflection()]], [["Item", FSharpModule_$reflection()]], [["Item", FSharpInterface_$reflection()]], [["Item", enum_type("TypeScript.Ts.SyntaxKind", int32_type, [["Unknown", 0], ["EndOfFileToken", 1], ["SingleLineCommentTrivia", 2], ["MultiLineCommentTrivia", 3], ["NewLineTrivia", 4], ["WhitespaceTrivia", 5], ["ShebangTrivia", 6], ["ConflictMarkerTrivia", 7], ["NonTextFileMarkerTrivia", 8], ["NumericLiteral", 9], ["BigIntLiteral", 10], ["StringLiteral", 11], ["JsxText", 12], ["JsxTextAllWhiteSpaces", 13], ["RegularExpressionLiteral", 14], ["NoSubstitutionTemplateLiteral", 15], ["TemplateHead", 16], ["TemplateMiddle", 17], ["TemplateTail", 18], ["OpenBraceToken", 19], ["CloseBraceToken", 20], ["OpenParenToken", 21], ["CloseParenToken", 22], ["OpenBracketToken", 23], ["CloseBracketToken", 24], ["DotToken", 25], ["DotDotDotToken", 26], ["SemicolonToken", 27], ["CommaToken", 28], ["QuestionDotToken", 29], ["LessThanToken", 30], ["LessThanSlashToken", 31], ["GreaterThanToken", 32], ["LessThanEqualsToken", 33], ["GreaterThanEqualsToken", 34], ["EqualsEqualsToken", 35], ["ExclamationEqualsToken", 36], ["EqualsEqualsEqualsToken", 37], ["ExclamationEqualsEqualsToken", 38], ["EqualsGreaterThanToken", 39], ["PlusToken", 40], ["MinusToken", 41], ["AsteriskToken", 42], ["AsteriskAsteriskToken", 43], ["SlashToken", 44], ["PercentToken", 45], ["PlusPlusToken", 46], ["MinusMinusToken", 47], ["LessThanLessThanToken", 48], ["GreaterThanGreaterThanToken", 49], ["GreaterThanGreaterThanGreaterThanToken", 50], ["AmpersandToken", 51], ["BarToken", 52], ["CaretToken", 53], ["ExclamationToken", 54], ["TildeToken", 55], ["AmpersandAmpersandToken", 56], ["BarBarToken", 57], ["QuestionToken", 58], ["ColonToken", 59], ["AtToken", 60], ["QuestionQuestionToken", 61], ["BacktickToken", 62], ["HashToken", 63], ["EqualsToken", 64], ["PlusEqualsToken", 65], ["MinusEqualsToken", 66], ["AsteriskEqualsToken", 67], ["AsteriskAsteriskEqualsToken", 68], ["SlashEqualsToken", 69], ["PercentEqualsToken", 70], ["LessThanLessThanEqualsToken", 71], ["GreaterThanGreaterThanEqualsToken", 72], ["GreaterThanGreaterThanGreaterThanEqualsToken", 73], ["AmpersandEqualsToken", 74], ["BarEqualsToken", 75], ["BarBarEqualsToken", 76], ["AmpersandAmpersandEqualsToken", 77], ["QuestionQuestionEqualsToken", 78], ["CaretEqualsToken", 79], ["Identifier", 80], ["PrivateIdentifier", 81], ["BreakKeyword", 83], ["CaseKeyword", 84], ["CatchKeyword", 85], ["ClassKeyword", 86], ["ConstKeyword", 87], ["ContinueKeyword", 88], ["DebuggerKeyword", 89], ["DefaultKeyword", 90], ["DeleteKeyword", 91], ["DoKeyword", 92], ["ElseKeyword", 93], ["EnumKeyword", 94], ["ExportKeyword", 95], ["ExtendsKeyword", 96], ["FalseKeyword", 97], ["FinallyKeyword", 98], ["ForKeyword", 99], ["FunctionKeyword", 100], ["IfKeyword", 101], ["ImportKeyword", 102], ["InKeyword", 103], ["InstanceOfKeyword", 104], ["NewKeyword", 105], ["NullKeyword", 106], ["ReturnKeyword", 107], ["SuperKeyword", 108], ["SwitchKeyword", 109], ["ThisKeyword", 110], ["ThrowKeyword", 111], ["TrueKeyword", 112], ["TryKeyword", 113], ["TypeOfKeyword", 114], ["VarKeyword", 115], ["VoidKeyword", 116], ["WhileKeyword", 117], ["WithKeyword", 118], ["ImplementsKeyword", 119], ["InterfaceKeyword", 120], ["LetKeyword", 121], ["PackageKeyword", 122], ["PrivateKeyword", 123], ["ProtectedKeyword", 124], ["PublicKeyword", 125], ["StaticKeyword", 126], ["YieldKeyword", 127], ["AbstractKeyword", 128], ["AccessorKeyword", 129], ["AsKeyword", 130], ["AssertsKeyword", 131], ["AssertKeyword", 132], ["AnyKeyword", 133], ["AsyncKeyword", 134], ["AwaitKeyword", 135], ["BooleanKeyword", 136], ["ConstructorKeyword", 137], ["DeclareKeyword", 138], ["GetKeyword", 139], ["InferKeyword", 140], ["IntrinsicKeyword", 141], ["IsKeyword", 142], ["KeyOfKeyword", 143], ["ModuleKeyword", 144], ["NamespaceKeyword", 145], ["NeverKeyword", 146], ["OutKeyword", 147], ["ReadonlyKeyword", 148], ["RequireKeyword", 149], ["NumberKeyword", 150], ["ObjectKeyword", 151], ["SatisfiesKeyword", 152], ["SetKeyword", 153], ["StringKeyword", 154], ["SymbolKeyword", 155], ["TypeKeyword", 156], ["UndefinedKeyword", 157], ["UniqueKeyword", 158], ["UnknownKeyword", 159], ["UsingKeyword", 160], ["FromKeyword", 161], ["GlobalKeyword", 162], ["BigIntKeyword", 163], ["OverrideKeyword", 164], ["OfKeyword", 165], ["QualifiedName", 166], ["ComputedPropertyName", 167], ["TypeParameter", 168], ["Parameter", 169], ["Decorator", 170], ["PropertySignature", 171], ["PropertyDeclaration", 172], ["MethodSignature", 173], ["MethodDeclaration", 174], ["ClassStaticBlockDeclaration", 175], ["Constructor", 176], ["GetAccessor", 177], ["SetAccessor", 178], ["CallSignature", 179], ["ConstructSignature", 180], ["IndexSignature", 181], ["TypePredicate", 182], ["TypeReference", 183], ["FunctionType", 184], ["ConstructorType", 185], ["TypeQuery", 186], ["TypeLiteral", 187], ["ArrayType", 188], ["TupleType", 189], ["OptionalType", 190], ["RestType", 191], ["UnionType", 192], ["IntersectionType", 193], ["ConditionalType", 194], ["InferType", 195], ["ParenthesizedType", 196], ["ThisType", 197], ["TypeOperator", 198], ["IndexedAccessType", 199], ["MappedType", 200], ["LiteralType", 201], ["NamedTupleMember", 202], ["TemplateLiteralType", 203], ["TemplateLiteralTypeSpan", 204], ["ImportType", 205], ["ObjectBindingPattern", 206], ["ArrayBindingPattern", 207], ["BindingElement", 208], ["ArrayLiteralExpression", 209], ["ObjectLiteralExpression", 210], ["PropertyAccessExpression", 211], ["ElementAccessExpression", 212], ["CallExpression", 213], ["NewExpression", 214], ["TaggedTemplateExpression", 215], ["TypeAssertionExpression", 216], ["ParenthesizedExpression", 217], ["FunctionExpression", 218], ["ArrowFunction", 219], ["DeleteExpression", 220], ["TypeOfExpression", 221], ["VoidExpression", 222], ["AwaitExpression", 223], ["PrefixUnaryExpression", 224], ["PostfixUnaryExpression", 225], ["BinaryExpression", 226], ["ConditionalExpression", 227], ["TemplateExpression", 228], ["YieldExpression", 229], ["SpreadElement", 230], ["ClassExpression", 231], ["OmittedExpression", 232], ["ExpressionWithTypeArguments", 233], ["AsExpression", 234], ["NonNullExpression", 235], ["MetaProperty", 236], ["SyntheticExpression", 237], ["SatisfiesExpression", 238], ["TemplateSpan", 239], ["SemicolonClassElement", 240], ["Block", 241], ["EmptyStatement", 242], ["VariableStatement", 243], ["ExpressionStatement", 244], ["IfStatement", 245], ["DoStatement", 246], ["WhileStatement", 247], ["ForStatement", 248], ["ForInStatement", 249], ["ForOfStatement", 250], ["ContinueStatement", 251], ["BreakStatement", 252], ["ReturnStatement", 253], ["WithStatement", 254], ["SwitchStatement", 255], ["LabeledStatement", 256], ["ThrowStatement", 257], ["TryStatement", 258], ["DebuggerStatement", 259], ["VariableDeclaration", 260], ["VariableDeclarationList", 261], ["FunctionDeclaration", 262], ["ClassDeclaration", 263], ["InterfaceDeclaration", 264], ["TypeAliasDeclaration", 265], ["EnumDeclaration", 266], ["ModuleDeclaration", 267], ["ModuleBlock", 268], ["CaseBlock", 269], ["NamespaceExportDeclaration", 270], ["ImportEqualsDeclaration", 271], ["ImportDeclaration", 272], ["ImportClause", 273], ["NamespaceImport", 274], ["NamedImports", 275], ["ImportSpecifier", 276], ["ExportAssignment", 277], ["ExportDeclaration", 278], ["NamedExports", 279], ["NamespaceExport", 280], ["ExportSpecifier", 281], ["MissingDeclaration", 282], ["ExternalModuleReference", 283], ["JsxElement", 284], ["JsxSelfClosingElement", 285], ["JsxOpeningElement", 286], ["JsxClosingElement", 287], ["JsxFragment", 288], ["JsxOpeningFragment", 289], ["JsxClosingFragment", 290], ["JsxAttribute", 291], ["JsxAttributes", 292], ["JsxSpreadAttribute", 293], ["JsxExpression", 294], ["JsxNamespacedName", 295], ["CaseClause", 296], ["DefaultClause", 297], ["HeritageClause", 298], ["CatchClause", 299], ["AssertClause", 300], ["AssertEntry", 301], ["ImportTypeAssertionContainer", 302], ["PropertyAssignment", 303], ["ShorthandPropertyAssignment", 304], ["SpreadAssignment", 305], ["EnumMember", 306], ["UnparsedPrologue", 307], ["UnparsedPrepend", 308], ["UnparsedText", 309], ["UnparsedInternalText", 310], ["UnparsedSyntheticReference", 311], ["SourceFile", 312], ["Bundle", 313], ["UnparsedSource", 314], ["InputFiles", 315], ["JSDocTypeExpression", 316], ["JSDocNameReference", 317], ["JSDocMemberName", 318], ["JSDocAllType", 319], ["JSDocUnknownType", 320], ["JSDocNullableType", 321], ["JSDocNonNullableType", 322], ["JSDocOptionalType", 323], ["JSDocFunctionType", 324], ["JSDocVariadicType", 325], ["JSDocNamepathType", 326], ["JSDoc", 327], ["JSDocComment", 327], ["JSDocText", 328], ["JSDocTypeLiteral", 329], ["JSDocSignature", 330], ["JSDocLink", 331], ["JSDocLinkCode", 332], ["JSDocLinkPlain", 333], ["JSDocTag", 334], ["JSDocAugmentsTag", 335], ["JSDocImplementsTag", 336], ["JSDocAuthorTag", 337], ["JSDocDeprecatedTag", 338], ["JSDocClassTag", 339], ["JSDocPublicTag", 340], ["JSDocPrivateTag", 341], ["JSDocProtectedTag", 342], ["JSDocReadonlyTag", 343], ["JSDocOverrideTag", 344], ["JSDocCallbackTag", 345], ["JSDocOverloadTag", 346], ["JSDocEnumTag", 347], ["JSDocParameterTag", 348], ["JSDocReturnTag", 349], ["JSDocThisTag", 350], ["JSDocTypeTag", 351], ["JSDocTemplateTag", 352], ["JSDocTypedefTag", 353], ["JSDocSeeTag", 354], ["JSDocPropertyTag", 355], ["JSDocThrowsTag", 356], ["JSDocSatisfiesTag", 357], ["SyntaxList", 358], ["NotEmittedStatement", 359], ["PartiallyEmittedExpression", 360], ["CommaListExpression", 361], ["SyntheticReferenceExpression", 362], ["Count", 363], ["FirstAssignment", 64], ["LastAssignment", 79], ["FirstCompoundAssignment", 65], ["LastCompoundAssignment", 79], ["FirstReservedWord", 83], ["LastReservedWord", 118], ["FirstKeyword", 83], ["LastKeyword", 165], ["FirstFutureReservedWord", 119], ["LastFutureReservedWord", 127], ["FirstTypeNode", 182], ["LastTypeNode", 205], ["FirstPunctuation", 19], ["LastPunctuation", 79], ["FirstToken", 0], ["LastToken", 165], ["FirstTriviaToken", 2], ["LastTriviaToken", 7], ["FirstLiteralToken", 9], ["LastLiteralToken", 15], ["FirstTemplateToken", 15], ["LastTemplateToken", 18], ["FirstBinaryOperator", 30], ["LastBinaryOperator", 79], ["FirstStatement", 243], ["LastStatement", 259], ["FirstNode", 166], ["FirstJSDocNode", 316], ["LastJSDocNode", 357], ["FirstJSDocTagNode", 334], ["LastJSDocTagNode", 357]])]], [["Item", FSharpMapped_$reflection()]], [["Item", FSharpPrimitive_$reflection()]], [["Item", FSharpTypeAlias_$reflection()]], [], [["Item", FSharpTypeReference_$reflection()]], [["Item", list_type(FSharpType_$reflection())]], [["Item", string_type]], [["Item", FSharpType_$reflection()]], [["typeName", string_type]], [["Item", FSharpFunctionType_$reflection()]], [["Item", FSharpClass_$reflection()]], []]);
|
|
314
419
|
}
|
|
315
420
|
|
|
316
421
|
export class FSharpOutFile extends Record {
|
|
@@ -333,6 +438,8 @@ export function FSharpLiteral__ToText(this$) {
|
|
|
333
438
|
return this$.fields[0].toString();
|
|
334
439
|
case 3:
|
|
335
440
|
return toString(this$.fields[0]);
|
|
441
|
+
case 4:
|
|
442
|
+
return "null";
|
|
336
443
|
default:
|
|
337
444
|
return this$.fields[0];
|
|
338
445
|
}
|
|
@@ -345,6 +452,7 @@ export function FSharpEnum__get_Type(this$) {
|
|
|
345
452
|
case 2:
|
|
346
453
|
case 1:
|
|
347
454
|
case 3:
|
|
455
|
+
case 4:
|
|
348
456
|
return false;
|
|
349
457
|
default:
|
|
350
458
|
return true;
|
|
@@ -355,6 +463,7 @@ export function FSharpEnum__get_Type(this$) {
|
|
|
355
463
|
switch (matchValue_1.tag) {
|
|
356
464
|
case 2:
|
|
357
465
|
case 1:
|
|
466
|
+
case 4:
|
|
358
467
|
return true;
|
|
359
468
|
default:
|
|
360
469
|
return false;
|
|
@@ -370,4 +479,27 @@ export function FSharpEnum__get_Type(this$) {
|
|
|
370
479
|
}
|
|
371
480
|
}
|
|
372
481
|
|
|
482
|
+
export function FSharpAccessibility__get_Text(this$) {
|
|
483
|
+
switch (this$.tag) {
|
|
484
|
+
case 1:
|
|
485
|
+
return "private";
|
|
486
|
+
case 2:
|
|
487
|
+
return "protected";
|
|
488
|
+
default:
|
|
489
|
+
return "public";
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export function FSharpConstructor_get_EmptyPublic() {
|
|
494
|
+
return new FSharpConstructor(empty(), empty(), new FSharpAccessibility(0, []));
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
export function FSharpConstructor_get_EmptyPrivate() {
|
|
498
|
+
return new FSharpConstructor(empty(), empty(), new FSharpAccessibility(1, []));
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export function FSharpTypeParameter_Create_Z6CFD3565(name, constraint_, default_) {
|
|
502
|
+
return new FSharpTypeParameter(name, constraint_, default_);
|
|
503
|
+
}
|
|
504
|
+
|
|
373
505
|
//# sourceMappingURL=FsharpAST.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Glutinum.Converter/FsharpAST.fs"],"names":["this","value","isString","matchValue","c"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Glutinum.Converter/FsharpAST.fs"],"names":["this","value","isString","matchValue","c","name","constraint_","default_"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAwBcA;;iCAES,AAAAA;;mBACSC,AAAP,AAAAD;;AACD,mBAAA,SAAA,AAAAA;;mBACN;;AAJQ,mBAAA,AAAAA;;;;;AA0BdE,qBAEG;AACOC,2BAAA,AAAAC;gBAAAD;;;;;uBAKkB;;uBAJI;;OAHhC,AAAAH;AAqBJ,QATO;AACOG,6BAAA,AAAAC;gBAAAD;;;;uBAKkB;;uBAHE;;OAJ9B,AAAAH;AAWA,eAAA;;SACJ,IAAKE;AACD,eAAA;;;AAEA,eAAA;;;;;YA\u002BEEF;;mBAEO;;mBACE;;mBAFH;;;;;WAsHZ,sBACiB,SACA,SACG;;;;WAIpB,sBACiB,SACA,SACG;;;;WAuCpB,wBACWK,MACMC,aACHC","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as fs from "fs";
|
|
2
2
|
import typescript from "typescript";
|
|
3
3
|
import { print, printOutFile, Printer_$ctor } from "./Printer.js";
|
|
4
|
-
import { transform } from "./Transform.js";
|
|
5
4
|
import { readSourceFile } from "./Read.js";
|
|
6
|
-
import {
|
|
5
|
+
import { disposeSafe, getEnumerator } from "../fable_modules/fable-library-js.4.14.0/Util.js";
|
|
6
|
+
import { warn } from "./Log.js";
|
|
7
|
+
import { transform } from "./Transform.js";
|
|
8
|
+
import { ofArray } from "../fable_modules/fable-library-js.4.14.0/List.js";
|
|
7
9
|
import { FSharpOutFile } from "./FsharpAST.js";
|
|
8
|
-
import { toString } from "../fable_modules/fable-library.4.
|
|
10
|
+
import { toString } from "../fable_modules/fable-library-js.4.14.0/Types.js";
|
|
9
11
|
|
|
10
12
|
export function generateBindingFile(filePath) {
|
|
11
13
|
if (!fs.existsSync(filePath)) {
|
|
@@ -19,8 +21,18 @@ export function generateBindingFile(filePath) {
|
|
|
19
21
|
const checker = program.getTypeChecker();
|
|
20
22
|
const sourceFile = program.getSourceFile(filePath);
|
|
21
23
|
const printer = Printer_$ctor();
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
+
const readerResult = readSourceFile(checker, sourceFile);
|
|
25
|
+
let enumerator = getEnumerator(readerResult.Warnings);
|
|
26
|
+
try {
|
|
27
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
28
|
+
warn(enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]());
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
finally {
|
|
32
|
+
disposeSafe(enumerator);
|
|
33
|
+
}
|
|
34
|
+
const res = transform(true, readerResult.GlueAST);
|
|
35
|
+
printOutFile(printer, new FSharpOutFile("Glutinum", ofArray(["Fable.Core", "Fable.Core.JsInterop", "System"])));
|
|
24
36
|
print(printer, res);
|
|
25
37
|
return toString(printer);
|
|
26
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Glutinum.Converter/Generate.fs"],"names":["filePath","options","program","checker","sourceFile","printer","res"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Glutinum.Converter/Generate.fs"],"names":["filePath","options","program","checker","sourceFile","printer","readerResult","enumerator","res"],"mappings":";;;;;;;;;;;;AAWI,QAAwC,CAArC,cAAwBA;AACvB,wBAAS,wBAAwBA;;AAIjCC;gBAEqB;gBACI;;AAGzBC,oBAAU,0BARAF,WAQqCC;AAE/CE,oBAAU,AAAAD;AAEVE,uBAAa,AAAAF,sBAAsBF;AAEnCK,oBAAU;AAEVC,yBAAe,eAAoBH,SAAQC;AAEhCG,qBAAA,cAAA,AAAAD;AAAf;AAAA,eAAe,AAAAC;AACX,iBADW,AAAAA;;;;AAAf,oBAAeA;;AAGXC,gBAAM,UAAoB,MAAK,AAAAF;AAQnC,iBAAqBD,SALjB,kBACW,YACC,SAAE,cAAc,wBAAwB;AAKxD,UAAcA,SAAQG;AAEtB,WAAA,SAAAH","file":null,"sourcesContent":null,"sourceRoot":null}
|