Skip to content

Commit

Permalink
Merge pull request #128 from github/types-ts-add-window-declarations
Browse files Browse the repository at this point in the history
Add TS window declaration for Time Elements
  • Loading branch information
keithamus authored Sep 12, 2019
2 parents 840ab9e + e6a89ca commit 392a639
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@ export class TimeAgoElement extends ExtendedTimeElement {
export class TimeUntilElement extends ExtendedTimeElement {
getFormattedDate(): string | undefined
}

declare global {
interface Window {
LocalTimeElement: typeof LocalTimeElement;
RelativeTimeElement: typeof RelativeTimeElement;
TimeAgoElement: typeof TimeAgoElement;
TimeUntilElement: typeof TimeUntilElement;
}
}

0 comments on commit 392a639

Please sign in to comment.