From 6e5cd007757e175ce116fd82f5aaa41ee9f64a6a Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Tue, 12 Jun 2018 14:18:41 +0200 Subject: [PATCH] [webpack-config-utils]: remove unnecessary comments --- types/webpack-config-utils/index.d.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/types/webpack-config-utils/index.d.ts b/types/webpack-config-utils/index.d.ts index 829f88296e..4f2f70a409 100644 --- a/types/webpack-config-utils/index.d.ts +++ b/types/webpack-config-utils/index.d.ts @@ -4,12 +4,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -/*~ You can declare properties of the module using const, let, or var */ -// declare const getIfUtils: WebpackConfigUtils.GetIfUtils; -// declare const removeEmpty: WebpackConfigUtils.RemoveEmpty; -// declare const propIf: WebpackConfigUtils.PropIf; -// declare const propIfNot: WebpackConfigUtils.PropIfNot; - declare const api: WebpackConfigUtils.API; export = api; @@ -27,6 +21,7 @@ declare namespace WebpackConfigUtils { env: { [P in E]: boolean | string } | E, vars?: Array ) => IfUtils; + // @TODO // with following defintion, generics will get flattened to base type -> string. Any ideas why or how to fix this? // $ExpectType "value" | "alternate" @@ -34,6 +29,7 @@ declare namespace WebpackConfigUtils { // // type PropIf = (add: A, value: I, alternate: E) => A extends Falsy ? E : I; // type PropIfNot = (add: A, value: I, alternate: E) => A extends Falsy ? I : E; + type PropIf = (add: any, value: I, alternate: E) => I | E; type PropIfNot = PropIf;