packageDocumentation module import { IImageLoader , LoadedImage } from "../common/IImageLoader" ; import { TreeNodeItem } from "./TreeDataProvider" ; public export interface ITreeImageLoader extends IImageLoader { load : ( item : TreeNodeItem ) => LoadedImage | undefined ; } public export class TreeImageLoader implements ITreeImageLoader { /** Loads image data from either [[TreeNodeItem]] or [[BeInspireTreeNodeITree]] */ public load ( item ) { if ( ! item . icon ) return undefined ; return { sourceType : "webfont-icon" , value : item . icon } ; } }