Meteor 使用Angular2和Typescript定义集合FS集合
我正在尝试使用typescript在angular2-meteor应用程序中定义一个集合。这就是我所拥有的不起作用的东西:Meteor 使用Angular2和Typescript定义集合FS集合,meteor,typescript,angular,collectionfs,angular2-meteor,Meteor,Typescript,Angular,Collectionfs,Angular2 Meteor,我正在尝试使用typescript在angular2-meteor应用程序中定义一个集合。这就是我所拥有的不起作用的东西: export var Images = new CollectionFS("images", { stores: [new FileSystem("images", {path: "~/uploads"})] }); 我得到一个错误: [web.browser] collections/pdfs.ts (1, 25): Cannot find name 'Coll
export var Images = new CollectionFS("images", {
stores: [new FileSystem("images", {path: "~/uploads"})]
});
我得到一个错误:
[web.browser] collections/pdfs.ts (1, 25): Cannot find name 'CollectionFS'.
[web.browser] collections/pdfs.ts (2, 18): Cannot find name 'FileSystem'.
我还尝试使用传统的CollectionFS定义:
export var Images = new FS.Collection("images", {
stores: [new FS.Store.FileSystem("images", {path: "~/uploads"})]
});
我得到的错误是:
[web.browser] collections/pdfs.ts (1, 25): Cannot find name 'FS'.
[web.browser] collections/pdfs.ts (2, 18): Cannot find name 'FS'.
有什么想法吗?对于atmospherejs添加的软件包,这很有效
declare var lodash: any;
试一试
我在谷歌上发现,这些信息与打字有关。“我不知道它是不是官方的,你可以看一看。”埃里克·马丁内斯我也发现了。这就是collectionFS在该包中的定义,我只是不确定如何将其合并,谢谢您的回复。你能解释一下你的答案吗。什么atmospherejs包?请提供完整的collectionFS集合定义。
declare var CollectionFS: any;