Skip to content

Commit d7acfa0

Browse files
committed
refactor: updated TypeScript Definitions
- Added missing cleanupMediaQueryListeners function - Fixed processCSSText to include optional element parameter
1 parent 68dbe07 commit d7acfa0

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/index.d.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1-
21
export type CssIfPolyfillOptions = {
3-
debug?: boolean;
4-
autoInit?: boolean;
2+
debug?: boolean;
3+
autoInit?: boolean;
54
};
65

76
// Named function exports (modern functional API)
87
export declare function init(options?: CssIfPolyfillOptions): void;
98
// eslint-disable-next-line @typescript-eslint/naming-convention
10-
export declare function processCSSText(cssText: string, options?: CssIfPolyfillOptions): string;
9+
export declare function processCSSText(
10+
cssText: string,
11+
options?: CssIfPolyfillOptions,
12+
element?: HTMLElement
13+
): string;
1114
export declare function hasNativeSupport(): boolean;
1215
export declare function refresh(): void;
16+
export declare function cleanupMediaQueryListeners(): void;
1317

1418
// CSSIfPolyfill object type for default export
1519

1620
export type CssIfPolyfillObject = {
17-
init: typeof init;
18-
processCSSText: typeof processCSSText;
19-
hasNativeSupport: typeof hasNativeSupport;
20-
refresh: typeof refresh;
21+
init: typeof init;
22+
processCSSText: typeof processCSSText;
23+
hasNativeSupport: typeof hasNativeSupport;
24+
refresh: typeof refresh;
25+
cleanup: typeof cleanupMediaQueryListeners;
2126
};
2227

2328
// Default export - object containing all functions for backward compatibility

0 commit comments

Comments
 (0)