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 default TypeScript export definition to conform to version 2.6.0 rules #520

Merged
merged 3 commits into from
Apr 5, 2018
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ interface Emitter {

interface PlotSize {
width?: number;
height?: number
height?: number;
}

interface PlotLayout {
Expand Down Expand Up @@ -192,7 +192,9 @@ declare var api: {
};
tickPeriod: {
get(name: string, settings?: { utc?: boolean }): { cast: (d: Date) => Date; next: (d: Date) => Date; };
add(name: string, period: { cast: (d: Date) => Date; next: (d: Date) => Date; }, settings?: { utc?: boolean }): void;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was too long according to the tslint.json file (120 characters max)

add(name: string,
period: { cast: (d: Date) => Date; next: (d: Date) => Date; },
settings?: { utc?: boolean }): void;
};
globalSettings: ChartSettings;

Expand Down Expand Up @@ -299,13 +301,15 @@ declare var api: {

declare var version: string;

export default {
Plot,
Chart,
api,
version,
declare var _default: {
Plot: typeof Plot,
Chart: typeof Chart,
api: typeof api,
version: typeof version
};

export default _default;

export {
Plot,
Chart,
Expand Down