Download src/ink/instances.ts from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 410 Bytes
-
https://huggingface.co/chenbhao/codev/resolve/main/src/ink/instances.ts
- Command line
-
hf download hf://chenbhao/codev/src/ink/instances.ts
-
curl -L -o instances.ts https://huggingface.co/chenbhao/codev/resolve/main/src/ink/instances.ts
410 Bytes
| // Store all instances of Ink (instance.js) to ensure that consecutive render() calls | |
| // use the same instance of Ink and don't create a new one | |
| // | |
| // This map has to be stored in a separate file, because render.js creates instances, | |
| // but instance.js should delete itself from the map on unmount | |
| import type Ink from './ink.js' | |
| const instances = new Map<NodeJS.WriteStream, Ink>() | |
| export default instances | |