Skip to content

Commit

Permalink
Add InjectionManager
Browse files Browse the repository at this point in the history
  • Loading branch information
flexagoon committed Dec 24, 2024
1 parent 774a631 commit 913e97d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/gnome-shell/src/extensions/extension.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ export class Extension extends ExtensionBase {
disable(): void;
}

/**
* @version 47
*/
export class InjectionManager {
overrideMethod<T, M extends keyof T, F extends T[M] extends (...args: any[]) => any ? T[M] : never>(prototype: T, methodName: M, createOverrideFunc: (this: T, originalMethod: F) => (this: T, ...args: Parameters<F>) => ReturnType<F>): void;
restoreMethod<T, M extends keyof T>(prototype: T, methodName: M): void;
clear(): void;
}

export declare const gettext: TranslationFunctions['gettext'];
export declare const ngettext: TranslationFunctions['ngettext'];
export declare const pgettext: TranslationFunctions['pgettext'];

0 comments on commit 913e97d

Please sign in to comment.