import * as vscode from 'vscode'; vscode.workspace.onDidSaveTextDocument((savedDocument: vscode.TextDocument) => { console.log(`File saved: ${savedDocument.fileName}`); console.log(`File path: ${savedDocument.uri.toString()}`); });The above code listens for a save event and logs the name and path of the file that was saved using the TextDocument object provided as the event parameter. The package library required for this event is the Typescript module in Visual Studio Code.