Skip to content

fix(typescript): use correct ts version and fix promise types #510

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

Closed
wants to merge 5 commits into from

Conversation

jeffbcross
Copy link
Contributor

@jeffbcross jeffbcross commented Sep 15, 2016

  • Updates TS version
  • Makes aot-friendly packaging (including UMD bundle)
  • Runs Karma against bundle
  • Tests that prod build step does not error on Travis

@@ -44,6 +44,7 @@
"devDependencies": {
"@angular/compiler-cli": "^0.5.0",
"@angular/platform-server": "^2.0.0-rc.5",
"@types/es6-promise": "0.0.31",

Choose a reason for hiding this comment

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

this is bad, why can't you change the other side to use lib.es2015.promise.d.ts instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lol

@@ -69,7 +70,7 @@
"traceur": "0.0.96",
"tsd": "^0.6.5",
"typedoc": "github:jeffbcross/typedoc",
"typescript": "next",
"typescript": "^1.9.0-dev.20160627-1.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Firebase requires 2.0+.

Angular's compiler CLI requires typescript@^1.9.0-dev. The built-in
Promise typings for that version of	TS don't play well with Firebase
Promise when using Promise.resolve, so the firebase_sdk_auth_backend
has a function that will cast the promises as the correct type.
@@ -1,24 +1,24 @@
import { Observable } from 'rxjs/Observable';
import { ScalarObservable } from 'rxjs/observable/ScalarObservable';
import 'rxjs/add/observable/of';
Copy link
Contributor

Choose a reason for hiding this comment

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

can you use the non-sideeffecty version instead?

OrderBySelection,
LimitToOptions,
LimitToSelection,
Primitive
} from '../interfaces';
import 'rxjs/add/operator/merge';
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto here - import {merge} from 'rxjs/operator/merge' , merge.call()

@jeffbcross
Copy link
Contributor Author

I'll ditch the side-effect operators and observables.

This change introduces a UMD bundle to the published package, and
adds ES2015 modules to the root of the project. Some changes
were necessary to fix imports and make rollup work correctly.

This change should make AngularFire2 ahead-of-time-compilation
-friendly.
Also removed side-effects from tests to verify that code under test wouldn't
accidentally rely on a patched operator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants