Skip to content

Commit 392a639

Browse files
authored
Merge pull request #128 from github/types-ts-add-window-declarations
Add TS window declaration for Time Elements
2 parents 840ab9e + e6a89ca commit 392a639

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

index.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,12 @@ export class TimeAgoElement extends ExtendedTimeElement {
1919
export class TimeUntilElement extends ExtendedTimeElement {
2020
getFormattedDate(): string | undefined
2121
}
22+
23+
declare global {
24+
interface Window {
25+
LocalTimeElement: typeof LocalTimeElement;
26+
RelativeTimeElement: typeof RelativeTimeElement;
27+
TimeAgoElement: typeof TimeAgoElement;
28+
TimeUntilElement: typeof TimeUntilElement;
29+
}
30+
}

0 commit comments

Comments
 (0)