Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly declare return types for all functions #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -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;
}