UNPKG

@enonic/mock-xp

Version:

Mock Enonic XP API JavaScript Library

17 lines (16 loc) 621 B
import type { ByteSource, ResourceKey } from '@enonic-types/lib-io'; import type { App } from '../implementation/App'; import type { Resource } from '../implementation/app/Resource'; export declare class LibIo { private app; constructor({ app }: { app: App; }); getMimeType(name: string): string; getResource(key: string | ResourceKey): Resource; getSize(stream: ByteSource): number; newStream(text: string): ByteSource; processLines(stream: ByteSource, func: (value: string) => void): void; readLines(stream: ByteSource): string[]; readText(stream: ByteSource): string; }