libxslt-wasm
Version:
JavaScript bindings for libxslt compiled to WebAssembly
22 lines (21 loc) • 942 B
TypeScript
declare class DataSegment implements Disposable {
dataOffset: number | null;
constructor(ptr: number);
getValue(): number;
/**
* `.delete()` is the convention Emscripten uses for freeing memory. For this
* base class, it does not free the pointer and only sets it to `null` since
* some convenience functions exist that free more than one pointer
*/
delete(): void;
/**
* Implements the `Disposable` interface as part of the ECMAScript Explicit
* Ressource Management proposal. This way, users can either dispose resources
* imperatively (`.delete()`) or declaratively (`using`)
*
* @see {@link https://github.com/tc39/proposal-explicit-resource-management}
* @see {@link https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html#using-declarations-and-explicit-resource-management}
*/
[Symbol.dispose](): void;
}
export { DataSegment };