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

fix-918: add correct return types for sortByReference #919

Merged
merged 1 commit into from
Jan 29, 2023
Merged
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
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;
}