From f3138d91708b23678516cc84a54f976da81735c4 Mon Sep 17 00:00:00 2001 From: Dave Allen Date: Tue, 14 Jun 2016 11:49:26 -0700 Subject: [PATCH 1/4] Deprecated, fixed tests to pass --- meteor/README.md | 11 ++++++++++- meteor/meteor-tests.ts | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/meteor/README.md b/meteor/README.md index d9d7898ffb..3c0b669314 100644 --- a/meteor/README.md +++ b/meteor/README.md @@ -1,4 +1,13 @@ -# Meteor Type Definitions +# Meteor Type Definitions [DEPRECATED] + +## Deprecated + +These definitions for Meteor are now deprecated. They should still work for versions of Meteor up to 1.2.1. + +The canonical TypeScript definitions for Meteor can now be found using the NPM [Typings definition manager](https://www.npmjs.com/package/typings). If you prefer to are the meteor definitions used by that tool: . + + +## Description These are the definitions for version 1.3 of Meteor. These definitions were generated from the from the same [Meteor data.js file] (https://github.com/meteor/meteor/blob/devel/docs/client/data.js) that is used to generate the official [Meteor docs] (http://docs.meteor.com/). The code that generates these definitions can be found [here](https://github.com/meteor-typescript/meteor-typescript-libs/). diff --git a/meteor/meteor-tests.ts b/meteor/meteor-tests.ts index bc877bdea0..4b5a154794 100644 --- a/meteor/meteor-tests.ts +++ b/meteor/meteor-tests.ts @@ -650,16 +650,16 @@ Accounts.emailTemplates.siteName = "AwesomeSite"; Accounts.emailTemplates.from = "AwesomeSite Admin "; Accounts.emailTemplates.headers = { asdf: 'asdf', qwer: 'qwer' }; -Accounts.emailTemplates.enrollAccount.subject = function (user) { +Accounts.emailTemplates.enrollAccount.subject = function (user: Meteor.User) { return "Welcome to Awesome Town, " + user.profile.name; }; -Accounts.emailTemplates.enrollAccount.html = function (user, url) { +Accounts.emailTemplates.enrollAccount.html = function (user: Meteor.User, url: string) { return "

Some html here

"; }; Accounts.emailTemplates.enrollAccount.from = function() { return "asdf@asdf.com"; }; -Accounts.emailTemplates.enrollAccount.text = function (user, url) { +Accounts.emailTemplates.enrollAccount.text = function (user: Meteor.User, url: string) { return "You have been selected to participate in building a better future!" + " To activate your account, simply click the link below:\n\n" + url; From ba5a120b99623910962f75970a265752d7877559 Mon Sep 17 00:00:00 2001 From: Dave Allen Date: Tue, 14 Jun 2016 11:54:31 -0700 Subject: [PATCH 2/4] Improved deprecation message in README --- meteor/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor/README.md b/meteor/README.md index 3c0b669314..7c8aa5cb1d 100644 --- a/meteor/README.md +++ b/meteor/README.md @@ -4,7 +4,7 @@ These definitions for Meteor are now deprecated. They should still work for versions of Meteor up to 1.2.1. -The canonical TypeScript definitions for Meteor can now be found using the NPM [Typings definition manager](https://www.npmjs.com/package/typings). If you prefer to are the meteor definitions used by that tool: . +The canonical TypeScript definitions for Meteor can now be found using the NPM [Typings definition manager](https://www.npmjs.com/package/typings). If you prefer to view the definitions directly, or contribute to them, they can be found here: . ## Description From ad1c05f5f12441ecc20495df12f65f7bb22e7c61 Mon Sep 17 00:00:00 2001 From: fullflavedave Date: Wed, 8 Mar 2017 08:27:20 -0800 Subject: [PATCH 3/4] Readded Accounts._hashPassword fix from merge #14718 that was just overwritten. --- meteor/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meteor/index.d.ts b/meteor/index.d.ts index 585c2ab43a..b33973f943 100644 --- a/meteor/index.d.ts +++ b/meteor/index.d.ts @@ -206,6 +206,8 @@ declare module Accounts { stop: () => void }; + function _hashPassword(password: string): { digest: string; algorithm: string; }; + interface IValidateLoginAttemptCbOpts { type: string; allowed: boolean; @@ -269,6 +271,8 @@ declare module "meteor/accounts-base" { stop: () => void }; + function _hashPassword(password: string): { digest: string; algorithm: string; }; + interface IValidateLoginAttemptCbOpts { type: string; allowed: boolean; From 1a2531a8954491702a7680ed8049eba4bed0c7af Mon Sep 17 00:00:00 2001 From: fullflavedave Date: Wed, 8 Mar 2017 08:31:02 -0800 Subject: [PATCH 4/4] Fixed README. Readded Accounts._hashPassword fix from merge #14718 that was just overwritten. --- meteor/README.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/meteor/README.md b/meteor/README.md index 616033b354..f560dd005e 100644 --- a/meteor/README.md +++ b/meteor/README.md @@ -1,13 +1,4 @@ -# Meteor Type Definitions [DEPRECATED] - -## Deprecated - -These definitions for Meteor are now deprecated. They should still work for versions of Meteor up to 1.2.1. - -The canonical TypeScript definitions for Meteor can now be found using the NPM [Typings definition manager](https://www.npmjs.com/package/typings). If you prefer to view the definitions directly, or contribute to them, they can be found here: . - - -## Description +# Meteor Type Definitions ## Description