Skip to content

Function: getIcon()

ts
function getIcon(
  name: string,
  kind: "default" | "file_type" | "folder_type",
  opened: boolean,
  light: boolean,
): string | undefined;

Retrieves the icon URL for a given name and kind.

Parameters

ParameterTypeDefault valueDescription
namestringundefinedThe name of the icon to retrieve.
kind"default" | "file_type" | "folder_type"undefinedThe kind of icon to retrieve, either 'default', 'file_type', or 'folder_type'.
openedbooleanfalseWhether the icon is for an opened folder or not.
lightbooleantrue-

Returns

string | undefined

The URL string for the icon, or undefined if not found.