Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix no default imports #134

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

declare module 'ical-generator' {
/** Imports must be inside the module declaration */
import moment from 'moment';
import http from 'http';
import { Moment } from 'moment';
import { ServerResponse } from 'http';

/**
* Tool for generating iCal calendar data
Expand Down Expand Up @@ -53,12 +53,12 @@ declare module 'ical-generator' {
* Information used to create calendar events
*/
interface EventData {
start: moment.Moment | Date;
start: Moment | Date;
summary: string;
id?: string;
uid?: string;
end?: moment.Moment | Date;
stamp?: moment.Moment | Date;
end?: Moment | Date;
stamp?: Moment | Date;
description?: string;
location?: string;
url?: string;
Expand All @@ -78,12 +78,12 @@ declare module 'ical-generator' {
freq: repeatingFreq;
count?: number;
interval?: number;
until?: string | moment.Moment | Date;
until?: string | Moment | Date;
byDay?: day[];
byMonth?: number[];
byMonthDay?: number[];
bySetPos?: number;
exclude?: moment.Moment[] | Date[];
exclude?: Moment[] | Date[];
}

/**
Expand Down Expand Up @@ -112,9 +112,9 @@ declare module 'ical-generator' {

interface AlarmData {
type?: alarmType;
trigger?: number | moment.Moment | Date;
triggerBefore?: number | moment.Moment | Date;
triggerAfter?: number | moment.Moment | Date;
trigger?: number | Moment | Date;
triggerBefore?: number | Moment | Date;
triggerAfter?: number | Moment | Date;
repeat?: number;
interval?: number;
attach?: string | Attachment;
Expand Down Expand Up @@ -151,7 +151,7 @@ declare module 'ical-generator' {
events(events: EventData[]): ICalCalendar;
save(path: string, cb: Function): ICalCalendar;
saveSync(path: string): number;
serve(respone: http.ServerResponse, filename: string): ICalCalendar;
serve(respone: ServerResponse, filename: string): ICalCalendar;
toString(): string;
toJSON(): any;
length(): number;
Expand All @@ -166,14 +166,14 @@ declare module 'ical-generator' {
uid(id: string): ICalEvent;
sequence(): number;
sequence(sequence: number): ICalEvent;
start(): moment.Moment;
start(start: string | moment.Moment | Date): ICalEvent;
end(): moment.Moment;
end(end: string | moment.Moment | Date): ICalEvent;
start(): Moment;
start(start: string | Moment | Date): ICalEvent;
end(): Moment;
end(end: string | Moment | Date): ICalEvent;
timezone(): string;
timezone(timezone: string): ICalEvent;
stamp(): moment.Moment;
stamp(stamp: string | moment.Moment | Date): ICalEvent;
stamp(): Moment;
stamp(stamp: string | Moment | Date): ICalEvent;
allDay(): boolean;
allDay(allDay: boolean): ICalEvent;
floating(): boolean;
Expand Down Expand Up @@ -233,12 +233,12 @@ declare module 'ical-generator' {
constructor(data: AlarmData);
type(): alarmType;
type(type: alarmType): ICalAlarm;
trigger(): number | moment.Moment;
trigger(delay: number | moment.Moment | Date | null): ICalAlarm;
triggerAfter(): number | moment.Moment;
triggerAfter(delay: number | moment.Moment | Date): ICalAlarm;
triggerBefore(): number | moment.Moment;
triggerBefore(delay: number | moment.Moment | Date): ICalAlarm;
trigger(): number | Moment;
trigger(delay: number | Moment | Date | null): ICalAlarm;
triggerAfter(): number | Moment;
triggerAfter(delay: number | Moment | Date): ICalAlarm;
triggerBefore(): number | Moment;
triggerBefore(delay: number | Moment | Date): ICalAlarm;
repeat(): number;
repeat(times: number): ICalAlarm;
interval(): number;
Expand Down