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

Do not import the whole rxjs library #117

Closed
wants to merge 3 commits into from
Closed
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
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@
},
"homepage": "https://github.com/urish/angular2-moment#readme",
"peerDependencies": {
"@angular/core": "^2.0.0-rc.5"
},
"dependencies": {
"@angular/core": "^2.0.0-rc.5",
"moment": "^2.16.0"
},
"devDependencies": {
Expand All @@ -88,6 +86,7 @@
"karma-phantomjs-launcher": "1.0.1",
"karma-sourcemap-loader": "0.3.7",
"karma-webpack": "1.7.0",
"moment": "^2.16.0",
"phantomjs-prebuilt": "2.1.7",
"reflect-metadata": "0.1.3",
"rxjs": "5.0.0-beta.12",
Expand Down
2 changes: 1 addition & 1 deletion src/add.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as moment from 'moment';

@Pipe({ name: 'amAdd' })
export class AddPipe implements PipeTransform {
transform(value: any, ...args: string[]): any {
transform(value: any, ...args: any[]): any {
if (typeof args === 'undefined' || args.length !== 2) {
throw new Error('AddPipe: missing required arguments');
}
Expand Down
2 changes: 1 addition & 1 deletion src/calendar.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import {Pipe, ChangeDetectorRef, PipeTransform, EventEmitter, OnDestroy, NgZone} from '@angular/core';
import * as moment from 'moment';
import {Subscription} from 'rxjs';
import {Subscription} from 'rxjs/Subscription';

// under systemjs, moment is actually exported as the default export, so we account for that
const momentConstructor: (value?: any) => moment.Moment = (<any>moment).default || moment;
Expand Down
2 changes: 1 addition & 1 deletion src/subtract.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as moment from 'moment';

@Pipe({ name: 'amSubtract' })
export class SubtractPipe implements PipeTransform {
transform(value: any, ...args: string[]): any {
transform(value: any, ...args: any[]): any {
if (typeof args === 'undefined' || args.length !== 2) {
throw new Error('SubtractPipe: missing required arguments');
}
Expand Down