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
Post a Comment