angular - use javascript package into typescript project -


i'm using package: parsley-payment.

i'm not able figure out how use it. so, i've installed don't know how indicate typescript/webpack load package.

as can see on here looks like:

(function () {     'use strict';      window.parsley.addvalidator('creditcard',         function (value, requirement) {             var valid = jquery.payment.validatecardnumber(value);              // checks specific brands             if(valid && requirement.length){                 var valid_cards = requirement.split(','),                     valid = false,                     card = jquery.payment.cardtype(value);                  if(requirement.indexof(card) > -1) {                     valid = true;                 }             }             return valid; },32) ... 

i don't know if i've explained well.

up now, i've tried import module:

import 'parsley-payment'; 

nevertheless, i'm getting error:

error typeerror: jquery.payment undefined


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -