From adcd8272d7e09aac33bbcd8582e852a40b039601 Mon Sep 17 00:00:00 2001 From: Gilad Gray Date: Tue, 22 Nov 2016 23:55:07 -0800 Subject: [PATCH] better types that work `ImporterReturnType` is a union of all the possible return values. The function signature works for both sync and async varieties, and in truth both can be used at the same time (I've tried it) so this is great. --- node-sass/index.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/node-sass/index.d.ts b/node-sass/index.d.ts index 75cc33bcd2..b208b57f19 100644 --- a/node-sass/index.d.ts +++ b/node-sass/index.d.ts @@ -8,8 +8,7 @@ type ImporterReturnType = { file: string } | { contents: string } | Error | null; interface Importer { - (url: string, prev: string): ImporterReturnType; - (url: string, prev: string, done: (data: ImporterReturnType) => void): void; + (url: string, prev: string, done: (data: ImporterReturnType) => void): ImporterReturnType | void; } interface Options {