From 0b89ca3e31eaa9cdf08d210a57e240dd950a56ca Mon Sep 17 00:00:00 2001 From: durad Date: Sun, 22 Jan 2017 21:10:12 -0800 Subject: [PATCH] Changed definition of lorem-ipsum to allow ES6 style imports (#14166) * Implemented match, isMath and find * Added all functions * Made options optional. * Added tslint.json and fixed lint errors * Fixed definition for mapping function * Fixed issue with strict nulls * Added definition for lorem-ipsum * Added namespace to lorem-ipsum to allow ES6 style imports --- lorem-ipsum/index.d.ts | 2 ++ lorem-ipsum/lorem-ipsum-tests.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lorem-ipsum/index.d.ts b/lorem-ipsum/index.d.ts index 825136f207..0a2210c0d8 100644 --- a/lorem-ipsum/index.d.ts +++ b/lorem-ipsum/index.d.ts @@ -55,6 +55,8 @@ interface LoremIpsumOptions { suffix?: string; } +declare namespace loremIpsum {} + /** * Generate a passage of lorem ipsum text. */ diff --git a/lorem-ipsum/lorem-ipsum-tests.ts b/lorem-ipsum/lorem-ipsum-tests.ts index dd5eb82ba6..697c222257 100644 --- a/lorem-ipsum/lorem-ipsum-tests.ts +++ b/lorem-ipsum/lorem-ipsum-tests.ts @@ -1,4 +1,4 @@ -import loremIpsum = require('lorem-ipsum'); +import * as loremIpsum from 'lorem-ipsum'; let result: string; result = loremIpsum();