Skip to content
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
11 changes: 11 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ type DrawText = {
stroke: string | false;
strokedasharray?: string;
strokewidth?: number;
text: string;
};

type DrawSVG = {
Expand Down Expand Up @@ -334,6 +335,15 @@ export type ExtensionFunction = (

export function addSymbolPart(extension: ExtensionFunction): typeof _default;

export type IconPartsFunction = (
this: Symbol,
iconParts: Record<string, DrawInstruction | DrawInstruction[]>,
metadata: SymbolMetadata,
colors: SymbolColors
) => void;

export function addIconParts(iconParts: IconPartsFunction): typeof _default;

declare const _default: {
Symbol: typeof Symbol;
BBox: BBoxConstructor;
Expand All @@ -347,6 +357,7 @@ declare const _default: {
getVersion: typeof getVersion;
setStandard: typeof setStandard;
addSymbolPart: typeof addSymbolPart;
addIconParts: typeof addIconParts;
};

export default _default;