@golemcloud/golem-ts-typegen 0.0.11 → 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.
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -156,15 +156,15 @@ export function getTypeFromTsMorph(tsMorphType, isOptional) {
|
|
|
156
156
|
if (type.isVoid()) {
|
|
157
157
|
return { kind: "void", name: "void", optional: isOptional };
|
|
158
158
|
}
|
|
159
|
-
if (type.isBoolean()
|
|
159
|
+
if (type.isBoolean()) {
|
|
160
160
|
return { kind: "boolean", optional: isOptional };
|
|
161
161
|
}
|
|
162
162
|
if (type.isLiteral()) {
|
|
163
|
-
const literalValue = type.getLiteralValue()
|
|
163
|
+
const literalValue = type.getLiteralValue() ?? type.getText();
|
|
164
164
|
return {
|
|
165
165
|
kind: "literal",
|
|
166
166
|
name: aliasName,
|
|
167
|
-
literalValue: literalValue,
|
|
167
|
+
literalValue: literalValue.toString(),
|
|
168
168
|
optional: isOptional,
|
|
169
169
|
};
|
|
170
170
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -233227,15 +233227,15 @@ function getTypeFromTsMorph(tsMorphType, isOptional) {
|
|
|
233227
233227
|
if (type.isVoid()) {
|
|
233228
233228
|
return { kind: "void", name: "void", optional: isOptional };
|
|
233229
233229
|
}
|
|
233230
|
-
if (type.isBoolean()
|
|
233230
|
+
if (type.isBoolean()) {
|
|
233231
233231
|
return { kind: "boolean", optional: isOptional };
|
|
233232
233232
|
}
|
|
233233
233233
|
if (type.isLiteral()) {
|
|
233234
|
-
const literalValue = type.getLiteralValue()
|
|
233234
|
+
const literalValue = type.getLiteralValue() ?? type.getText();
|
|
233235
233235
|
return {
|
|
233236
233236
|
kind: "literal",
|
|
233237
233237
|
name: aliasName,
|
|
233238
|
-
literalValue: literalValue,
|
|
233238
|
+
literalValue: literalValue.toString(),
|
|
233239
233239
|
optional: isOptional,
|
|
233240
233240
|
};
|
|
233241
233241
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemcloud/golem-ts-typegen",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.12",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"tag": "test"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"commander": "^14.0.0",
|
|
65
65
|
"log-symbols": "^7.0.1",
|
|
66
66
|
"ts-morph": "^26.0.0",
|
|
67
|
-
"@golemcloud/golem-ts-types-core": "0.0.
|
|
67
|
+
"@golemcloud/golem-ts-types-core": "0.0.12"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"lint": "eslint . --ext .ts,.tsx",
|