@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 CHANGED
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-CI8-WIu4.js";
1
+ import { unpluginFactory } from "./src-k-9RVLWt.js";
2
2
  import { createVitePlugin } from "unplugin";
3
3
 
4
4
  //#region src/astro.ts
package/dist/esbuild.js CHANGED
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-CI8-WIu4.js";
1
+ import { unpluginFactory } from "./src-k-9RVLWt.js";
2
2
  import { createEsbuildPlugin } from "unplugin";
3
3
 
4
4
  //#region src/esbuild.ts
package/dist/farm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-CI8-WIu4.js";
1
+ import { unpluginFactory } from "./src-k-9RVLWt.js";
2
2
  import { createFarmPlugin } from "unplugin";
3
3
 
4
4
  //#region src/farm.ts
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { src_default, unplugin, unpluginFactory } from "./src-CI8-WIu4.js";
1
+ import { src_default, unplugin, unpluginFactory } from "./src-k-9RVLWt.js";
2
2
 
3
3
  export { src_default as default, unplugin, unpluginFactory };
package/dist/nuxt.js CHANGED
@@ -1,6 +1,6 @@
1
- import "./src-CI8-WIu4.js";
2
- import { vite_default } from "./vite-Dyi1m2wg.js";
3
- import { webpack_default } from "./webpack-CFfuQfGw.js";
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
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-CI8-WIu4.js";
1
+ import { unpluginFactory } from "./src-k-9RVLWt.js";
2
2
  import { createRolldownPlugin } from "unplugin";
3
3
 
4
4
  //#region src/rolldown.ts
package/dist/rollup.js CHANGED
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-CI8-WIu4.js";
1
+ import { unpluginFactory } from "./src-k-9RVLWt.js";
2
2
  import { createRollupPlugin } from "unplugin";
3
3
 
4
4
  //#region src/rollup.ts
package/dist/rspack.js CHANGED
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-CI8-WIu4.js";
1
+ import { unpluginFactory } from "./src-k-9RVLWt.js";
2
2
  import { createRspackPlugin } from "unplugin";
3
3
 
4
4
  //#region src/rspack.ts
@@ -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 questionToken = isMapped ? node.questionToken?.getText() ?? "" : property.flags & ts.SymbolFlags.Optional ? "?" : "";
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);
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-CI8-WIu4.js";
1
+ import { unpluginFactory } from "./src-k-9RVLWt.js";
2
2
  import { createVitePlugin } from "unplugin";
3
3
 
4
4
  //#region src/vite.ts
package/dist/vite.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./src-CI8-WIu4.js";
2
- import { vite_default } from "./vite-Dyi1m2wg.js";
1
+ import "./src-k-9RVLWt.js";
2
+ import { vite_default } from "./vite-D_E5rjeG.js";
3
3
 
4
4
  export { vite_default as default };
@@ -1,4 +1,4 @@
1
- import { unpluginFactory } from "./src-CI8-WIu4.js";
1
+ import { unpluginFactory } from "./src-k-9RVLWt.js";
2
2
  import { createWebpackPlugin } from "unplugin";
3
3
 
4
4
  //#region src/webpack.ts
package/dist/webpack.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./src-CI8-WIu4.js";
2
- import { webpack_default } from "./webpack-CFfuQfGw.js";
1
+ import "./src-k-9RVLWt.js";
2
+ import { webpack_default } from "./webpack-BQtMUXaQ.js";
3
3
 
4
4
  export { webpack_default as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue.ts/complex-types",
3
- "version": "1.0.0-beta.1",
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/language": "1.0.0-beta.1",
69
- "@vue.ts/common": "1.0.0-beta.1"
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",