<!-- Do not edit this file. It is automatically generated by API Documenter. --> [`FileView`](FileView) › [`onUnloadFile`](FileView/onUnloadFile) ## FileView.onUnloadFile() method **Signature:** ```typescript onUnloadFile(file: TFile): Promise<void>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | <code>file</code> | [`TFile`](TFile) | | **Returns:** `Promise<void>`