We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am getting this error in typescript. The code is working but I am getting this error:
both/methods/collections.methods.ts (82, 69): Property 'get' does not exist on type 'CollectionStatic'.
This is because of the interface CollectionStatic does not have the get function. I have attempted to add this but I cannot get it to work.
export module Mongo { var Collection: CollectionStatic; interface CollectionStatic { new <T>(name: string, options?: { connection?: Object; idGeneration?: string; transform?: Function; }): Collection<T>; //get(name: string, options?): any; //does not work } interface Collection<T> { allow(options: { insert?: (userId: string, doc: T) => boolean; update?: (userId: string, doc: T, fieldNames: string[], modifier: any) => boolean; remove?: (userId: string, doc: T) => boolean; fetch?: string[]; transform?: Function; }): boolean; deny(options: { insert?: (userId: string, doc: T) => boolean; update?: (userId: string, doc: T, fieldNames: string[], modifier: any) => boolean; remove?: (userId: string, doc: T) => boolean; fetch?: string[]; transform?: Function; }): boolean; find(selector?: Mongo.Selector | Mongo.ObjectID | string, options?: { sort?: Mongo.SortSpecifier; skip?: number; limit?: number; fields?: Mongo.FieldSpecifier; reactive?: boolean; transform?: Function; }): Mongo.Cursor<T>; findOne(selector?: Mongo.Selector | Mongo.ObjectID | string, options?: { sort?: Mongo.SortSpecifier; skip?: number; fields?: Mongo.FieldSpecifier; reactive?: boolean; transform?: Function; }): T; insert(doc: T, callback?: Function): string; rawCollection(): any; rawDatabase(): any; remove(selector: Mongo.Selector | Mongo.ObjectID | string, callback?: Function): number; update(selector: Mongo.Selector | Mongo.ObjectID | string, modifier: Mongo.Modifier, options?: { multi?: boolean; upsert?: boolean; }, callback?: Function): number; upsert(selector: Mongo.Selector | Mongo.ObjectID | string, modifier: Mongo.Modifier, options?: { multi?: boolean; }, callback?: Function): { numberAffected?: number; insertedId?: string; }; _ensureIndex(indexName: string, options?: { [key: string]: any }): void; } var Cursor: CursorStatic; interface CursorStatic { new <T>(): Cursor<T>; } interface Cursor<T> { count(): number; fetch(): Array<T>; forEach(callback: <T>(doc: T, index: number, cursor: Mongo.Cursor<T>) => void, thisArg?: any): void; map<U>(callback: (doc: T, index: number, cursor: Mongo.Cursor<T>) => U, thisArg?: any): Array<U>; observe(callbacks: Object): Meteor.LiveQueryHandle; observeChanges(callbacks: Object): Meteor.LiveQueryHandle; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am getting this error in typescript. The code is working but I am getting this error:
both/methods/collections.methods.ts (82, 69): Property 'get' does not exist on type 'CollectionStatic'.
This is because of the interface CollectionStatic does not have the get function. I have attempted to add this but I cannot get it to work.
The text was updated successfully, but these errors were encountered: