Aurelia 奥雷利亚商店-不动产';拔';不存在于类型';可观察<;{}>';
我有一个Aurelia CLI(0.33)应用程序(Webpack 4,Typescript)并使用Aurelia store 主要内容包括Aurelia 奥雷利亚商店-不动产';拔';不存在于类型';可观察<;{}>';,aurelia,aurelia-store,Aurelia,Aurelia Store,我有一个Aurelia CLI(0.33)应用程序(Webpack 4,Typescript)并使用Aurelia store 主要内容包括 import { initialState } from './state'; ... aurelia.use.plugin(PLATFORM.moduleName('aurelia-store'), { initialState }); 我的州 import { Meal } from './models/Meal'; export interf
import { initialState } from './state';
...
aurelia.use.plugin(PLATFORM.moduleName('aurelia-store'), { initialState });
我的州
import { Meal } from './models/Meal';
export interface State {
meals: Meal[],
numbers: number[]
}
export const initialState: State = {
meals: [{key: '', name: 'EMPTY', description: '', vegetarian: false}],
numbers: []
};
我的观点类:
import { connectTo } from 'aurelia-store';
import { pluck } from 'rxjs/operators';
import { State } from './../../state';
@connectTo((store) => store.state.pluck("meals"))
export class BookMeals {
public state: State;
}
如果我不使用Pulk(@connectTo()),我可以在我的视图中使用store.fines,并且一切正常,但是当我尝试使用Pulk时,我在编译器中得到一个错误,说“TS2339:Property‘pulk’在类型‘observeable’上不存在。”
我试过:
-卸下节点U模块
-纱线安装
-npm安装
错误仍然存在
package.json
...
"aurelia-store": "^1.0.0",
"rxjs": "^6.2.2",
...
有什么问题吗?RxJs 6新增了Pull的语法。你需要管道操作员,并在那里通过拔管。在官方回购协议中,您的问题还有一个GitHub问题