Skip to content

Commit

Permalink
refactor(types/compat): improve the types for $set and $delete (#8719)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred-Skyblue authored May 30, 2024
1 parent 3a0b463 commit 70f2f28
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/runtime-core/src/compat/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,15 @@ export type LegacyPublicInstance = ComponentPublicInstance &
LegacyPublicProperties

export interface LegacyPublicProperties {
$set(target: object, key: string, value: any): void
$delete(target: object, key: string): void
$set<T extends Record<keyof any, any>, K extends keyof T>(
target: T,
key: K,
value: T[K]
): void
$delete<T extends Record<keyof any, any>, K extends keyof T>(
target: T,
key: K
): void
$mount(el?: string | Element): this
$destroy(): void
$scopedSlots: Slots
Expand Down

0 comments on commit 70f2f28

Please sign in to comment.