Skip to content
This repository was archived by the owner on Jul 30, 2018. It is now read-only.
This repository was archived by the owner on Jul 30, 2018. It is now read-only.

TypeScript 2.2 Object and Intersection Types #118

Closed

Description

@matt-gadd

TypeScript 2.2 will have Object and Intersection types, microsoft/TypeScript#13604 which should drastically improve our inference through mixins and this.

We should look to see what improvements this can bring in terms of typing.

The code for this is in master so available under typescript@next

Activity

  1. modified the milestones: 2017.02, 2017.01 on Jan 24, 2017
  2. maier49 commented on Jan 26, 2017

    @maier49
    Contributor

    From what I've gathered, I'm not sure this can be directly leveraged to improve typing in compose. Having classes and interface be able to derive from objects can be handy for certain mixin patterns, but I'm not seeing a way to fit it into compose. The main benefit for compose I can see from these changes is the fact that the this type of an intersection is now the intersection but this is more of an indirect benefit to users of the library. For example, a previous iteration of the stores API had something like this

    interface QueryMixin {
      query(query: Query): this;
    }
    

    Types like this would work a lot better now because QueryMixin & Store & ... would properly return itself from a query.

  3. modified the milestones: 2017.01, 2017.02 on Jan 31, 2017
  4. agubler commented on Feb 15, 2017

    @agubler
    Member

    @matt-gadd I think we can close this now after the move to TS2.2?

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