@volar/vue-code-gen
Advanced tools
Comparing version 0.30.2 to 0.30.3-alpha.1
@@ -38,7 +38,7 @@ "use strict"; | ||
if (usedTypes.mergePropDefaults) { | ||
codeGen.addText(`declare function __VLS_mergePropDefaults<P, D>(props: P, defaults: D): { | ||
codeGen.addText(`type __VLS_MargePropDefaults<P, D> = { | ||
[K in keyof P]: K extends keyof D ? P[K] & { | ||
default: D[K] | ||
} : P[K] | ||
}\n`); | ||
};\n`); | ||
} | ||
@@ -155,2 +155,7 @@ if (usedTypes.ConstructorOverloads) { | ||
var _a; | ||
if (scriptSetupRanges === null || scriptSetupRanges === void 0 ? void 0 : scriptSetupRanges.withDefaultsArg) { | ||
codeGen.addText(`const __VLS_withDefaultsArg = (`); | ||
mapSubText('scriptSetup', scriptSetupRanges.withDefaultsArg.start, scriptSetupRanges.withDefaultsArg.end); | ||
codeGen.addText(`);\n`); | ||
} | ||
codeGen.addText(`export default (await import('${vueLibName}')).defineComponent({\n`); | ||
@@ -168,3 +173,3 @@ if (script && ((_a = scriptRanges === null || scriptRanges === void 0 ? void 0 : scriptRanges.exportDefault) === null || _a === void 0 ? void 0 : _a.args)) { | ||
usedTypes.mergePropDefaults = true; | ||
codeGen.addText(`__VLS_mergePropDefaults(`); | ||
codeGen.addText(`{} as __VLS_MargePropDefaults<`); | ||
} | ||
@@ -181,5 +186,4 @@ if (scriptSetupRanges.propsRuntimeArg) { | ||
if (scriptSetupRanges.withDefaultsArg) { | ||
codeGen.addText(`, `); | ||
mapSubText('scriptSetup', scriptSetupRanges.withDefaultsArg.start, scriptSetupRanges.withDefaultsArg.end); | ||
codeGen.addText(`)`); | ||
codeGen.addText(`, typeof __VLS_withDefaultsArg`); | ||
codeGen.addText(`>`); | ||
} | ||
@@ -186,0 +190,0 @@ codeGen.addText(`),\n`); |
{ | ||
"name": "@volar/vue-code-gen", | ||
"version": "0.30.2", | ||
"version": "0.30.3-alpha.1", | ||
"main": "out/index.js", | ||
@@ -26,4 +26,3 @@ "license": "MIT", | ||
"upath": "^2.0.1" | ||
}, | ||
"gitHead": "38e6c593619c0c70ddb60848c882e4c28c81056b" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137344
3111