Create numeric Mask

Hi guys,
in ionic V4 i try to create a numeric mask for currency input, i m using TextMaskModule.and i want pass a function that i found on here :

for first i installed angular2-text-mask and added to import of module

import { Routes, RouterModule } from '@angular/router';
import { TextMaskModule } from 'angular2-text-mask';
import { IonicModule } from '@ionic/angular';

import { FormPage } from './form.page';

const routes: Routes = [
  {
    path: '',
    component: FormPage
  }
];

@NgModule({
  imports: [
    CommonModule,
    ReactiveFormsModule,
    FormsModule,
    TextMaskModule,
    IonicModule,
    RouterModule.forChild(routes)
  ],

i created a new file js with the function and tried to add in my page.ts:

import * as  createNumberMask from '../../assets/js/currency.js';

declare var createNumberMask: any;

@Component({
  selector: 'app-form',
  templateUrl: './form.page.html',
  styleUrls: ['./form.page.scss'],
})
export class FormPage implements OnInit {

  isSubmitted = false;

  currencyMask = createNumberMask();

in HTML

 <ion-input [textMask]="currencyMask" type="number" placeholder="Currency" formControlName="currency"></ion-input>

but i retrive this error:

image

how can i solve this?

thank you for support