From 88451131f3ac3e614fedc46ad1733b8a65b1688e Mon Sep 17 00:00:00 2001 From: Jan Erik Hanssen Date: Fri, 14 Feb 2020 13:56:18 -0800 Subject: [PATCH] Explicitly declare return types for all functions --- index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 3b473e7..6c03624 100644 --- a/index.d.ts +++ b/index.d.ts @@ -59,7 +59,7 @@ declare module 'font-manager' { * findFonts({ family: 'Arial' }, (fonts) => { ... }); * findFonts((fonts) => { ... }); */ - export function findFonts(fontDescriptor: QueryFontDescriptor | undefined, callback: (fonts: FontDescriptor[]) => void); + export function findFonts(fontDescriptor: QueryFontDescriptor | undefined, callback: (fonts: FontDescriptor[]) => void): void; /** * Find only one font matching the given query. This function always returns @@ -85,7 +85,7 @@ declare module 'font-manager' { * findFont((font) => { ... }); * @returns Only one font description matching those query parameters */ - export function findFont(fontDescriptor: QueryFontDescriptor | undefined, callback: (font: FontDescriptor) => void); + export function findFont(fontDescriptor: QueryFontDescriptor | undefined, callback: (font: FontDescriptor) => void): void; /** * Substitutes the font with the given post script name with another font @@ -114,5 +114,5 @@ declare module 'font-manager' { * @param postscriptName Name of the font to be replaced * @param text Characters for matching */ - export function substituteFont(postscriptName: string, text: string, callback: (font: FontDescriptor) => void); + export function substituteFont(postscriptName: string, text: string, callback: (font: FontDescriptor) => void): void; }