Skip to content

docs(typings): make typings match bundles #4026

Closed

Description

@jeffbcross

Blocked by #4023 and #4025

Angular's typings files should match our bundles 1:1. See #3458 for more info about bundles.

  • angular2.d.ts (includes core, http, router)
  • core.d.ts
  • http.d.ts
  • router.d.ts
  • testing.d.ts
  • web_worker.d.ts
  • web_worker_ui.d.ts

Also make sure the typings get added to DefinitelyTyped, and get documented in our release process.

Activity

  1. self-assigned this
    on Sep 7, 2015
  2. added this to the alpha-37 milestone on Sep 7, 2015
  3. jeffbcross commented on Sep 23, 2015

    @jeffbcross
    ContributorAuthor

    @mhevery: @IgorMinar and I were just talking about changing the angular2 bundle to not provide an angular2/angular2 import path, but would still include core, router, and http dependencies, which could be imported from their documented export: angular2/core, angular2/http, angular2/router. This would remove some ambiguity for docs, so that we don't have two messages about where to import things from.

    This would be a breaking change, because no consumer could import from angular2/angular2 anymore. I think it makes things simpler, and falls in-line with the discussions you and I have had about de-coupling concerns with bundles, sources, and imports. Do you see any issues with this change?

    CC: @yjbanov @rkirov

  4. mhevery commented on Sep 23, 2015

    @mhevery
    Contributor

    @jeffbcross I thought that we will break up, but still keep angular2/angular2 as a super bundle. so you could still import from there. Looks like we need to chat some more about this.

  5. pkozlowski-opensource commented on Sep 23, 2015

    @pkozlowski-opensource
    Member

    @jeffbcross I'm experimenting with CJS bundles as discussed yesterday and one thing that comes to my mind now, as we discussing splitting code is this: if we move to CJS and want to have separate bundles for core, http etc. I guess we need to make sure that other bundles (ex. http) only import from "public" part of the core, no? Otherwise we would end up pulling the same code into multiple bundles.

    For example, looking at https://github.com/angular/angular/blob/master/modules/angular2/src/http/http.ts we can see imports like angular2/src/core/facade/async or angular2/src/core/facade/lang. Those would be totally fine with System.register but we need to think harder about those problems when moving to CJS, no?

    Sorry, didn't want to hijack the thread, but since we are talking about splitting bundles and what gets exported where, we need to take this into account.

  6. 8 remaining items

  7. modified the milestones: alpha-41, alpha-40 on Oct 7, 2015
  8. alexeagle commented on Oct 10, 2015

    @alexeagle
    Contributor

    Since we are moving away from the typings bundles and tsd/DefinitelyTyped, it would be good for this to work with the individual per-module .d.ts files now produced by the compiler.

    I think we need a couple more files added to the new test.typings.npm task from the typing_spec directory. router is there already, we should add the other use cases we expect users to want like http.

  9. alexeagle commented on Oct 10, 2015

    @alexeagle
    Contributor

    in alpha.41, this will work without any typings distribution:

    import {Component, bootstrap, View} from 'angular2/angular2';
    import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_BINDINGS} from 'angular2/router';
    import {ConnectionBackend} from 'angular2/http';
    import {AsyncTestCompleter} from 'angular2/test_lib';
    import {AnimationBuilder} from 'angular2/animate';
    import {DoCheck} from 'angular2/lifecycle_hooks';
    import {MockViewResolver} from 'angular2/mock';
    import {AbstractControl} from 'angular2/web_worker/worker';
    import {WebWorkerApplication} from 'angular2/web_worker/ui';
    

    So I think we could close this. If/when we provide bundled typings again, we'll have to decide the entry points that produce the bundles.

  10. alexeagle commented on Oct 13, 2015

    @alexeagle
    Contributor

    There is some good discussion here about bundling, but based on discussion this morning at standup, we don't need to do anything for typings right now, so I'll close this. Please re-open (or file more specific issues) if there is remaining stuff to discuss or do.

  11. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  12. locked and limited conversation to collaborators on Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions