@volar/vue-language-core
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -62,6 +62,2 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
export type ExtractProps<T> = | ||
T extends (...args: any) => { props: infer Props } ? Props | ||
: T extends new (...args: any) => { $props: infer Props } ? Props | ||
: T; // IntrinsicElement | ||
export type ReturnVoid<T> = T extends (...payload: infer P) => any ? (...payload: P) => void : (...args: any) => void; | ||
@@ -105,3 +101,2 @@ export type EmitEvent2<F, E> = | ||
unknown; | ||
export type GlobalAttrs = JSX.IntrinsicElements['div']; | ||
export type SelfComponent<N, C> = string extends N ? {} : N extends string ? { [P in N]: C } : {}; | ||
@@ -115,3 +110,7 @@ export type GetComponents<Components, N1, N2 = unknown, N3 = unknown> = | ||
${vueCompilerOptions.strictTemplates ? '' : 'Record<string, unknown> &'} | ||
ExtractProps<T>; | ||
( | ||
T extends (...args: any) => any ? (T extends (...args: any) => { props: infer Props } ? Props : {}) | ||
: T extends new (...args: any) => any ? (T extends new (...args: any) => { $props: infer Props } ? Props : {}) | ||
: T; // IntrinsicElement | ||
); | ||
export type InstanceProps<I, C> = I extends { $props: infer Props } ? Props & Record<string, unknown> : C & Record<string, unknown>; | ||
@@ -127,2 +126,4 @@ export type EventObject<I, K1 extends string, C, E1> = { | ||
}; | ||
type GlobalAttrs = JSX.IntrinsicElements['div']; | ||
`; | ||
@@ -129,0 +130,0 @@ } |
@@ -12,7 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
getTextMode: ({ tag, props }, parent) => { | ||
if (!parent && tag !== 'template' && props.some(p => p.type === 6 /* compiler.NodeTypes.ATTRIBUTE */ && | ||
p.name === 'lang' && | ||
p.value && | ||
p.value.content && | ||
p.value.content !== 'html')) { | ||
if ((!parent && tag !== 'template') | ||
|| (tag === 'template' | ||
&& props.some(p => p.type === 6 /* compiler.NodeTypes.ATTRIBUTE */ && | ||
p.name === 'lang' && | ||
p.value && | ||
p.value.content && | ||
p.value.content !== 'html'))) { | ||
return 2 /* compiler.TextModes.RAWTEXT */; | ||
@@ -19,0 +21,0 @@ } |
{ | ||
"name": "@volar/vue-language-core", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"main": "out/index.js", | ||
@@ -16,4 +16,4 @@ "license": "MIT", | ||
"dependencies": { | ||
"@volar/language-core": "1.0.7", | ||
"@volar/source-map": "1.0.7", | ||
"@volar/language-core": "1.0.8", | ||
"@volar/source-map": "1.0.8", | ||
"@vue/compiler-dom": "^3.2.40", | ||
@@ -29,3 +29,3 @@ "@vue/compiler-sfc": "^3.2.40", | ||
}, | ||
"gitHead": "96cc1acd9c16ad9cb46638a54f088199f7dddfad" | ||
"gitHead": "10d1a6a8b4011adee0a7c309da25caae7fb4fea9" | ||
} |
Sorry, the diff of this file is too big to display
226884
4929
+ Added@volar/language-core@1.0.8(transitive)
+ Added@volar/source-map@1.0.8(transitive)
- Removed@volar/language-core@1.0.7(transitive)
- Removed@volar/source-map@1.0.7(transitive)
Updated@volar/language-core@1.0.8
Updated@volar/source-map@1.0.8