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