From 69bf8ef4e5b2f8165c861787e7fdc5833d74a2cd Mon Sep 17 00:00:00 2001 From: Guy Date: Fri, 7 Oct 2016 12:52:10 -0700 Subject: [PATCH] Update to match braintree-web version 3.3.0 (#11832) --- braintree-web/braintree-web-tests.ts | 3 ++- braintree-web/braintree-web.d.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/braintree-web/braintree-web-tests.ts b/braintree-web/braintree-web-tests.ts index 40b34df418..9d48e2fd25 100644 --- a/braintree-web/braintree-web-tests.ts +++ b/braintree-web/braintree-web-tests.ts @@ -50,7 +50,8 @@ braintree.client.create({ selector: '#card-number' }, cvv: { - selector: '#cvv' + selector: '#cvv', + type: 'password' }, expirationDate: { selector: '#expiration-date' diff --git a/braintree-web/braintree-web.d.ts b/braintree-web/braintree-web.d.ts index 2cf2d89467..4f684c6299 100644 --- a/braintree-web/braintree-web.d.ts +++ b/braintree-web/braintree-web.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Braintree-web v3.0.2 +// Type definitions for Braintree-web v3.3.0 // Project: https://github.com/braintree/braintree-web // Definitions by: Guy Shahine // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -540,11 +540,13 @@ declare namespace BraintreeWeb { * @typedef {object} field * @property {string} selector A CSS selector to find the container where the hosted field will be inserted. * @property {string} [placeholder] Will be used as the `placeholder` attribute of the input. If `placeholder` is not natively supported by the browser, it will be polyfilled. + * @property {string} [type] Will be used as the `type` attribute of the input. To mask `cvv` input, for instance, `type: "password"` can be used. * @property {boolean} [formatInput=true] - Enable or disable automatic formatting on this field. Note: Input formatting does not work properly on Android and iOS, so input formatting is automatically disabled on those browsers. */ interface HostedFieldsField { selector: string; placeholder?: string; + type?: string; formatInput?: boolean; }