Skip to content

Revert "Merge pull request #27697 from mattmccutchen/issue-27118" - #30133

Merged
Nathan Shively-Sanders (sandersn) merged 2 commits into
masterfrom
revert-conditional-type-invariance
Feb 27, 2019
Merged

Nathan Shively-Sanders (sandersn) merged 2 commits into
masterfrom
revert-conditional-type-invariance

Conversation

@sandersn

Copy link
Copy Markdown
Member

This reverts commit 2dfb620, reversing
changes made to bbf559b.

The change breaks a lot of Definitely Typed.

This reverts commit 2dfb620, reversing
changes made to bbf559b.
@sandersn

Copy link
Copy Markdown
Member Author
@typescript-bot

TypeScript Bot (typescript-bot) commented Feb 27, 2019 •

Copy link
Copy Markdown
Contributor

Heya Nathan Shively-Sanders (@sandersn), I've started to run the Definitely Typed test suite on this PR at aedffe0. You can monitor the build here. It should now contribute to this PR's status checks.

@sandersn

Copy link
Copy Markdown
Member Author

Still broken after this revert

Known breaks

  1. ember/v2 -- fix at Ember workarounds and fixes for TS 3.4 DefinitelyTyped/DefinitelyTyped#33420
  2. ember-data -- fix at Ember workarounds and fixes for TS 3.4 DefinitelyTyped/DefinitelyTyped#33420
  3. jasmine -- fix at Use identity with the permissive instantation to detect nongenric instances and disable variance probing on nongeneric instances #29981

Although those fixes might now be simpler.

New breaks

  1. ember and ember__array

I'll take a look and try running with #29981's code to see if that fixes it too.

Error in ember__array
Error: /home/vsts/work/1/s/dtslint-runner/DefinitelyTyped/types/ember__array/test/array-ext.ts:20:22
ERROR: 20:22  expect  TypeScript@local compile error: 
Argument of type 'NativeArray<Person & { name: string; }>' is not assignable to parameter of type 'Person[]'.
  Types of property 'getProperties' are incompatible.
    Type '{ <K extends number | "forEach" | "map" | "filter" | "find" | "every" | "reduce" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "replace" | "slice" | "length" | "includes" | "toLocaleString" | ... 73 more ... | "frozenCopy">(list: K[]): Pick<...>; <K extends number | ... 88 more ... | "frozenCopy">(...list: K...' is not assignable to type '{ <K extends number | "forEach" | "map" | "filter" | "find" | "every" | "reduce" | "toString" | "concat" | "indexOf" | "lastIndexOf" | "replace" | "slice" | "length" | "includes" | "toLocaleString" | ... 73 more ... | "frozenCopy">(list: K[]): Pick<...>; <K extends number | ... 88 more ... | "frozenCopy">(...list: K...'. Two different types with this name exist, but they are unrelated.
      Type 'Pick<UnwrapComputedPropertyGetters<NativeArray<Person & { name: string; }>>, any>' is not assignable to type 'Pick<Person[], any>'.
        Type 'UnwrapComputedPropertyGetters<NativeArray<Person & { name: string; }>>' is missing the following properties from type 'Person[]': [Symbol.iterator], [Symbol.unscopables]
ERROR: 21:22  expect  TypeScript@local compile error: 
Argument of type 'NativeArray<Person & { name: string; }>' is not assignable to parameter of type 'Person[]'.
ERROR: 22:22  expect  TypeScript@local compile error: 
Argument of type 'NativeArray<Person & { name: string; }>' is not assignable to parameter of type 'Person[]'.
@sandersn
Nathan Shively-Sanders (sandersn) deleted the revert-conditional-type-invariance branch February 27, 2019 21:26
@sandersn

Copy link
Copy Markdown
Member Author

Yes, #29981 fixes ember and ember__array.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants