icon.Registry.register() 函式
註冊指定圖示,使其能夠還原序列化。
Signature:
export declare function register(type: IconType<IIcon>, iconConstructor: new (block: Block) => IIcon): void;
參數
| 參數 | 類型 | 說明 |
|---|---|---|
| 類型 | IconType<IIcon> | 要註冊的圖示類型。這個值應該與從其 getType 方法傳回的字串相同。 |
| iconConstructor | 新增 (封鎖:封鎖) =>IIcon | 要註冊的圖示類別/建構函式。 |
傳回:
void