Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(language-core): introduce options to control type inference of $attrs, $el, $refs and $slots #5135

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

KazariEX
Copy link
Collaborator

@KazariEX KazariEX commented Jan 18, 2025

fix #5128

{
	"typedDollarAttrs": {
		"type": ["boolean", "object"],
		"default": {
			"self": true
		},
		"markdownDescription": "\"self\" to control the type inference of `$attrs` in the template and the return type of `useAttrs`."
	},
	"typedDollarEl": {
		"type": ["boolean", "object"],
		"default": {
			"self": true,
			"expose": false
		},
		"markdownDescription": "\"self\" to control the type inference of `$el` in the template, \"expose\" to control the type inference of `$el` on the component instance."
	},
	"typedDollarRefs": {
		"type": ["boolean", "object"],
		"default": {
			"self": true,
			"expose": false
		},
		"markdownDescription": "\"self\" to control the type inference of `$refs` in the template, \"expose\" to control the type inference of `$refs` on the component instance."
	},
	"typedDollarSlots": {
		"type": ["boolean", "object"],
		"default": {
			"self": true
		},
		"markdownDescription": "\"self\" to control the type inference of `$slots` in the template and the return type of `useSlots`."
	}
}

@KazariEX KazariEX changed the title feat(language-core): introduce options to control types of $attrs, $el, $refs and $slots feat(language-core): introduce options to control type inference of $attrs, $el, $refs and $slots Jan 18, 2025
Copy link

pkg-pr-new bot commented Jan 18, 2025

Open in Stackblitz

vue-component-meta

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-meta@5135

vue-component-type-helpers

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-type-helpers@5135

@vue/language-plugin-pug

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-plugin-pug@5135

@vue/language-core

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-core@5135

@vue/language-server

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-server@5135

@vue/language-service

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-service@5135

vue-tsc

npm i https://pkg.pr.new/vuejs/language-tools/vue-tsc@5135

@vue/typescript-plugin

npm i https://pkg.pr.new/vuejs/language-tools/@vue/typescript-plugin@5135

commit: b613afc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

循环引入导致的诡异问题
1 participant