0

我已经安装了angular-akita。我已将npm更新到最新版本。我也有最新的打字稿。

请帮忙。

ng-serve --o

ERROR in 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: Readonly<E>) => Partial<E>) | Partial<E>): any; }' is not assignable to type '{ (newState: Partial<S>): any; (id: string | number | (string | number)[], newState: Partial<S>): any; }'.
    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: Readonly<E>) => Partial<E>) | Partial<E>): any; }' is not assignable to type '{ (newState: Partial<S>): any; (id: string | number | (string | number)[], newState: Partial<S>): any; }'.
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: Readonly<E>) => Partial<E>) | Partial<E>): any; }' is not assignable to type '{ (newState: Partial<S>): any; (id: string | number | (string | number)[], newState: Partial<S>): any; }'.
        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>'.
src/app/state/shopika.service.ts(7,8): error TS1192: Module '"C:/Shopika/src/main"' has no default export.

下面是我的 package.json :

{
  "name": "shopika",
  "version": "0.0.0",
  "private": true,
  "dependencies": {
    "@angular/common": "6.0.0",
    "@angular/compiler": "6.0.0",
    "@angular/core": "6.0.0",
    "@angular/forms": "6.0.0",
    "@angular/platform-browser": "6.0.0",
    "@angular/platform-browser-dynamic": "6.0.0",
    "@angular/router": "6.0.0",
    "@datorama/akita": "^1.2.1",
    "core-js": "2.5.5",
    "normalizr": "3.2.4",
    "rxjs": "6.1.0",
    "zone.js": "0.8.26"
  },
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.10.0",
    "@angular/cli": "~7.0.2",
    "@angular/compiler-cli": "~7.0.0",
    "@angular/language-service": "~7.0.0",
    "@types/node": "~8.9.4",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~3.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "~3.1.1"
  }
}
4

0 回答 0