Skip to content

Conversation

@sandersn
Copy link
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
Member Author

@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 27, 2019

Heya @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
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 sandersn merged commit 0d93eb9 into master Feb 27, 2019
@sandersn sandersn deleted the revert-conditional-type-invariance branch February 27, 2019 21:26
@sandersn
Copy link
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants