Skip to content

Commit 5e170d3

Browse files
committed
Fix: Export the Console Interface as ConsoleLike, so that its type can be accessed
1 parent 3f18083 commit 5e170d3

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

packages/gnome-shell/src/extensions/sharedInternals.d.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,34 @@ export class GettextWrapper {
151151
}
152152

153153
/**
154-
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/extensions/sharedInternals.js#L9
154+
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/extensions/sharedInternals.js#L285
155+
* @version 48
156+
*/
157+
export interface ConsoleLike {
158+
log(...args: any[]): void;
159+
160+
warn(...args: any[]): void;
161+
162+
error(...args: any[]): void;
163+
164+
info(...args: any[]): void;
165+
166+
debug(...args: any[]): void;
167+
168+
assert(condition: boolean, ...args: any[]): void;
169+
170+
trace(...args: any[]): void;
171+
172+
group(...args: any[]): void;
173+
174+
groupEnd(): void;
175+
}
176+
177+
/**
178+
* @see https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/extensions/sharedInternals.js#L285
155179
* @version 48
156180
*/
157-
declare class Console {
181+
declare class Console implements ConsoleLike {
158182
#extension: ExtensionBase;
159183

160184
constructor(ext: ExtensionBase);

0 commit comments

Comments
 (0)