From fa2c66bdb4d1ab3c5baf8392b52384b10af89af8 Mon Sep 17 00:00:00 2001 From: Andrew Potter Date: Tue, 29 Jan 2019 16:40:52 -0700 Subject: [PATCH] removed type-test as it forces ts version --- types/clean-css/clean-css-tests.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/types/clean-css/clean-css-tests.ts b/types/clean-css/clean-css-tests.ts index 6c01ba1158..98049b3ef6 100644 --- a/types/clean-css/clean-css-tests.ts +++ b/types/clean-css/clean-css-tests.ts @@ -1,6 +1,5 @@ // Original by Tanguy Krotoff // Updated by Andrew Potter -// TypeScript Version: 2.4 import * as CleanCSS from 'clean-css'; @@ -97,16 +96,3 @@ CleanCssOptions = { returnPromise: false }; new CleanCSS(CleanCssOptions).minify(source, (error: any, minified: CleanCSS.Output): void => { console.log(minified.styles); }); - -// type conversion -CleanCssOptions = {}; -// in this case, the compiler will think its an OptionsOutput -// so if we want to make it a promise, we will need to cast it specifically its a promise type return -(CleanCssOptions = CleanCssOptions as CleanCSS.OptionsPromise).returnPromise = true; -new CleanCSS(CleanCssOptions).minify(source) - .then((minified: CleanCSS.Output): void => { - console.log(minified.styles); - }).catch((error: any): void => { - console.log(error); - } -);