Back to Qwik

Qwik.Server.Api

packages/qwik/src/server/qwik.server.api.md

1.7.15.9 KB
Original Source

API Report File for "@builder.io/qwik"

Do not edit this file. It is a report generated by API Extractor.

ts

import type { QwikManifest } from '@builder.io/qwik/optimizer';
import type { ResolvedManifest } from '@builder.io/qwik/optimizer';
import type { ServerQwikManifest } from '@builder.io/qwik/optimizer';
import type { SnapshotResult } from '@builder.io/qwik';
import type { StreamWriter } from '@builder.io/qwik';
import type { SymbolMapperFn } from '@builder.io/qwik/optimizer';

// @public
export function getQwikLoaderScript(opts?: {
    debug?: boolean;
}): string;

// @public
export function getQwikPrefetchWorkerScript(opts?: {
    debug?: boolean;
}): string;

// @public (undocumented)
export interface InOrderAuto {
    // (undocumented)
    maximunChunk?: number;
    // (undocumented)
    maximunInitialChunk?: number;
    // (undocumented)
    strategy: 'auto';
}

// @public (undocumented)
export interface InOrderDisabled {
    // (undocumented)
    strategy: 'disabled';
}

// Warning: (ae-forgotten-export) The symbol "InOrderDirect" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export type InOrderStreaming = InOrderAuto | InOrderDisabled | InOrderDirect;

// @public @deprecated (undocumented)
export interface PrefetchImplementation {
    // @deprecated (undocumented)
    linkFetchPriority?: 'auto' | 'low' | 'high' | null;
    // @deprecated (undocumented)
    linkInsert?: 'js-append' | 'html-append' | null;
    // @deprecated (undocumented)
    linkRel?: 'prefetch' | 'preload' | 'modulepreload' | null;
    // @deprecated (undocumented)
    prefetchEvent?: 'always' | null;
    // @deprecated (undocumented)
    workerFetchInsert?: 'always' | 'no-link-support' | null;
}

// @public (undocumented)
export interface PrefetchResource {
    // (undocumented)
    imports: PrefetchResource[];
    // (undocumented)
    url: string;
}

// @public (undocumented)
export interface PrefetchStrategy {
    // (undocumented)
    implementation?: PrefetchImplementation;
    // (undocumented)
    symbolsToPrefetch?: SymbolsToPrefetch;
}

// @public (undocumented)
export interface PreloaderOptions {
    debug?: boolean;
    maxIdlePreloads?: number;
    // @deprecated (undocumented)
    preloadProbability?: number;
    ssrPreloadProbability?: number;
    ssrPreloads?: number;
}

// @public (undocumented)
export type QwikLoaderOptions = 'module' | 'inline' | 'never' | {
    include?: 'always' | 'never' | 'auto';
    position?: 'top' | 'bottom';
};

// @public (undocumented)
export type Render = RenderToString | RenderToStream;

// @public (undocumented)
export interface RenderOptions extends SerializeDocumentOptions {
    base?: string | ((options: RenderOptions) => string);
    // (undocumented)
    containerAttributes?: Record<string, string>;
    containerTagName?: string;
    locale?: string | ((options: RenderOptions) => string);
    // @deprecated (undocumented)
    prefetchStrategy?: PrefetchStrategy | null;
    preloader?: PreloaderOptions | false;
    qwikLoader?: QwikLoaderOptions;
    // Warning: (ae-forgotten-export) The symbol "QwikPrefetchServiceWorkerOptions" needs to be exported by the entry point index.d.ts
    //
    // @deprecated (undocumented)
    qwikPrefetchServiceWorker?: QwikPrefetchServiceWorkerOptions;
    // (undocumented)
    serverData?: Record<string, any>;
    snapshot?: boolean;
}

// @public (undocumented)
export interface RenderResult {
    // (undocumented)
    isStatic: boolean;
    // (undocumented)
    manifest?: ServerQwikManifest;
    // (undocumented)
    prefetchResources: PrefetchResource[];
    // (undocumented)
    snapshotResult: SnapshotResult | undefined;
}

// @public (undocumented)
export type RenderToStream = (opts: RenderToStreamOptions) => Promise<RenderToStreamResult>;

// @public
export function renderToStream(rootNode: any, opts: RenderToStreamOptions): Promise<RenderToStreamResult>;

// @public (undocumented)
export interface RenderToStreamOptions extends RenderOptions {
    // (undocumented)
    stream: StreamWriter;
    // (undocumented)
    streaming?: StreamingOptions;
}

// @public (undocumented)
export interface RenderToStreamResult extends RenderResult {
    // (undocumented)
    flushes: number;
    // (undocumented)
    size: number;
    // (undocumented)
    timing: {
        firstFlush: number;
        render: number;
        snapshot: number;
    };
}

// @public (undocumented)
export type RenderToString = (opts: RenderToStringOptions) => Promise<RenderToStringResult>;

// @public
export function renderToString(rootNode: any, opts?: RenderToStringOptions): Promise<RenderToStringResult>;

// @public (undocumented)
export interface RenderToStringOptions extends RenderOptions {
}

// @public (undocumented)
export interface RenderToStringResult extends RenderResult {
    // (undocumented)
    html: string;
    // (undocumented)
    timing: {
        render: number;
        snapshot: number;
    };
}

// Warning: (ae-forgotten-export) The symbol "ResolvedManifest_2" needs to be exported by the entry point index.d.ts
//
// @public
export function resolveManifest(manifest?: Partial<QwikManifest | ResolvedManifest_2> | undefined): ResolvedManifest_2 | undefined;

// @public (undocumented)
export interface SerializeDocumentOptions {
    // (undocumented)
    debug?: boolean;
    // (undocumented)
    manifest?: Partial<QwikManifest | ResolvedManifest>;
    // (undocumented)
    symbolMapper?: SymbolMapperFn;
}

// @public (undocumented)
export function setServerPlatform(manifest?: Partial<QwikManifest | ResolvedManifest>): Promise<void>;

// @public (undocumented)
export interface StreamingOptions {
    // (undocumented)
    inOrder?: InOrderStreaming;
}

// @public
export type SymbolsToPrefetch = 'auto' | ((opts: {
    manifest: ServerQwikManifest;
}) => PrefetchResource[]);

// @public (undocumented)
export const versions: {
    readonly qwik: string;
    readonly qwikDom: string;
};

// (No @packageDocumentation comment for this package)