Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

chore: update to @types #1872

Merged
merged 3 commits into from
Oct 21, 2016
Merged

chore: update to @types #1872

merged 3 commits into from
Oct 21, 2016

Conversation

filipesilva
Copy link
Contributor

@filipesilva filipesilva commented Jul 12, 2016

This PR updates all examples to use @types/*. It also updates all chapters that mention typings to talk about @types/* instead.

The cli-quickstart example was removed from tests though, since the version of TS it uses is stuck in 1.8.x right now and would fail due to lack of typings.

/cc @wardbell @Foxandxss

@filipesilva
Copy link
Contributor Author

Currently blocked by DefinitelyTyped/DefinitelyTyped#10082

@filipesilva
Copy link
Contributor Author

@types/[email protected] fixes the issue in DefinitelyTyped/DefinitelyTyped#10082, so this PR can be updated and should pass CI.

@filipesilva filipesilva force-pushed the ts2.0 branch 8 times, most recently from c377fa2 to 168ecda Compare September 9, 2016 19:18
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

1 similar comment
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@googlebot googlebot added CLA: no and removed CLA: yes labels Sep 9, 2016
@Foxandxss
Copy link
Member

This needs update on other places were we pull typescript 1.x (like systemjs for plunkers and perhaps more places)

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

@filipesilva
Copy link
Contributor Author

@Foxandxss updated plunker generator and a few other places in the files provided in #2227.

Also searched for 1.8. and 1.9.0-dev throughout the project, don't seem to have found any more references to pre 2.0 TS.

@filipesilva filipesilva changed the title chore: update to typescript 2.0 chore: update to typescript 2.0 with @types Sep 14, 2016
@filipesilva filipesilva force-pushed the ts2.0 branch 2 times, most recently from c5f13e6 to 06509a5 Compare September 14, 2016 17:30
@filipesilva filipesilva changed the title chore: update to typescript 2.0 with @types chore: update to @types Sep 14, 2016
@filipesilva filipesilva force-pushed the ts2.0 branch 9 times, most recently from b153176 to 50ae0ef Compare October 13, 2016 00:16
[UMD typings](https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript#support-for-umd-module-definitions)
for a library, such as `@types/angular}, when used together with ES6 imports require the
typed to be imported as well via `import * as angular from 'angular';`.
We don't want to do this right now because we're still loading Angular 1 via a script tag.
Copy link
Member

Choose a reason for hiding this comment

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

We don't want to do this right now because we're still loading Angular 1 via a script tag.

This concrete line. Even when it is true that we don't want to do this right now (we would need to teach system.js deeply here), it sounds weird. "Hey, I am lazy, don't want to do this, so please be happy with this note".

I would reword it somehow.

@wardbell
Copy link
Contributor

wardbell commented Oct 20, 2016

I agreed that the prose needed work. I updated and force pushed and now you can't see what the passage was before I rewrote it. Here is my new version:

Why declare angular as any?

A strongly typed angular reference to Angular 1 would be great. But we can't import its UMD typings library, @types/angular, without also importing Angular 1 itself via import * as angular from 'angular'.

Angular 1 is currently loaded by a script tag in index.html and switching to an ES6 import at this time is not worth the considerable effort. Instead we declare angular as an untyped any to avoid typing errors.

If you two have no further objections AND my update survives Travis, I'll merge this in after lunch.

@Foxandxss
Copy link
Member

Yes please. I need it to work on some other stuff tomorrow 👍

@filipesilva
Copy link
Contributor Author

I agree with the edits, it looks better and addresses the problems that Jesus highlighted. Much better.

@wardbell wardbell merged commit 0d49fec into angular:master Oct 21, 2016
@wardbell wardbell deleted the ts2.0 branch October 21, 2016 00:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants