Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with TS 2.9 #26

Closed
j2L4e opened this issue Jul 28, 2018 · 5 comments
Closed

Incompatible with TS 2.9 #26

j2L4e opened this issue Jul 28, 2018 · 5 comments
Labels
enhancement New feature or request

Comments

@j2L4e
Copy link

j2L4e commented Jul 28, 2018

I'm submitting a...


[x] Bug report  

Current behavior

Compiling with TS 2.9.2 impossible due to type errors:

node_modules/@datorama/akita/src/api/entity-store.d.ts(84,5): error TS2416: Property 'update' in type 'EntityStore<S, E>' is not assignable to the same property in base type 'Store<S>'.
  Type '{ (newState: Partial<S>): any; (id: string | number | (string | number)[], newStateFn: ((entity: ...' is not assignable to type '{ (newState: Partial<S>): any; (id: string | number | (string | number)[], newState: Partial<S>):...'.
    Types of parameters 'newState' and 'id' are incompatible.
      Type 'string | number | (string | number)[]' is not assignable to type 'Partial<S>'.
        Type 'string' is not assignable to type 'Partial<S>'.


node_modules/@datorama/akita/src/api/entity-store.d.ts(85,5): error TS2416: Property 'update' in type 
'EntityStore<S, E>' is not assignable to the same property in base type 'Store<S>'.
  Type '{ (newState: Partial<S>): any; (id: string | number | (string | number)[], newStateFn: ((entity: ...' is not assignable to type '{ (newState: Partial<S>): any; (id: string | number | (string | number)[], newState: Partial<S>):...'.


node_modules/@datorama/akita/src/api/query-entity.d.ts(16,15): error TS2416: Property 'store' in type 'QueryEntity<S, E>' is not assignable to the same property in base type 'Query<S>'.
  Type 'EntityStore<S, E>' is not assignable to type 'Store<S>'.
    Types of property 'update' are incompatible.
      Type '{ (newState: Partial<S>): any; (id: string | number | (string | number)[], newStateFn: ((entity: ...' is not assignable to type '{ (newState: Partial<S>): any; (id: string | number | (string | number)[], newState: Partial<S>):...'.
        Types of parameters 'newState' and 'id' are incompatible.
          Type 'string | number | (string | number)[]' is not assignable to type 'Partial<S>'.
            Type 'string' is not assignable to type 'Partial<S>'.

Expected behavior

Compiling possible ;)

Minimal reproduction of the problem with instructions

Create instances of EntityStore and QueryEntity and try to compile your code with TS 2.9.2 installed

Environment


Angular version: 6.1.0
TS: 2.9.2
 
@filipjnc
Copy link

I've just upgraded Angular & TS and getting the same error at compile.

@goulartdev
Copy link

Same here.

@j2L4e
Copy link
Author

j2L4e commented Jul 28, 2018

Please refrain from "me too" like postings, it's just spamming everyone's inboxes

@NetanelBasal
Copy link
Collaborator

It's a new Angular version. We need to upgrade to Typescript 2.9. Working on it. Thanks.

@NetanelBasal NetanelBasal added the enhancement New feature or request label Jul 28, 2018
NetanelBasal pushed a commit that referenced this issue Jul 28, 2018
## [1.3.2](v1.3.1...v1.3.2) (2018-07-28)

### Bug Fixes

* **devtools:** custom action should override transaction action ([0ac3493](0ac3493)), closes [#22](#22)
* **query:** selectAll should respect limitTo with filterBy ([4343464](4343464)), closes [#25](#25)
* **sort:** export sorting enum ([36fe775](36fe775)), closes [#24](#24)
* **typescript:** support ts v2.9 ([51e9b0d](51e9b0d)), closes [#26](#26)
@NetanelBasal
Copy link
Collaborator

🎉 This issue has been resolved in version 1.3.2 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants