mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-29 17:51:46 +00:00
More detailed typing for Meteor.methods(), fixed User model.
This commit is contained in:
Vendored
+10
-2
@@ -25,7 +25,7 @@ declare module Meteor {
|
||||
_id?: string;
|
||||
username?: string;
|
||||
emails?: UserEmail[];
|
||||
createdAt?: number;
|
||||
createdAt?: Date;
|
||||
profile?: any;
|
||||
services?: any;
|
||||
}
|
||||
@@ -49,7 +49,15 @@ declare module Meteor {
|
||||
/** Error **/
|
||||
|
||||
/** Method **/
|
||||
function methods(methods: Object): void;
|
||||
interface MethodThisType {
|
||||
isSimulation: boolean;
|
||||
userId: string | null;
|
||||
connection: Connection | null;
|
||||
setUserId(userId: string): void;
|
||||
unblock(): void;
|
||||
}
|
||||
|
||||
function methods(methods: {[key: string]: (this: MethodThisType, ...args: any[]) => any}): void;
|
||||
|
||||
function call(name: string, ...args: any[]): any;
|
||||
|
||||
|
||||
Vendored
+10
-2
@@ -26,7 +26,7 @@ declare module "meteor/meteor" {
|
||||
_id?: string;
|
||||
username?: string;
|
||||
emails?: UserEmail[];
|
||||
createdAt?: number;
|
||||
createdAt?: Date;
|
||||
profile?: any;
|
||||
services?: any;
|
||||
}
|
||||
@@ -50,7 +50,15 @@ declare module "meteor/meteor" {
|
||||
/** Error **/
|
||||
|
||||
/** Method **/
|
||||
function methods(methods: Object): void;
|
||||
interface MethodThisType {
|
||||
isSimulation: boolean;
|
||||
userId: string | null;
|
||||
connection: Connection | null;
|
||||
setUserId(userId: string): void;
|
||||
unblock(): void;
|
||||
}
|
||||
|
||||
function methods(methods: {[key: string]: (this: MethodThisType, ...args: any[]) => any}): void;
|
||||
|
||||
function call(name: string, ...args: any[]): any;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user