@jirkasa/code-box
Version:
Showcase code samples on the web with a container that lets users select and display different samples.
25 lines (24 loc) • 943 B
TypeScript
/** Manager of code box file. */
declare class CodeBoxFileManager {
/** Function, called when file identifier should be changed. */
onIdentifierChange: ((newIdentifier: string) => void) | null;
/** Function, called when file download link should be changed. */
onDownloadLinkChange: ((newDownloadLink: string | null) => void) | null;
/** Function, called when file should be unlinked from code box. */
onUnlinkCodeBox: (() => void) | null;
/**
* Changes identifier of file.
* @param newIdentifier New identifier.
*/
changeIdentifier(newIdentifier: string): void;
/**
* Changes download link of file (or sets file as non-downloadable if null is passed).
* @param newDownloadLink New download link.
*/
changeDownloadLink(newDownloadLink: string | null): void;
/**
* Unlinks file from code box.
*/
unlinkCodeBox(): void;
}
export default CodeBoxFileManager;