Spaces:
Configuration error
Configuration error
Download node_modules/capnp-ts/src/serialization/pointers/int16-list.ts from W404NET/Telegram-Chat-Bot: direct link, hf CLI and curl.
- Browser
- Download file 767 Bytes
-
https://huggingface.co/spaces/W404NET/Telegram-Chat-Bot/resolve/main/node_modules/capnp-ts/src/serialization/pointers/int16-list.ts
- Command line
-
hf download hf://spaces/W404NET/Telegram-Chat-Bot/node_modules/capnp-ts/src/serialization/pointers/int16-list.ts
-
curl -L -o int16-list.ts https://huggingface.co/spaces/W404NET/Telegram-Chat-Bot/resolve/main/node_modules/capnp-ts/src/serialization/pointers/int16-list.ts
767 Bytes
| /** | |
| * @author jdiaz5513 | |
| */ | |
| import initTrace from "debug"; | |
| import { ListElementSize } from "../list-element-size"; | |
| import { _ListCtor, List } from "./list"; | |
| import { getContent } from "./pointer"; | |
| const trace = initTrace("capnp:list:composite"); | |
| trace("load"); | |
| export class Int16List extends List<number> { | |
| static readonly _capnp: _ListCtor = { | |
| displayName: "List<Int16>" as string, | |
| size: ListElementSize.BYTE_2 | |
| }; | |
| get(index: number): number { | |
| const c = getContent(this); | |
| return c.segment.getInt16(c.byteOffset + index * 2); | |
| } | |
| set(index: number, value: number): void { | |
| const c = getContent(this); | |
| c.segment.setInt16(c.byteOffset + index * 2, value); | |
| } | |
| toString(): string { | |
| return `Int16_${super.toString()}`; | |
| } | |
| } | |