diff --git a/lib/moment-range.d.ts b/lib/moment-range.d.ts index 1bc672f..7a9bf2e 100644 --- a/lib/moment-range.d.ts +++ b/lib/moment-range.d.ts @@ -1,5 +1,5 @@ -import * as moment from 'moment'; -import {Moment, unitOfTime} from 'moment'; +import * as momentNs from 'moment'; +import moment, {Moment, unitOfTime} from 'moment'; export class DateRange { start: Moment; @@ -86,4 +86,5 @@ declare module 'moment' { } } +export function extendMoment(momentClass: typeof momentNs): MomentRange & typeof momentNs; export function extendMoment(momentClass: typeof moment): MomentRange & typeof moment; diff --git a/typing-tests/typescript/tsconfig.json b/typing-tests/typescript/tsconfig.json index f0aa7f6..01cec67 100644 --- a/typing-tests/typescript/tsconfig.json +++ b/typing-tests/typescript/tsconfig.json @@ -1,7 +1,7 @@ { "compileOnSave": false, "compilerOptions": { - "allowSyntheticDefaultImports": false, + "allowSyntheticDefaultImports": true, "baseUrl": ".", "declaration": true, "forceConsistentCasingInFileNames": true,