mirror of https://github.com/vuejs/core.git
refactor(types/compat): improve the types for $set and $delete (#8719)
This commit is contained in:
parent
3a0b463a2c
commit
70f2f283ee
|
@ -43,8 +43,15 @@ export type LegacyPublicInstance = ComponentPublicInstance &
|
||||||
LegacyPublicProperties
|
LegacyPublicProperties
|
||||||
|
|
||||||
export interface LegacyPublicProperties {
|
export interface LegacyPublicProperties {
|
||||||
$set(target: object, key: string, value: any): void
|
$set<T extends Record<keyof any, any>, K extends keyof T>(
|
||||||
$delete(target: object, key: string): void
|
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
|
$mount(el?: string | Element): this
|
||||||
$destroy(): void
|
$destroy(): void
|
||||||
$scopedSlots: Slots
|
$scopedSlots: Slots
|
||||||
|
|
Loading…
Reference in New Issue