Skip to content

Commit

Permalink
fix(types): add correct return types for sortByReference (#919)
Browse files Browse the repository at this point in the history
fixes #918
  • Loading branch information
kwittkowsky authored Jan 29, 2023
1 parent 8373721 commit 2eff17d
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions types/FormatHelpers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
* and limitations under the License.
*/

import { Dictionary } from './Dictionary';
import { DesignToken } from './DesignToken';
import { TransformedToken } from './TransformedToken';
import { File } from './File';
import { Dictionary } from "./Dictionary";
import { DesignToken } from "./DesignToken";
import { TransformedToken } from "./TransformedToken";
import { File } from "./File";

export interface LineFormatting {
prefix?: string;
Expand All @@ -29,7 +29,7 @@ export type TokenFormatterArgs = {
dictionary: Dictionary;
format?: "css" | "sass" | "less" | "stylus";
formatting?: LineFormatting;
}
};

export interface CommentFormatting {
prefix: string;
Expand All @@ -46,7 +46,7 @@ export interface FileHeaderArgs {

export interface FormattedVariablesArgs {
format: "css" | "sass";
dictionary: Dictionary
dictionary: Dictionary;
outputReferences?: boolean;
formatting?: LineFormatting;
}
Expand All @@ -59,8 +59,18 @@ export interface FormatHelpers {
formattedVariables: (args: FormattedVariablesArgs) => string;
minifyDictionary: (dictionary: object) => object;
getTypeScriptType: (value: unknown) => string;
iconsWithPrefix: (prefix: string, allTokens: DesignToken[], options: object) => string;
sortByReference: (dictionary: Dictionary) => string;
iconsWithPrefix: (
prefix: string,
allTokens: DesignToken[],
options: object
) => string;
sortByReference: (
dictionary: Dictionary
) => (a: TransformedToken, b: TransformedToken) => number;
sortByName: (a: DesignToken, b: DesignToken) => number;
setSwiftFileProperties: (options: object, objectType: string, transformGroup: string) => string;
}
setSwiftFileProperties: (
options: object,
objectType: string,
transformGroup: string
) => string;
}

0 comments on commit 2eff17d

Please sign in to comment.