diff --git a/phone/index.d.ts b/phone/index.d.ts index 4814691de8..f3bcb7576a 100644 --- a/phone/index.d.ts +++ b/phone/index.d.ts @@ -3,4 +3,5 @@ // Definitions by: Hagai Cohen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export default function phone(phoneNumber: string, countryCode?: string): Array; +declare function phone(phoneNumber: string, countryCode?: string): Array; +export = phone; diff --git a/phone/phone-tests.ts b/phone/phone-tests.ts index bc0eb7de6f..96f9984025 100644 --- a/phone/phone-tests.ts +++ b/phone/phone-tests.ts @@ -1,4 +1,4 @@ -import phone from 'phone'; +import phone = require('phone'); phone('+852 6569-8900'); // return ['+85265698900', 'HKG'] phone('(817) 569-8900'); // return ['+18175698900, 'USA']