@vue.ts/complex-types 1.0.0-beta.1 → 1.0.0-beta.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/astro.js +1 -1
- package/dist/esbuild.js +1 -1
- package/dist/farm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/nuxt.js +3 -3
- package/dist/rolldown.js +1 -1
- package/dist/rollup.js +1 -1
- package/dist/rspack.js +1 -1
- package/dist/{src-CI8-WIu4.js → src-k-9RVLWt.js} +7 -1
- package/dist/{vite-Dyi1m2wg.js → vite-D_E5rjeG.js} +1 -1
- package/dist/vite.js +2 -2
- package/dist/{webpack-CFfuQfGw.js → webpack-BQtMUXaQ.js} +1 -1
- package/dist/webpack.js +2 -2
- package/package.json +3 -3
package/dist/astro.js
CHANGED
package/dist/esbuild.js
CHANGED
package/dist/farm.js
CHANGED
package/dist/index.js
CHANGED
package/dist/nuxt.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./src-
|
|
2
|
-
import { vite_default } from "./vite-
|
|
3
|
-
import { webpack_default } from "./webpack-
|
|
1
|
+
import "./src-k-9RVLWt.js";
|
|
2
|
+
import { vite_default } from "./vite-D_E5rjeG.js";
|
|
3
|
+
import { webpack_default } from "./webpack-BQtMUXaQ.js";
|
|
4
4
|
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
5
5
|
|
|
6
6
|
//#region src/nuxt.ts
|
package/dist/rolldown.js
CHANGED
package/dist/rollup.js
CHANGED
package/dist/rspack.js
CHANGED
|
@@ -55,7 +55,8 @@ var Printer = class {
|
|
|
55
55
|
const parts = ["{"];
|
|
56
56
|
const isMapped = ts.isMappedTypeNode(node);
|
|
57
57
|
for (const property of properties) {
|
|
58
|
-
const
|
|
58
|
+
const isOptional = property.flags & ts.SymbolFlags.Optional;
|
|
59
|
+
const questionToken = isMapped ? node.questionToken?.getText() ?? "" : isOptional ? "?" : "";
|
|
59
60
|
const valueType = this.checker.getTypeOfSymbol(property);
|
|
60
61
|
const stringValueType = this.typeToString(this.getBaseType(valueType));
|
|
61
62
|
parts.push(`${this.checker.symbolToString(property)}${questionToken}: ${stringValueType}`);
|
|
@@ -174,6 +175,11 @@ var Printer = class {
|
|
|
174
175
|
return `[${elements.join(", ")}]`;
|
|
175
176
|
}
|
|
176
177
|
printConditionalTypeNode(node) {
|
|
178
|
+
const conditionalType = this.checker.getTypeAtLocation(node);
|
|
179
|
+
if (conditionalType && !(conditionalType.flags & ts.TypeFlags.Conditional)) {
|
|
180
|
+
const resolvedTypeString = this.typeToString(conditionalType);
|
|
181
|
+
if (resolvedTypeString !== node.getText()) return resolvedTypeString;
|
|
182
|
+
}
|
|
177
183
|
const checkType = this.print(node.checkType);
|
|
178
184
|
const extendsType = this.print(node.extendsType);
|
|
179
185
|
const trueType = this.print(node.trueType);
|
package/dist/vite.js
CHANGED
package/dist/webpack.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue.ts/complex-types",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"author": "Ray <i@mk1.io> (@so1ve)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Resolve complex types in Vue SFCs.",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@nuxt/kit": "^3.17.6",
|
|
66
66
|
"magic-string": "^0.30.17",
|
|
67
67
|
"unplugin": "^2.3.5",
|
|
68
|
-
"@vue.ts/
|
|
69
|
-
"@vue.ts/
|
|
68
|
+
"@vue.ts/common": "1.0.0-beta.2",
|
|
69
|
+
"@vue.ts/language": "1.0.0-beta.2"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@nuxt/schema": "^3.17.6",
|