mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Add type definitions for async methods from Meteor 2.9
This commit is contained in:
20
packages/accounts-base/accounts-base.d.ts
vendored
20
packages/accounts-base/accounts-base.d.ts
vendored
@@ -21,6 +21,10 @@ export namespace Accounts {
|
||||
fields?: Mongo.FieldSpecifier | undefined;
|
||||
}): Meteor.User | null;
|
||||
|
||||
function userAsync(options?: {
|
||||
fields?: Mongo.FieldSpecifier | undefined;
|
||||
}): Promise<Meteor.User | null>;
|
||||
|
||||
function userId(): string | null;
|
||||
|
||||
function createUser(
|
||||
@@ -33,6 +37,16 @@ export namespace Accounts {
|
||||
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
|
||||
): string;
|
||||
|
||||
function createUserAsync(
|
||||
options: {
|
||||
username?: string | undefined;
|
||||
email?: string | undefined;
|
||||
password?: string | undefined;
|
||||
profile?: Object | undefined;
|
||||
},
|
||||
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
|
||||
): Promise<string>;
|
||||
|
||||
function config(options: {
|
||||
sendVerificationEmail?: boolean | undefined;
|
||||
forbidClientAccountCreation?: boolean | undefined;
|
||||
@@ -176,6 +190,12 @@ export namespace Accounts {
|
||||
options?: { logout?: Object | undefined }
|
||||
): void;
|
||||
|
||||
function setPasswordAsync(
|
||||
userId: string,
|
||||
newPassword: string,
|
||||
options?: { logout?: Object | undefined }
|
||||
): Promise<void>;
|
||||
|
||||
function validateNewUser(func: Function): boolean;
|
||||
|
||||
function validateLoginAttempt(
|
||||
|
||||
1
packages/email/email.d.ts
vendored
1
packages/email/email.d.ts
vendored
@@ -18,6 +18,7 @@ export namespace Email {
|
||||
}
|
||||
|
||||
function send(options: EmailOptions): void;
|
||||
function sendAsync(options: EmailOptions): Promise<void>;
|
||||
function hookSend(fn: (options: EmailOptions) => boolean): void;
|
||||
function customTransport(fn: (options: CustomEmailOptions) => void): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user