UI kit reference
code/editor/edit-session
import { … } from 'zidane-ui/code/editor'ui/src/code/editor/edit-session.ts
Functions#
editSessionKeyFunction#
The retained-session key of one draft generation of a file.
function editSessionKey(cwd: string, path: string, generation: number): stringParameters
| Name | Type | Description |
|---|---|---|
| cwd | string | The folder. |
| path | string | The file, relative to it. |
| generation | number | Bumped whenever the path's draft is reset. |
Returns
stringforgetEditSessionFunction#
Drop a retained session. Safe to call while it is still active: the clear is deferred until it is dormant.
function forgetEditSession(key: string): voidParameters
| Name | Type | Description |
|---|---|---|
| key | string | Its key ( |