diff --git a/packages/runtime-core/src/componentPublicInstance.ts b/packages/runtime-core/src/componentPublicInstance.ts
index 39173df66d5..0d1ff9c744c 100644
--- a/packages/runtime-core/src/componentPublicInstance.ts
+++ b/packages/runtime-core/src/componentPublicInstance.ts
@@ -194,7 +194,7 @@ export type ComponentPublicInstance<
Omit
&
Omit
: P & PublicProps & Omit
- $attrs: Omit & AllowedComponentProps
+ $attrs: Omit
$refs: Data
$slots: Slots
$root: ComponentPublicInstance | null
diff --git a/test-dts/defineComponent.test-d.tsx b/test-dts/defineComponent.test-d.tsx
index b167f1dcb87..b2ee31fbb5f 100644
--- a/test-dts/defineComponent.test-d.tsx
+++ b/test-dts/defineComponent.test-d.tsx
@@ -1315,19 +1315,6 @@ describe('define attrs', () => {
)
expectType()
})
-
- test('define attrs w/ default attrs such as class, style', () => {
- const MyComp = defineComponent({
- props: {
- foo: String
- },
- created() {
- expectType(this.$attrs.class)
- expectType(this.$attrs.style)
- }
- })
- expectType()
- })
})
// #5948
diff --git a/test-dts/defineCustomElement.test-d.ts b/test-dts/defineCustomElement.test-d.ts
index 82bb261fc3f..90a6630ccbb 100644
--- a/test-dts/defineCustomElement.test-d.ts
+++ b/test-dts/defineCustomElement.test-d.ts
@@ -159,16 +159,4 @@ describe('define attrs', () => {
}
)
})
-
- test('define attrs w/ default attrs such as class, style', () => {
- defineCustomElement({
- props: {
- foo: String
- },
- created() {
- expectType(this.$attrs.class)
- expectType(this.$attrs.style)
- }
- })
- })
})