From 44449d5481a1bec25d9f61bfee04722bb7f8ccaf Mon Sep 17 00:00:00 2001 From: Kang Date: Fri, 10 Mar 2017 15:58:22 +0900 Subject: [PATCH] Fixed ES6 import error. (#14917) Fixed this error message "resolves to a non-module entity and cannot be imported using this construct." --- file-type/index.d.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/file-type/index.d.ts b/file-type/index.d.ts index a1bc0d8466..3a88fe0a94 100644 --- a/file-type/index.d.ts +++ b/file-type/index.d.ts @@ -5,11 +5,13 @@ /// -interface FileTypeResult { - ext: string - mime: string +export = FileType; + +declare function FileType(buf: Buffer): FileType.FileTypeResult; + +declare namespace FileType { + export interface FileTypeResult { + ext: string; + mime: string; + } } - -declare function FileType(buf: Buffer): FileTypeResult - -export = FileType