diff --git a/.REFACTOR_NOTES.md b/.REFACTOR_NOTES.md
new file mode 100644
index 00000000000..94fe1b685c5
--- /dev/null
+++ b/.REFACTOR_NOTES.md
@@ -0,0 +1,44 @@
+1 << 0 | 001 | static listeners
+1 << 1 | 002 | static subtree
+
+## Slots
+
+```typescript
+const Parent = component$(() => {
+ return (
+
- No Reported Diagnostics -
) : ( [...store.diagnostics, ...store.monacoDiagnostics].map((d, key) => ( diff --git a/packages/docs/src/repl/repl-output-symbols.tsx b/packages/docs/src/repl/repl-output-symbols.tsx index 47846d85e6e..8cc799aa310 100644 --- a/packages/docs/src/repl/repl-output-symbols.tsx +++ b/packages/docs/src/repl/repl-output-symbols.tsx @@ -1,6 +1,6 @@ -import type { TransformModule } from '@builder.io/qwik/optimizer'; +import { $, component$, useSignal } from '@qwik.dev/core'; +import type { TransformModule } from '@qwik.dev/core/optimizer'; import { CodeBlock } from '../components/code-block/code-block'; -import { $, component$, useSignal } from '@builder.io/qwik'; const FILE_MODULE_DIV_ID = 'file-modules-symbol'; export const ReplOutputSymbols = component$(({ outputs }: ReplOutputSymbolsProps) => { diff --git a/packages/docs/src/repl/repl-output-update.ts b/packages/docs/src/repl/repl-output-update.ts index 1fe666a0dc6..8b8f23044f0 100644 --- a/packages/docs/src/repl/repl-output-update.ts +++ b/packages/docs/src/repl/repl-output-update.ts @@ -6,21 +6,35 @@ const deepUpdate = (prev: any, next: any) => { if (prev[key] && typeof next[key] === 'object' && typeof prev[key] === 'object') { deepUpdate(prev[key], next[key]); } else { - prev[key] = next[key]; + if (prev[key] !== next[key]) { + prev[key] = next[key]; + } } } - for (const key in prev) { - if (!(key in next)) { - delete prev[key]; + if (Array.isArray(prev)) { + for (const key in prev) { + if (!(key in next)) { + delete prev[key]; + // deleting array elements doesn't change the length + prev.length--; + } + } + } else { + for (const key in prev) { + if (!(key in next)) { + delete prev[key]; + } } } }; export const updateReplOutput = async (store: ReplStore, result: ReplResult) => { - store.diagnostics = result.diagnostics; + deepUpdate(store.diagnostics, result.diagnostics); - if (store.diagnostics.length === 0) { - store.html = result.html; + if (result.diagnostics.length === 0) { + if (store.html !== result.html) { + store.html = result.html; + } deepUpdate(store.transformedModules, result.transformedModules); deepUpdate(store.clientBundles, result.clientBundles); deepUpdate(store.ssrModules, result.ssrModules); diff --git a/packages/docs/src/repl/repl-share-url.ts b/packages/docs/src/repl/repl-share-url.ts index 6de7babc17e..2ade4edff89 100644 --- a/packages/docs/src/repl/repl-share-url.ts +++ b/packages/docs/src/repl/repl-share-url.ts @@ -85,6 +85,10 @@ export const strToFiles = (str: string) => { // You can add new entries to the beginning though. export const dictionary = strToU8( filesToStr([ + { + path: '/app.tsx', + code: `import { component$ } from '@qwik.dev/core';\n\nexport default component$(() => {\n return (\nHello Qwik
;\n});\n`, diff --git a/packages/docs/src/repl/repl-share-url.unit.ts b/packages/docs/src/repl/repl-share-url.unit.ts index 6d1dec380bc..3c90defd60c 100644 --- a/packages/docs/src/repl/repl-share-url.unit.ts +++ b/packages/docs/src/repl/repl-share-url.unit.ts @@ -1,13 +1,14 @@ -import { assert, test } from 'vitest'; +import { strFromU8 } from 'fflate'; +import { assert, expect, test } from 'vitest'; import { - filesToStr, - strToFiles, - createPlaygroundShareUrl, compressFiles, - parseCompressedFiles, + createPlaygroundShareUrl, dictionary, + filesToStr, + parseCompressedFiles, + parsePlaygroundShareUrl, + strToFiles, } from './repl-share-url'; -import { strFromU8 } from 'fflate'; const data = { version: '1.2.3', @@ -64,8 +65,85 @@ test('createPlaygroundShareUrl 2', () => { }); test('dictionary is unchanged', () => { - assert.equal( - strFromU8(dictionary), - "0||1448|Hello Qwik
;\n});\n|17|/entry.server.tsx|201|import { renderToString, type RenderOptions } from '@builder.io/qwik/server';\nimport { Root } from './root';\n\nexport default function (opts: RenderOptions) {\n return renderToString(Hello Qwik
; + }); + |17|/entry.server.tsx|201|import { renderToString, type RenderOptions } from '@builder.io/qwik/server'; + import { Root } from './root'; + + export default function (opts: RenderOptions) { + return renderToString(Hello Qwik
;\n});\n", + }), + ]) + ); + expect( + parsePlaygroundShareUrl( + 'f=Q0o0xgaW2BKNDrDkqNCB15QUpyFIgKTl51uBeGA%2BKO%2BBIwaW0W1A6SI%2FDWQzyKm1wKBDVwyU0lAqUNJRqE4GFc3AqLNSCnENDlGq1QTpAGJ43a5RDa6oa0FOgBsDbxkAXQIMCqAWMIktXqqBSvRgNoNMRg7C0XQ%2FJNM9AA' + ) + ).toHaveProperty( + 'files', + // DO NOT UPDATE THIS TEST - all these URLs must work forever + expect.arrayContaining([ + expect.objectContaining({ + path: '/app.tsx', + code: `import { component$, jsx, useTask$ } from '@builder.io/qwik'; + +export default component$(() => { + const foo:{ + contents: ReturnType\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\nAwsOpt\n\n\n | \n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -AwsOpt - - | - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[QwikCityAzureOptions](#qwikcityazureoptions)\n\n\n | \n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[QwikCityAzureOptions](#qwikcityazureoptions) - - | - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[QwikCityCloudflarePagesOptions](#qwikcitycloudflarepagesoptions)\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[ctx](#)\n\n\n | \n\n\n | \n\n{ waitUntil: (promise: Promise<any>) => void; }\n\n\n | \n\n\n |
\n\n[env?](#)\n\n\n | \n\n\n | \n\nRecord<string, any>\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[request](#)\n\n\n | \n\n\n | \n\nRequest\n\n\n | \n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[QwikCityCloudflarePagesOptions](#qwikcitycloudflarepagesoptions) - - | - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[ctx](#) - - | - - | - -{ waitUntil: (promise: Promise<any>) => void; } - - | - - |
- -[env?](#) - - | - - | - -Record<string, any> - - | - -_(Optional)_ - - |
- -[request](#) - - | - - | - -Request - - | - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[QwikCityFirebaseOptions](#qwikcityfirebaseoptions)\n\n\n | \n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[QwikCityFirebaseOptions](#qwikcityfirebaseoptions) - - | - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[QwikCityNetlifyOptions](#qwikcitynetlifyoptions)\n\n\n | \n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[QwikCityNetlifyOptions](#qwikcitynetlifyoptions) - - | - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[QwikCityNodeRequestOptions](#qwikcitynoderequestoptions)\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[incomingMessage?](#)\n\n\n | \n\n\n | \n\nIncomingMessage \\| Http2ServerRequest\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[node?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[ssr?](#)\n\n\n | \n\n\n | \n\ntrue\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[getClientConn?](#)\n\n\n | \n\n\n | \n\n(req: IncomingMessage \\| Http2ServerRequest) => ClientConn\n\n\n | \n\n_(Optional)_ Provide a function that returns a `ClientConn` for the given request.\n\n\n |
\n\n[getOrigin?](#)\n\n\n | \n\n\n | \n\n(req: IncomingMessage \\| Http2ServerRequest) => string \\| null\n\n\n | \n\n_(Optional)_ Provide a function that computes the origin of the server, used to resolve relative URLs and validate the request origin against CSRF attacks.\n\nWhen not specified, it defaults to the `ORIGIN` environment variable (if set).\n\nIf `ORIGIN` is not set, it's derived from the incoming request, which is not recommended for production use. You can specify the `PROTOCOL_HEADER`, `HOST_HEADER` to `X-Forwarded-Proto` and `X-Forwarded-Host` respectively to override the default behavior.\n\n\n |
\n\n[origin?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[static?](#)\n\n\n | \n\n\n | \n\n{ root?: string; cacheControl?: string; }\n\n\n | \n\n_(Optional)_ Options for serving static files\n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[QwikCityNodeRequestOptions](#qwikcitynoderequestoptions) - - | - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[incomingMessage?](#) - - | - - | - -IncomingMessage \| Http2ServerRequest - - | - -_(Optional)_ - - |
- -[node?](#) - - | - - | - -string - - | - -_(Optional)_ - - |
- -[ssr?](#) - - | - - | - -true - - | - -_(Optional)_ - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[getClientConn?](#) - - | - - | - -(req: IncomingMessage \| Http2ServerRequest) => ClientConn - - | - -_(Optional)_ Provide a function that returns a `ClientConn` for the given request. - - |
- -[getOrigin?](#) - - | - - | - -(req: IncomingMessage \| Http2ServerRequest) => string \| null - - | - -_(Optional)_ Provide a function that computes the origin of the server, used to resolve relative URLs and validate the request origin against CSRF attacks. - -When not specified, it defaults to the `ORIGIN` environment variable (if set). - -If `ORIGIN` is not set, it's derived from the incoming request, which is not recommended for production use. You can specify the `PROTOCOL_HEADER`, `HOST_HEADER` to `X-Forwarded-Proto` and `X-Forwarded-Host` respectively to override the default behavior. - - |
- -[origin?](#) - - | - - | - -string - - | - -_(Optional)_ - - |
- -[static?](#) - - | - - | - -{ root?: string; cacheControl?: string; } - - | - -_(Optional)_ Options for serving static files - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nname\n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\nvalue\n\n\n | \n\nstring \\| number \\| Record<string, any>\n\n\n | \n\n\n |
\n\noptions\n\n\n | \n\n[CookieOptions](#cookieoptions)\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[country?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[ip?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nMethod\n\n\n | \n\nDescription\n\n\n |
---|---|
\n\n[append(name, value, options)](#cookie-append)\n\n\n | \n\nAppends a `Response` cookie header using the `Set-Cookie` header.\n\nThe difference between `set()` and `append()` is that if the specified header already exists, `set()` will overwrite the existing value with the new one, whereas `append()` will append the new value onto the end of the set of values.\n\n\n |
\n\n[delete(name, options)](#cookie-delete)\n\n\n | \n\nDeletes cookie value by name using the `Response` cookie header.\n\n\n |
\n\n[get(name)](#cookie-get)\n\n\n | \n\nGets a `Request` cookie header value by name.\n\n\n |
\n\n[getAll()](#cookie-getall)\n\n\n | \n\nGets all `Request` cookie headers.\n\n\n |
\n\n[has(name)](#cookie-has)\n\n\n | \n\nChecks if the `Request` cookie header name exists.\n\n\n |
\n\n[headers()](#cookie-headers)\n\n\n | \n\nReturns an array of all the set `Response` `Set-Cookie` header values.\n\n\n |
\n\n[set(name, value, options)](#cookie-set)\n\n\n | \n\nSets a `Response` cookie header using the `Set-Cookie` header.\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[domain?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_ Defines the host to which the cookie will be sent. If omitted, this attribute defaults to the host of the current document URL, not including subdomains.\n\n\n |
\n\n[expires?](#)\n\n\n | \n\n\n | \n\nDate \\| string\n\n\n | \n\n_(Optional)_ Indicates the maximum lifetime of the cookie as an HTTP-date timestamp. If both `expires` and `maxAge` are set, `maxAge` has precedence.\n\n\n |
\n\n[httpOnly?](#)\n\n\n | \n\n\n | \n\nboolean\n\n\n | \n\n_(Optional)_ Forbids JavaScript from accessing the cookie, for example, through the `document.cookie` property.\n\n\n |
\n\n[maxAge?](#)\n\n\n | \n\n\n | \n\nnumber \\| \\[number, 'seconds' \\| 'minutes' \\| 'hours' \\| 'days' \\| 'weeks'\\]\n\n\n | \n\n_(Optional)_ Indicates the number of seconds until the cookie expires. A zero or negative number will expire the cookie immediately. If both `expires` and `maxAge` are set, `maxAge` has precedence. You can also use the array syntax to set the max-age using minutes, hours, days or weeks. For example, `{ maxAge: [3, \"days\"] }` would set the cookie to expire in 3 days.\n\n\n |
\n\n[path?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_ Indicates the path that must exist in the requested URL for the browser to send the Cookie header.\n\n\n |
\n\n[sameSite?](#)\n\n\n | \n\n\n | \n\n'strict' \\| 'lax' \\| 'none' \\| 'Strict' \\| 'Lax' \\| 'None' \\| boolean\n\n\n | \n\n_(Optional)_ Controls whether or not a cookie is sent with cross-site requests, providing some protection against cross-site request forgery attacks (CSRF).\n\n\n |
\n\n[secure?](#)\n\n\n | \n\n\n | \n\nboolean\n\n\n | \n\n_(Optional)_ Indicates that the cookie is sent to the server only when a request is made with the `https:` scheme (except on localhost)\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[json](#)\n\n\n | \n\n\n | \n\n<T = unknown>() => T\n\n\n | \n\n\n |
\n\n[number](#)\n\n\n | \n\n\n | \n\n() => number\n\n\n | \n\n\n |
\n\n[value](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nname\n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\noptions\n\n\n | \n\nPick<[CookieOptions](#cookieoptions), 'path' \\| 'domain' \\| 'sameSite'>\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nMethod\n\n\n | \n\nDescription\n\n\n |
---|---|
\n\n[get(key)](#)\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nname\n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nstatus\n\n\n | \n\nnumber\n\n\n | \n\n\n |
\n\ne\n\n\n | \n\nany\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nname\n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nheaders\n\n\n | \n\nHeaders\n\n\n | \n\n\n |
\n\ncookies\n\n\n | \n\n[CookieInterface](#cookie)\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[exited](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nboolean\n\n\n | \n\nTrue if the middleware chain has finished executing.\n\n\n |
\n\n[getWritableStream](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n() => WritableStream<Uint8Array>\n\n\n | \n\nLow-level access to write to the HTTP response stream. Once `getWritableStream()` is called, the status and headers can no longer be modified and will be sent over the network.\n\n\n |
\n\n[headersSent](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nboolean\n\n\n | \n\nTrue if headers have been sent, preventing any more headers from being set.\n\n\n |
\n\n[next](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n() => Promise<void>\n\n\n | \n\nInvoke the next middleware function in the chain.\n\nNOTE: Ensure that the call to `next()` is `await`ed.\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[fail](#)\n\n\n | \n\n\n | \n\n<T extends Record<string, any>>(status: number, returnData: T) => FailReturn<T>\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[basePathname](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nstring\n\n\n | \n\nThe base pathname of the request, which can be configured at build time. Defaults to `/`.\n\n\n |
\n\n[cacheControl](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n(cacheControl: [CacheControl](#cachecontrol), target?: CacheControlTarget) => void\n\n\n | \n\nConvenience method to set the Cache-Control header. Depending on your CDN, you may want to add another cacheControl with the second argument set to `CDN-Cache-Control` or any other value (we provide the most common values for auto-complete, but you can use any string you want).\n\nSee https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control and https://qwik.dev/docs/caching/\\#CDN-Cache-Controls for more information.\n\n\n |
\n\n[clientConn](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n[ClientConn](#clientconn)\n\n\n | \n\nProvides information about the client connection, such as the IP address and the country the request originated from.\n\n\n |
\n\n[cookie](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n[Cookie](#cookie)\n\n\n | \n\nHTTP request and response cookie. Use the `get()` method to retrieve a request cookie value. Use the `set()` method to set a response cookie value.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies\n\n\n |
\n\n[env](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n[EnvGetter](#envgetter)\n\n\n | \n\nPlatform provided environment variables.\n\n\n |
\n\n[headers](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nHeaders\n\n\n | \n\nHTTP response headers. Notice it will be empty until you first add a header. If you want to read the request headers, use `request.headers` instead.\n\nhttps://developer.mozilla.org/en-US/docs/Glossary/Response\\_header\n\n\n |
\n\n[method](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nstring\n\n\n | \n\nHTTP request method.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Methods\n\n\n |
\n\n[params](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nReadonly<Record<string, string>>\n\n\n | \n\nURL path params which have been parsed from the current url pathname segments. Use `query` to instead retrieve the query string search params.\n\n\n |
\n\n[parseBody](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n() => Promise<unknown>\n\n\n | \n\nThis method will check the request headers for a `Content-Type` header and parse the body accordingly. It supports `application/json`, `application/x-www-form-urlencoded`, and `multipart/form-data` content types.\n\nIf the `Content-Type` header is not set, it will return `null`.\n\n\n |
\n\n[pathname](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nstring\n\n\n | \n\nURL pathname. Does not include the protocol, domain, query string (search params) or hash.\n\nhttps://developer.mozilla.org/en-US/docs/Web/API/URL/pathname\n\n\n |
\n\n[platform](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nPLATFORM\n\n\n | \n\nPlatform specific data and functions\n\n\n |
\n\n[query](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nURLSearchParams\n\n\n | \n\nURL Query Strings (URL Search Params). Use `params` to instead retrieve the route params found in the url pathname.\n\nhttps://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\n\n\n |
\n\n[request](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nRequest\n\n\n | \n\nHTTP request information.\n\n\n |
\n\n[sharedMap](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nMap<string, any>\n\n\n | \n\nShared Map across all the request handlers. Every HTTP request will get a new instance of the shared map. The shared map is useful for sharing data between request handlers.\n\n\n |
\n\n[signal](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nAbortSignal\n\n\n | \n\nRequest's AbortSignal (same as `request.signal`). This signal indicates that the request has been aborted.\n\n\n |
\n\n[url](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nURL\n\n\n | \n\nHTTP request URL.\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[error](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n(statusCode: ErrorCodes, message: string) => ErrorResponse\n\n\n | \n\nWhen called, the response will immediately end with the given status code. This could be useful to end a response with `404`, and use the 404 handler in the routes directory. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status for which status code should be used.\n\n\n |
\n\n[exit](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n() => [AbortMessage](#abortmessage)\n\n\n | \n\n\n |
\n\n[html](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n(statusCode: StatusCodes, html: string) => [AbortMessage](#abortmessage)\n\n\n | \n\nConvenience method to send an HTML body response. The response will be automatically set the `Content-Type` header to`text/html; charset=utf-8`. An `html()` response can only be called once.\n\n\n |
\n\n[json](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n(statusCode: StatusCodes, data: any) => [AbortMessage](#abortmessage)\n\n\n | \n\nConvenience method to JSON stringify the data and send it in the response. The response will be automatically set the `Content-Type` header to `application/json; charset=utf-8`. A `json()` response can only be called once.\n\n\n |
\n\n[locale](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n(local?: string) => string\n\n\n | \n\nWhich locale the content is in.\n\nThe locale value can be retrieved from selected methods using `getLocale()`:\n\n\n |
\n\n[redirect](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n(statusCode: RedirectCode, url: string) => [RedirectMessage](#redirectmessage)\n\n\n | \n\nURL to redirect to. When called, the response will immediately end with the correct redirect status and headers.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections\n\n\n |
\n\n[send](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nSendMethod\n\n\n | \n\nSend a body response. The `Content-Type` response header is not automatically set when using `send()` and must be set manually. A `send()` response can only be called once.\n\n\n |
\n\n[status](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n(statusCode?: StatusCodes) => number\n\n\n | \n\nHTTP response status code. Sets the status code when called with an argument. Always returns the status code, so calling `status()` without an argument will can be used to return the current status code.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Status\n\n\n |
\n\n[text](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n(statusCode: StatusCodes, text: string) => [AbortMessage](#abortmessage)\n\n\n | \n\nConvenience method to send an text body response. The response will be automatically set the `Content-Type` header to`text/plain; charset=utf-8`. An `text()` response can only be called once.\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[defer](#)\n\n\n | \n\n\n | \n\n<T>(returnData: Promise<T> \\| (() => Promise<T>)) => [DeferReturn](#deferreturn)<T>\n\n\n | \n\n\n |
\n\n[resolveValue](#)\n\n\n | \n\n\n | \n\n[ResolveValue](#resolvevalue)\n\n\n | \n\n\n |
\n\nConstructor\n\n\n | \n\nModifiers\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\n[(constructor)(status, data)](#)\n\n\n | \n\n\n | \n\nConstructs a new instance of the `ServerError` class\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[data](#servererror-data)\n\n\n | \n\n\n | \n\nT\n\n\n | \n\n\n |
\n\n[status](#servererror-status)\n\n\n | \n\n\n | \n\nnumber\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[checkOrigin?](#)\n\n\n | \n\n\n | \n\nboolean\n\n\n | \n\n_(Optional)_ Protection against cross-site request forgery (CSRF) attacks.\n\nWhen `true`, for every incoming POST, PUT, PATCH, or DELETE form submissions, the request origin is checked to match the server's origin.\n\nBe careful when disabling this option as it may lead to CSRF attacks.\n\nDefaults to `true`.\n\n\n |
\n\n[qwikCityPlan](#)\n\n\n | \n\n\n | \n\nQwikCityPlan\n\n\n | \n\n\n |
\n\n[render](#)\n\n\n | \n\n\n | \n\nRender\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[env](#)\n\n\n | \n\n\n | \n\n[EnvGetter](#envgetter)\n\n\n | \n\n\n |
\n\n[getClientConn](#)\n\n\n | \n\n\n | \n\n() => [ClientConn](#clientconn)\n\n\n | \n\n\n |
\n\n[getWritableStream](#)\n\n\n | \n\n\n | \n\n[ServerResponseHandler](#serverresponsehandler)<T>\n\n\n | \n\n\n |
\n\n[locale](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n\n |
\n\n[mode](#)\n\n\n | \n\n\n | \n\n[ServerRequestMode](#serverrequestmode)\n\n\n | \n\n\n |
\n\n[platform](#)\n\n\n | \n\n\n | \n\nQwikCityPlatform\n\n\n | \n\n\n |
\n\n[request](#)\n\n\n | \n\n\n | \n\nRequest\n\n\n | \n\n\n |
\n\n[url](#)\n\n\n | \n\n\n | \n\nURL\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nname\n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\nvalue\n\n\n | \n\nstring \\| number \\| Record<string, any>\n\n\n | \n\n\n |
\n\noptions\n\n\n | \n\n[CookieOptions](#cookieoptions)\n\n\n | \n\n_(Optional)_\n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -name - - | - -string - - | - - |
- -value - - | - -string \| number \| Record<string, any> - - | - - |
- -options - - | - -[CookieOptions](#cookieoptions) - - | - -_(Optional)_ - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[country?](#) - - | - - | - -string - - | - -_(Optional)_ - - |
- -[ip?](#) - - | - - | - -string - - | - -_(Optional)_ - - |
- -Method - - | - -Description - - |
---|---|
- -[append(name, value, options)](#cookie-append) - - | - -Appends a `Response` cookie header using the `Set-Cookie` header. - -The difference between `set()` and `append()` is that if the specified header already exists, `set()` will overwrite the existing value with the new one, whereas `append()` will append the new value onto the end of the set of values. - - |
- -[delete(name, options)](#cookie-delete) - - | - -Deletes cookie value by name using the `Response` cookie header. - - |
- -[get(name)](#cookie-get) - - | - -Gets a `Request` cookie header value by name. - - |
- -[getAll()](#cookie-getall) - - | - -Gets all `Request` cookie headers. - - |
- -[has(name)](#cookie-has) - - | - -Checks if the `Request` cookie header name exists. - - |
- -[headers()](#cookie-headers) - - | - -Returns an array of all the set `Response` `Set-Cookie` header values. - - |
- -[set(name, value, options)](#cookie-set) - - | - -Sets a `Response` cookie header using the `Set-Cookie` header. - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[domain?](#) - - | - - | - -string - - | - -_(Optional)_ Defines the host to which the cookie will be sent. If omitted, this attribute defaults to the host of the current document URL, not including subdomains. - - |
- -[expires?](#) - - | - - | - -Date \| string - - | - -_(Optional)_ Indicates the maximum lifetime of the cookie as an HTTP-date timestamp. If both `expires` and `maxAge` are set, `maxAge` has precedence. - - |
- -[httpOnly?](#) - - | - - | - -boolean - - | - -_(Optional)_ Forbids JavaScript from accessing the cookie, for example, through the `document.cookie` property. - - |
- -[maxAge?](#) - - | - - | - -number \| [number, 'seconds' \| 'minutes' \| 'hours' \| 'days' \| 'weeks'] - - | - -_(Optional)_ Indicates the number of seconds until the cookie expires. A zero or negative number will expire the cookie immediately. If both `expires` and `maxAge` are set, `maxAge` has precedence. You can also use the array syntax to set the max-age using minutes, hours, days or weeks. For example, `{ maxAge: [3, "days"] }` would set the cookie to expire in 3 days. - - |
- -[path?](#) - - | - - | - -string - - | - -_(Optional)_ Indicates the path that must exist in the requested URL for the browser to send the Cookie header. - - |
- -[sameSite?](#) - - | - - | - -'strict' \| 'lax' \| 'none' \| 'Strict' \| 'Lax' \| 'None' \| boolean - - | - -_(Optional)_ Controls whether or not a cookie is sent with cross-site requests, providing some protection against cross-site request forgery attacks (CSRF). - - |
- -[secure?](#) - - | - - | - -boolean - - | - -_(Optional)_ Indicates that the cookie is sent to the server only when a request is made with the `https:` scheme (except on localhost) - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[json](#) - - | - - | - -<T = unknown>() => T - - | - - |
- -[number](#) - - | - - | - -() => number - - | - - |
- -[value](#) - - | - - | - -string - - | - - |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -name - - | - -string - - | - - |
- -options - - | - -Pick<[CookieOptions](#cookieoptions), 'path' \| 'domain' \| 'sameSite'> - - | - -_(Optional)_ - - |
- -Method - - | - -Description - - |
---|---|
- -[get(key)](#) - - | - - |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -name - - | - -string - - | - - |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -status - - | - -number - - | - - |
- -e - - | - -any - - | - - |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -name - - | - -string - - | - - |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -headers - - | - -Headers - - | - - |
- -cookies - - | - -[CookieInterface](#cookie) - - | - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[exited](#) - - | - -`readonly` - - | - -boolean - - | - -True if the middleware chain has finished executing. - - |
- -[getWritableStream](#) - - | - -`readonly` - - | - -() => WritableStream<Uint8Array> - - | - -Low-level access to write to the HTTP response stream. Once `getWritableStream()` is called, the status and headers can no longer be modified and will be sent over the network. - - |
- -[headersSent](#) - - | - -`readonly` - - | - -boolean - - | - -True if headers have been sent, preventing any more headers from being set. - - |
- -[next](#) - - | - -`readonly` - - | - -() => Promise<void> - - | - -Invoke the next middleware function in the chain. - -NOTE: Ensure that the call to `next()` is `await`ed. - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[fail](#) - - | - - | - -<T extends Record<string, any>>(status: number, returnData: T) => FailReturn<T> - - | - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[basePathname](#) - - | - -`readonly` - - | - -string - - | - -The base pathname of the request, which can be configured at build time. Defaults to `/`. - - |
- -[cacheControl](#) - - | - -`readonly` - - | - -(cacheControl: [CacheControl](#cachecontrol), target?: CacheControlTarget) => void - - | - -Convenience method to set the Cache-Control header. Depending on your CDN, you may want to add another cacheControl with the second argument set to `CDN-Cache-Control` or any other value (we provide the most common values for auto-complete, but you can use any string you want). - -See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control and https://qwik.dev/docs/caching/\#CDN-Cache-Controls for more information. - - |
- -[clientConn](#) - - | - -`readonly` - - | - -[ClientConn](#clientconn) - - | - -Provides information about the client connection, such as the IP address and the country the request originated from. - - |
- -[cookie](#) - - | - -`readonly` - - | - -[Cookie](#cookie) - - | - -HTTP request and response cookie. Use the `get()` method to retrieve a request cookie value. Use the `set()` method to set a response cookie value. - -https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies - - |
- -[env](#) - - | - -`readonly` - - | - -[EnvGetter](#envgetter) - - | - -Platform provided environment variables. - - |
- -[headers](#) - - | - -`readonly` - - | - -Headers - - | - -HTTP response headers. Notice it will be empty until you first add a header. If you want to read the request headers, use `request.headers` instead. - -https://developer.mozilla.org/en-US/docs/Glossary/Response\_header - - |
- -[method](#) - - | - -`readonly` - - | - -string - - | - -HTTP request method. - -https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods - - |
- -[params](#) - - | - -`readonly` - - | - -Readonly<Record<string, string>> - - | - -URL path params which have been parsed from the current url pathname segments. Use `query` to instead retrieve the query string search params. - - |
- -[parseBody](#) - - | - -`readonly` - - | - -() => Promise<unknown> - - | - -This method will check the request headers for a `Content-Type` header and parse the body accordingly. It supports `application/json`, `application/x-www-form-urlencoded`, and `multipart/form-data` content types. - -If the `Content-Type` header is not set, it will return `null`. - - |
- -[pathname](#) - - | - -`readonly` - - | - -string - - | - -URL pathname. Does not include the protocol, domain, query string (search params) or hash. - -https://developer.mozilla.org/en-US/docs/Web/API/URL/pathname - - |
- -[platform](#) - - | - -`readonly` - - | - -PLATFORM - - | - -Platform specific data and functions - - |
- -[query](#) - - | - -`readonly` - - | - -URLSearchParams - - | - -URL Query Strings (URL Search Params). Use `params` to instead retrieve the route params found in the url pathname. - -https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams - - |
- -[request](#) - - | - -`readonly` - - | - -Request - - | - -HTTP request information. - - |
- -[sharedMap](#) - - | - -`readonly` - - | - -Map<string, any> - - | - -Shared Map across all the request handlers. Every HTTP request will get a new instance of the shared map. The shared map is useful for sharing data between request handlers. - - |
- -[signal](#) - - | - -`readonly` - - | - -AbortSignal - - | - -Request's AbortSignal (same as `request.signal`). This signal indicates that the request has been aborted. - - |
- -[url](#) - - | - -`readonly` - - | - -URL - - | - -HTTP request URL. - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[error](#) - - | - -`readonly` - - | - -(statusCode: ErrorCodes, message: string) => ErrorResponse - - | - -When called, the response will immediately end with the given status code. This could be useful to end a response with `404`, and use the 404 handler in the routes directory. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status for which status code should be used. - - |
- -[exit](#) - - | - -`readonly` - - | - -() => [AbortMessage](#abortmessage) - - | - - |
- -[html](#) - - | - -`readonly` - - | - -(statusCode: StatusCodes, html: string) => [AbortMessage](#abortmessage) - - | - -Convenience method to send an HTML body response. The response will be automatically set the `Content-Type` header to`text/html; charset=utf-8`. An `html()` response can only be called once. - - |
- -[json](#) - - | - -`readonly` - - | - -(statusCode: StatusCodes, data: any) => [AbortMessage](#abortmessage) - - | - -Convenience method to JSON stringify the data and send it in the response. The response will be automatically set the `Content-Type` header to `application/json; charset=utf-8`. A `json()` response can only be called once. - - |
- -[locale](#) - - | - -`readonly` - - | - -(local?: string) => string - - | - -Which locale the content is in. - -The locale value can be retrieved from selected methods using `getLocale()`: - - |
- -[redirect](#) - - | - -`readonly` - - | - -(statusCode: RedirectCode, url: string) => [RedirectMessage](#redirectmessage) - - | - -URL to redirect to. When called, the response will immediately end with the correct redirect status and headers. - -https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections - - |
- -[send](#) - - | - -`readonly` - - | - -SendMethod - - | - -Send a body response. The `Content-Type` response header is not automatically set when using `send()` and must be set manually. A `send()` response can only be called once. - - |
- -[status](#) - - | - -`readonly` - - | - -(statusCode?: StatusCodes) => number - - | - -HTTP response status code. Sets the status code when called with an argument. Always returns the status code, so calling `status()` without an argument will can be used to return the current status code. - -https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - - |
- -[text](#) - - | - -`readonly` - - | - -(statusCode: StatusCodes, text: string) => [AbortMessage](#abortmessage) - - | - -Convenience method to send an text body response. The response will be automatically set the `Content-Type` header to`text/plain; charset=utf-8`. An `text()` response can only be called once. - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[defer](#) - - | - - | - -<T>(returnData: Promise<T> \| (() => Promise<T>)) => [DeferReturn](#deferreturn)<T> - - | - - |
- -[resolveValue](#) - - | - - | - -[ResolveValue](#resolvevalue) - - | - - |
- -Constructor - - | - -Modifiers - - | - -Description - - |
---|---|---|
- -[(constructor)(status, data)](#) - - | - - | - -Constructs a new instance of the `ServerError` class - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[data](#servererror-data) - - | - - | - -T - - | - - |
- -[status](#servererror-status) - - | - - | - -number - - | - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[checkOrigin?](#) - - | - - | - -boolean - - | - -_(Optional)_ Protection against cross-site request forgery (CSRF) attacks. - -When `true`, for every incoming POST, PUT, PATCH, or DELETE form submissions, the request origin is checked to match the server's origin. - -Be careful when disabling this option as it may lead to CSRF attacks. - -Defaults to `true`. - - |
- -[qwikCityPlan](#) - - | - - | - -QwikCityPlan - - | - - |
- -[render](#) - - | - - | - -Render - - | - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[env](#) - - | - - | - -[EnvGetter](#envgetter) - - | - - |
- -[getClientConn](#) - - | - - | - -() => [ClientConn](#clientconn) - - | - - |
- -[getWritableStream](#) - - | - - | - -[ServerResponseHandler](#serverresponsehandler)<T> - - | - - |
- -[locale](#) - - | - - | - -string \| undefined - - | - - |
- -[mode](#) - - | - - | - -[ServerRequestMode](#serverrequestmode) - - | - - |
- -[platform](#) - - | - - | - -QwikCityPlatform - - | - - |
- -[request](#) - - | - - | - -Request - - | - - |
- -[url](#) - - | - - | - -URL - - | - - |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -name - - | - -string - - | - - |
- -value - - | - -string \| number \| Record<string, any> - - | - - |
- -options - - | - -[CookieOptions](#cookieoptions) - - | - -_(Optional)_ - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[QwikCityVercelEdgeOptions](#qwikcityverceledgeoptions)\n\n\n | \n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[QwikCityVercelEdgeOptions](#qwikcityverceledgeoptions) - - | - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[StaticGenerateOptions](#staticgenerateoptions)\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[basePathname?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_ Defaults to `/`\n\n\n |
\n\n[qwikCityPlanModulePath](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\nPath to the Qwik City Plan module exporting the default `@qwik-city-plan`.\n\n\n |
\n\n[renderModulePath](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\nPath to the SSR module exporting the default render function. In most cases it'll be `./src/entry.ssr.tsx`.\n\n\n |
\n\n[rootDir?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[emit404Pages?](#)\n\n\n | \n\n\n | \n\nboolean\n\n\n | \n\n_(Optional)_ Set to `false` if the static build should not write custom or default `404.html` pages. Defaults to `true`.\n\n\n |
\n\n[emitData?](#)\n\n\n | \n\n\n | \n\nboolean\n\n\n | \n\n_(Optional)_ Set to `false` if the generated `q-data.json` data files should not be written to disk. Defaults to `true`.\n\n\n |
\n\n[emitHtml?](#)\n\n\n | \n\n\n | \n\nboolean\n\n\n | \n\n_(Optional)_ Set to `false` if the generated static HTML files should not be written to disk. Setting to `false` is useful if the SSG should only write the `q-data.json` files to disk. Defaults to `true`.\n\n\n |
\n\n[exclude?](#)\n\n\n | \n\n\n | \n\nstring\\[\\]\n\n\n | \n\n_(Optional)_ Defines file system routes relative to the source `routes` directory that should not be static generated. Accepts wildcard behavior. This should not include the \"base\" pathname. `exclude` always takes priority over `include`.\n\n\n |
\n\n[include?](#)\n\n\n | \n\n\n | \n\nstring\\[\\]\n\n\n | \n\n_(Optional)_ Defines file system routes relative to the source `routes` directory that should be static generated. Accepts wildcard behavior. This should not include the \"base\" pathname. If not provided, all routes will be static generated. `exclude` always takes priority over `include`.\n\n\n |
\n\n[log?](#)\n\n\n | \n\n\n | \n\n'debug'\n\n\n | \n\n_(Optional)_ Log level.\n\n\n |
\n\n[maxTasksPerWorker?](#)\n\n\n | \n\n\n | \n\nnumber\n\n\n | \n\n_(Optional)_ Maximum number of tasks to be running at one time per worker. Defaults to `20`.\n\n\n |
\n\n[maxWorkers?](#)\n\n\n | \n\n\n | \n\nnumber\n\n\n | \n\n_(Optional)_ Maximum number of workers to use while generating the static pages. Defaults to the number of CPUs available.\n\n\n |
\n\n[origin](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\nThe URL `origin`, which is a combination of the scheme (protocol) and hostname (domain). For example, `https://qwik.dev` has the protocol `https://` and domain `qwik.dev`. However, the `origin` does not include a `pathname`.\n\nThe `origin` is used to provide a full URL during Static Site Generation (SSG), and to simulate a complete URL rather than just the `pathname`. For example, in order to render a correct canonical tag URL or URLs within the `sitemap.xml`, the `origin` must be provided too.\n\nIf the site also starts with a pathname other than `/`, please use the `basePathname` option in the Qwik City config options.\n\n\n |
\n\n[outDir](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\nFile system directory where the static files should be written.\n\n\n |
\n\n[sitemapOutFile?](#)\n\n\n | \n\n\n | \n\nstring \\| null\n\n\n | \n\n_(Optional)_ File system path to write the `sitemap.xml` to. Defaults to `sitemap.xml` and written to the root of the `outDir`. Setting to `null` will prevent the sitemap from being created.\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[duration](#)\n\n\n | \n\n\n | \n\nnumber\n\n\n | \n\n\n |
\n\n[errors](#)\n\n\n | \n\n\n | \n\nnumber\n\n\n | \n\n\n |
\n\n[rendered](#)\n\n\n | \n\n\n | \n\nnumber\n\n\n | \n\n\n |
\n\n[staticPaths](#)\n\n\n | \n\n\n | \n\nstring\\[\\]\n\n\n | \n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[StaticGenerateOptions](#staticgenerateoptions) - - | - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[basePathname?](#) - - | - - | - -string - - | - -_(Optional)_ Defaults to `/` - - |
- -[qwikCityPlanModulePath](#) - - | - - | - -string - - | - -Path to the Qwik City Plan module exporting the default `@qwik-city-plan`. - - |
- -[renderModulePath](#) - - | - - | - -string - - | - -Path to the SSR module exporting the default render function. In most cases it'll be `./src/entry.ssr.tsx`. - - |
- -[rootDir?](#) - - | - - | - -string - - | - -_(Optional)_ - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[emit404Pages?](#) - - | - - | - -boolean - - | - -_(Optional)_ Set to `false` if the static build should not write custom or default `404.html` pages. Defaults to `true`. - - |
- -[emitData?](#) - - | - - | - -boolean - - | - -_(Optional)_ Set to `false` if the generated `q-data.json` data files should not be written to disk. Defaults to `true`. - - |
- -[emitHtml?](#) - - | - - | - -boolean - - | - -_(Optional)_ Set to `false` if the generated static HTML files should not be written to disk. Setting to `false` is useful if the SSG should only write the `q-data.json` files to disk. Defaults to `true`. - - |
- -[exclude?](#) - - | - - | - -string[] - - | - -_(Optional)_ Defines file system routes relative to the source `routes` directory that should not be static generated. Accepts wildcard behavior. This should not include the "base" pathname. `exclude` always takes priority over `include`. - - |
- -[include?](#) - - | - - | - -string[] - - | - -_(Optional)_ Defines file system routes relative to the source `routes` directory that should be static generated. Accepts wildcard behavior. This should not include the "base" pathname. If not provided, all routes will be static generated. `exclude` always takes priority over `include`. - - |
- -[log?](#) - - | - - | - -'debug' - - | - -_(Optional)_ Log level. - - |
- -[maxTasksPerWorker?](#) - - | - - | - -number - - | - -_(Optional)_ Maximum number of tasks to be running at one time per worker. Defaults to `20`. - - |
- -[maxWorkers?](#) - - | - - | - -number - - | - -_(Optional)_ Maximum number of workers to use while generating the static pages. Defaults to the number of CPUs available. - - |
- -[origin](#) - - | - - | - -string - - | - -The URL `origin`, which is a combination of the scheme (protocol) and hostname (domain). For example, `https://qwik.dev` has the protocol `https://` and domain `qwik.dev`. However, the `origin` does not include a `pathname`. - -The `origin` is used to provide a full URL during Static Site Generation (SSG), and to simulate a complete URL rather than just the `pathname`. For example, in order to render a correct canonical tag URL or URLs within the `sitemap.xml`, the `origin` must be provided too. - -If the site also starts with a pathname other than `/`, please use the `basePathname` option in the Qwik City config options. - - |
- -[outDir](#) - - | - - | - -string - - | - -File system directory where the static files should be written. - - |
- -[sitemapOutFile?](#) - - | - - | - -string \| null - - | - -_(Optional)_ File system path to write the `sitemap.xml` to. Defaults to `sitemap.xml` and written to the root of the `outDir`. Setting to `null` will prevent the sitemap from being created. - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[duration](#) - - | - - | - -number - - | - - |
- -[errors](#) - - | - - | - -number - - | - - |
- -[rendered](#) - - | - - | - -number - - | - - |
- -[staticPaths](#) - - | - - | - -string[] - - | - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[AzureSwaAdapterOptions](#azureswaadapteroptions)\n\n\n | \n\n_(Optional)_\n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[AzureSwaAdapterOptions](#azureswaadapteroptions) - - | - -_(Optional)_ - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[bunServerAdapterOptions](#bunserveradapteroptions)\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[name?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n**_(ALPHA)_** _(Optional)_\n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[bunServerAdapterOptions](#bunserveradapteroptions) - - | - -_(Optional)_ - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[name?](#) - - | - - | - -string - - | - -**_(ALPHA)_** _(Optional)_ - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[CloudRunAdapterOptions](#cloudrunadapteroptions)\n\n\n | \n\n_(Optional)_\n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[CloudRunAdapterOptions](#cloudrunadapteroptions) - - | - -_(Optional)_ - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[CloudflarePagesAdapterOptions](#cloudflarepagesadapteroptions)\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[functionRoutes?](#)\n\n\n | \n\n\n | \n\nboolean\n\n\n | \n\n_(Optional)_ Determines if the build should generate the function invocation routes `_routes.json` file.\n\nhttps://developers.cloudflare.com/pages/platform/functions/routing/\\#functions-invocation-routes\n\nDefaults to `true`.\n\n\n |
\n\n[staticPaths?](#)\n\n\n | \n\n\n | \n\nstring\\[\\]\n\n\n | \n\n_(Optional)_ Manually add pathnames that should be treated as static paths and not SSR. For example, when these pathnames are requested, their response should come from a static file, rather than a server-side rendered response.\n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[CloudflarePagesAdapterOptions](#cloudflarepagesadapteroptions) - - | - -_(Optional)_ - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[functionRoutes?](#) - - | - - | - -boolean - - | - -_(Optional)_ Determines if the build should generate the function invocation routes `_routes.json` file. - -https://developers.cloudflare.com/pages/platform/functions/routing/\#functions-invocation-routes - -Defaults to `true`. - - |
- -[staticPaths?](#) - - | - - | - -string[] - - | - -_(Optional)_ Manually add pathnames that should be treated as static paths and not SSR. For example, when these pathnames are requested, their response should come from a static file, rather than a server-side rendered response. - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[NetlifyEdgeAdapterOptions](#netlifyedgeadapteroptions)\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[excludedPath?](#)\n\n\n | \n\n\n | \n\nstring \\| string\\[\\]\n\n\n | \n\n_(Optional)_ Manually add path pattern that should be excluded from the edge function routes that are created by the 'manifest.json' file.\n\nIf not specified, the following paths are excluded by default:\n\n- /build/\\* - /favicon.ico - /robots.txt - /mainifest.json - /\\~partytown/\\* - /service-worker.js - /sitemap.xml\n\nhttps://docs.netlify.com/edge-functions/declarations/\\#declare-edge-functions-in-netlify-toml\n\n\n |
\n\n[functionRoutes?](#)\n\n\n | \n\n\n | \n\nboolean\n\n\n | \n\n_(Optional)_ Determines if the build should generate the edge functions declarations `manifest.json` file.\n\nhttps://docs.netlify.com/edge-functions/declarations/\n\nDefaults to `true`.\n\n\n |
\n\n[staticPaths?](#)\n\n\n | \n\n\n | \n\nstring\\[\\]\n\n\n | \n\n_(Optional)_ Manually add pathnames that should be treated as static paths and not SSR. For example, when these pathnames are requested, their response should come from a static file, rather than a server-side rendered response.\n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[NetlifyEdgeAdapterOptions](#netlifyedgeadapteroptions) - - | - -_(Optional)_ - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[excludedPath?](#) - - | - - | - -string \| string[] - - | - -_(Optional)_ Manually add path pattern that should be excluded from the edge function routes that are created by the 'manifest.json' file. - -If not specified, the following paths are excluded by default: - -- /build/\* - /favicon.ico - /robots.txt - /mainifest.json - /\~partytown/\* - /service-worker.js - /sitemap.xml - -https://docs.netlify.com/edge-functions/declarations/\#declare-edge-functions-in-netlify-toml - - |
- -[functionRoutes?](#) - - | - - | - -boolean - - | - -_(Optional)_ Determines if the build should generate the edge functions declarations `manifest.json` file. - -https://docs.netlify.com/edge-functions/declarations/ - -Defaults to `true`. - - |
- -[staticPaths?](#) - - | - - | - -string[] - - | - -_(Optional)_ Manually add pathnames that should be treated as static paths and not SSR. For example, when these pathnames are requested, their response should come from a static file, rather than a server-side rendered response. - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[NodeServerAdapterOptions](#nodeserveradapteroptions)\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[name?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n**_(ALPHA)_** _(Optional)_\n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[NodeServerAdapterOptions](#nodeserveradapteroptions) - - | - -_(Optional)_ - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[name?](#) - - | - - | - -string - - | - -**_(ALPHA)_** _(Optional)_ - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[StaticGenerateAdapterOptions](#staticgenerateadapteroptions)\n\n\n | \n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[StaticGenerateAdapterOptions](#staticgenerateadapteroptions) - - | - - |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\n[VercelEdgeAdapterOptions](#verceledgeadapteroptions)\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[outputConfig?](#)\n\n\n | \n\n\n | \n\nboolean\n\n\n | \n\n_(Optional)_ Determines if the build should auto-generate the `.vercel/output/config.json` config.\n\nDefaults to `true`.\n\n\n |
\n\n[staticPaths?](#)\n\n\n | \n\n\n | \n\nstring\\[\\]\n\n\n | \n\n_(Optional)_ Manually add pathnames that should be treated as static paths and not SSR. For example, when these pathnames are requested, their response should come from a static file, rather than a server-side rendered response.\n\n\n |
\n\n[target?](#)\n\n\n | \n\n\n | \n\n'webworker' \\| 'node'\n\n\n | \n\n_(Optional)_ Define the `target` property in the `ssr` object in the `vite.config.ts` file.\n\nDefaults to `webworker`.\n\n\n |
\n\n[vcConfigEntryPoint?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_ The `entrypoint` property in the `.vc-config.json` file. Indicates the initial file where code will be executed for the Edge Function.\n\nDefaults to `entry.vercel-edge.js`.\n\n\n |
\n\n[vcConfigEnvVarsInUse?](#)\n\n\n | \n\n\n | \n\nstring\\[\\]\n\n\n | \n\n_(Optional)_ The `envVarsInUse` property in the `.vc-config.json` file. List of environment variable names that will be available for the Edge Function to utilize.\n\nDefaults to `undefined`.\n\n\n |
- -Parameter - - | - -Type - - | - -Description - - |
---|---|---|
- -opts - - | - -[VercelEdgeAdapterOptions](#verceledgeadapteroptions) - - | - -_(Optional)_ - - |
- -Property - - | - -Modifiers - - | - -Type - - | - -Description - - |
---|---|---|---|
- -[outputConfig?](#) - - | - - | - -boolean - - | - -_(Optional)_ Determines if the build should auto-generate the `.vercel/output/config.json` config. - -Defaults to `true`. - - |
- -[staticPaths?](#) - - | - - | - -string[] - - | - -_(Optional)_ Manually add pathnames that should be treated as static paths and not SSR. For example, when these pathnames are requested, their response should come from a static file, rather than a server-side rendered response. - - |
- -[target?](#) - - | - - | - -'webworker' \| 'node' - - | - -_(Optional)_ Define the `target` property in the `ssr` object in the `vite.config.ts` file. - -Defaults to `webworker`. - - |
- -[vcConfigEntryPoint?](#) - - | - - | - -string - - | - -_(Optional)_ The `entrypoint` property in the `.vc-config.json` file. Indicates the initial file where code will be executed for the Edge Function. - -Defaults to `entry.vercel-edge.js`. - - |
- -[vcConfigEnvVarsInUse?](#) - - | - - | - -string[] - - | - -_(Optional)_ The `envVarsInUse` property in the `.vc-config.json` file. List of environment variable names that will be available for the Edge Function to utilize. - -Defaults to `undefined`. - - |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[id](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\n[level](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nnumber\n\n\n | \n\n\n |
\n\n[text](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[href?](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[items?](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n[ContentMenu](#contentmenu)\\[\\]\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[text](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[head](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n[ResolvedDocumentHead](#resolveddocumenthead)\n\n\n | \n\n\n |
\n\n[resolveValue](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nResolveSyncValue\n\n\n | \n\n\n |
\n\n[withLocale](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n<T>(fn: () => T) => T\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[frontmatter?](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nReadonly<FrontMatter>\n\n\n | \n\n_(Optional)_ Arbitrary object containing custom data. When the document head is created from markdown files, the frontmatter attributes that are not recognized as a well-known meta names (such as title, description, author, etc...), are stored in this property.\n\n\n |
\n\n[links?](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nreadonly [DocumentLink](#documentlink)\\[\\]\n\n\n | \n\n_(Optional)_ Used to manually append `` elements to the ``.\n\n\n |
\n\n[meta?](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nreadonly [DocumentMeta](#documentmeta)\\[\\]\n\n\n | \n\n_(Optional)_ Used to manually set meta tags in the head. Additionally, the `data` property could be used to set arbitrary data which the `` component could later use to generate `` tags.\n\n\n |
\n\n[scripts?](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nreadonly [DocumentScript](#documentscript)\\[\\]\n\n\n | \n\n_(Optional)_ Used to manually append `\n```\nBy default, the `prefetchEvent` implementation will be set to `always`.\n\n\n |
\n\n[workerFetchInsert?](#)\n\n\n | \n\n\n | \n\n'always' \\| 'no-link-support' \\| null\n\n\n | \n\n_(Optional)_ `always`: Always include the worker fetch JS runtime.\n\n`no-link-support`: Only include the worker fetch JS runtime when the browser doesn't support `` prefetch/preload/modulepreload.\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[imports](#)\n\n\n | \n\n\n | \n\n[PrefetchResource](#prefetchresource)\\[\\]\n\n\n | \n\n\n |
\n\n[url](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[implementation?](#)\n\n\n | \n\n\n | \n\n[PrefetchImplementation](#prefetchimplementation)\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[symbolsToPrefetch?](#)\n\n\n | \n\n\n | \n\n[SymbolsToPrefetch](#symbolstoprefetch)\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[include?](#)\n\n\n | \n\n\n | \n\n'always' \\| 'never' \\| 'auto'\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[position?](#)\n\n\n | \n\n\n | \n\n'top' \\| 'bottom'\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[base?](#)\n\n\n | \n\n\n | \n\nstring \\| ((options: [RenderOptions](#renderoptions)) => string)\n\n\n | \n\n_(Optional)_ Specifies the root of the JS files of the client build. Setting a base, will cause the render of the `q:base` attribute in the `q:container` element.\n\n\n |
\n\n[containerAttributes?](#)\n\n\n | \n\n\n | \n\nRecord<string, string>\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[containerTagName?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_ When set, the app is serialized into a fragment. And the returned html is not a complete document. Defaults to `html`\n\n\n |
\n\n[locale?](#)\n\n\n | \n\n\n | \n\nstring \\| ((options: [RenderOptions](#renderoptions)) => string)\n\n\n | \n\n_(Optional)_ Language to use when rendering the document.\n\n\n |
\n\n[prefetchStrategy?](#)\n\n\n | \n\n\n | \n\n[PrefetchStrategy](#prefetchstrategy) \\| null\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[qwikLoader?](#)\n\n\n | \n\n\n | \n\n[QwikLoaderOptions](#qwikloaderoptions)\n\n\n | \n\n_(Optional)_ Specifies if the Qwik Loader script is added to the document or not.\n\nDefaults to `{ include: true }`.\n\n\n |
\n\n[qwikPrefetchServiceWorker?](#)\n\n\n | \n\n\n | \n\nQwikPrefetchServiceWorkerOptions\n\n\n | \n\n_(Optional)_ Specifies if the Qwik Prefetch Service Worker script is added to the document or not.\n\nDefaults to `{ include: false }`. NOTE: This may be change in the future.\n\n\n |
\n\n[serverData?](#)\n\n\n | \n\n\n | \n\nRecord<string, any>\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[snapshot?](#)\n\n\n | \n\n\n | \n\nboolean\n\n\n | \n\n_(Optional)_ Defaults to `true`\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[isStatic](#)\n\n\n | \n\n\n | \n\nboolean\n\n\n | \n\n\n |
\n\n[manifest?](#)\n\n\n | \n\n\n | \n\nQwikManifest\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[prefetchResources](#)\n\n\n | \n\n\n | \n\n[PrefetchResource](#prefetchresource)\\[\\]\n\n\n | \n\n\n |
\n\n[snapshotResult](#)\n\n\n | \n\n\n | \n\nSnapshotResult \\| undefined\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[stream](#)\n\n\n | \n\n\n | \n\nStreamWriter\n\n\n | \n\n\n |
\n\n[streaming?](#)\n\n\n | \n\n\n | \n\n[StreamingOptions](#streamingoptions)\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[flushes](#)\n\n\n | \n\n\n | \n\nnumber\n\n\n | \n\n\n |
\n\n[size](#)\n\n\n | \n\n\n | \n\nnumber\n\n\n | \n\n\n |
\n\n[timing](#)\n\n\n | \n\n\n | \n\n{ firstFlush: number; render: number; snapshot: number; }\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[html](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\n[timing](#)\n\n\n | \n\n\n | \n\n{ render: number; snapshot: number; }\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[html](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\n[timing](#)\n\n\n | \n\n\n | \n\n{ firstFlush: number; render: number; snapshot: number; }\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nmanifest\n\n\n | \n\nQwikManifest \\| ResolvedManifest \\| undefined\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[debug?](#)\n\n\n | \n\n\n | \n\nboolean\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[manifest?](#)\n\n\n | \n\n\n | \n\nQwikManifest \\| ResolvedManifest\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[symbolMapper?](#)\n\n\n | \n\n\n | \n\nSymbolMapperFn\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nmanifest\n\n\n | \n\nQwikManifest \\| ResolvedManifest \\| undefined\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[inOrder?](#)\n\n\n | \n\n\n | \n\n[InOrderStreaming](#inorderstreaming)\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nopts\n\n\n | \n\nMockDocumentOptions\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\n{ html }\n\n\n | \n\n{ html?: string; }\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\n{ html }\n\n\n | \n\n{ html?: string; }\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\njsx\n\n\n | \n\nJSXOutput\n\n\n | \n\n\n |
\n\nopts\n\n\n | \n\n{ debug?: boolean; }\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nConstructor\n\n\n | \n\nModifiers\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\n[(constructor)(options)](#)\n\n\n | \n\n\n | \n\nConstructs a new instance of the `ElementFixture` class\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[child](#elementfixture-child)\n\n\n | \n\n\n | \n\nHTMLElement\n\n\n | \n\n\n |
\n\n[document](#elementfixture-document)\n\n\n | \n\n\n | \n\nMockDocument\n\n\n | \n\n\n |
\n\n[host](#elementfixture-host)\n\n\n | \n\n\n | \n\nHTMLElement\n\n\n | \n\n\n |
\n\n[parent](#elementfixture-parent)\n\n\n | \n\n\n | \n\nHTMLElement\n\n\n | \n\n\n |
\n\n[superParent](#elementfixture-superparent)\n\n\n | \n\n\n | \n\nHTMLElement\n\n\n | \n\n\n |
\n\n[window](#elementfixture-window)\n\n\n | \n\n\n | \n\nMockWindow\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\ndocument\n\n\n | \n\nDocument\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nactual\n\n\n | \n\nElement\n\n\n | \n\n\n |
\n\nexpected\n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\njsx\n\n\n | \n\nJSXOutput\n\n\n | \n\n\n |
\n\nopts\n\n\n | \n\n{ debug?: boolean; raw?: boolean; }\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nroot\n\n\n | \n\nElement\n\n\n | \n\n\n |
\n\nqueryOrElement\n\n\n | \n\nstring \\| Element \\| keyof HTMLElementTagNameMap \\| null\n\n\n | \n\n\n |
\n\neventNameCamel\n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\neventPayload\n\n\n | \n\nany\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\njsx\n\n\n | \n\nJSXOutput\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\njsx\n\n\n | \n\nJSXOutput\n\n\n | \n\n\n |
\n\napply\n\n\n | \n\n{ enter: (jsx: JSXNodeInternal) => void; leave: (jsx: JSXNodeInternal) => void; text: (text: \\_Stringifiable) => void; }\n\n\n | \n\n\n |
+ +Parameter + + | + +Type + + | + +Description + + |
---|---|---|
+ +opts + + | + +MockDocumentOptions + + | + +_(Optional)_ + + |
+ +Parameter + + | + +Type + + | + +Description + + |
---|---|---|
+ +jsx + + | + +JSXOutput + + | + + |
+ +opts + + | + +{ debug?: boolean; } + + | + +_(Optional)_ + + |
+ +Constructor + + | + +Modifiers + + | + +Description + + |
---|---|---|
+ +[(constructor)(options)](#) + + | + + | + +Constructs a new instance of the `ElementFixture` class + + |
+ +Property + + | + +Modifiers + + | + +Type + + | + +Description + + |
---|---|---|---|
+ +[child](#elementfixture-child) + + | + + | + +HTMLElement + + | + + |
+ +[document](#elementfixture-document) + + | + + | + +MockDocument + + | + + |
+ +[host](#elementfixture-host) + + | + + | + +HTMLElement + + | + + |
+ +[parent](#elementfixture-parent) + + | + + | + +HTMLElement + + | + + |
+ +[superParent](#elementfixture-superparent) + + | + + | + +HTMLElement + + | + + |
+ +[window](#elementfixture-window) + + | + + | + +MockWindow + + | + + |
+ +Parameter + + | + +Type + + | + +Description + + |
---|---|---|
+ +document + + | + +Document + + | + + |
+ +Parameter + + | + +Type + + | + +Description + + |
---|---|---|
+ +actual + + | + +Element + + | + + |
+ +expected + + | + +string + + | + + |
+ +Parameter + + | + +Type + + | + +Description + + |
---|---|---|
+ +jsx + + | + +JSXOutput + + | + + |
+ +opts + + | + +{ debug?: boolean; raw?: boolean; } + + | + +_(Optional)_ + + |
+ +Parameter + + | + +Type + + | + +Description + + |
---|---|---|
+ +root + + | + +Element + + | + + |
+ +queryOrElement + + | + +string \| Element \| keyof HTMLElementTagNameMap \| null + + | + + |
+ +eventNameCamel + + | + +string + + | + + |
+ +eventPayload + + | + +any + + | + +_(Optional)_ + + |
+ +Parameter + + | + +Type + + | + +Description + + |
---|---|---|
+ +jsx + + | + +JSXOutput + + | + + |
+ +Parameter + + | + +Type + + | + +Description + + |
---|---|---|
+ +jsx + + | + +JSXOutput + + | + + |
+ +apply + + | + +{ enter: (jsx: JSXNodeInternal) => void; leave: (jsx: JSXNodeInternal) => void; text: (text: \_Stringifiable) => void; } + + | + + |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nfn\n\n\n | \n\nTYPE\n\n\n | \n\nExtracted function\n\n\n |
\n\nserializedFn\n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_ Serialized function in string form.\n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nexpression\n\n\n | \n\nT\n\n\n | \n\nExpression which should be lazy loaded\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[\"aria-activedescendant\"?](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n_(Optional)_ Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.\n\n\n |
\n\n[\"aria-atomic\"?](#)\n\n\n | \n\n\n | \n\n[Booleanish](#booleanish) \\| undefined\n\n\n | \n\n_(Optional)_ Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.\n\n\n |
\n\n[\"aria-autocomplete\"?](#)\n\n\n | \n\n\n | \n\n'none' \\| 'inline' \\| 'list' \\| 'both' \\| undefined\n\n\n | \n\n_(Optional)_ Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made.\n\n\n |
\n\n[\"aria-busy\"?](#)\n\n\n | \n\n\n | \n\n[Booleanish](#booleanish) \\| undefined\n\n\n | \n\n_(Optional)_ Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.\n\n\n |
\n\n[\"aria-checked\"?](#)\n\n\n | \n\n\n | \n\nboolean \\| 'false' \\| 'mixed' \\| 'true' \\| undefined\n\n\n | \n\n_(Optional)_ Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n\n\n |
\n\n[\"aria-colcount\"?](#)\n\n\n | \n\n\n | \n\nnumber \\| undefined\n\n\n | \n\n_(Optional)_ Defines the total number of columns in a table, grid, or treegrid.\n\n\n |
\n\n[\"aria-colindex\"?](#)\n\n\n | \n\n\n | \n\nnumber \\| undefined\n\n\n | \n\n_(Optional)_ Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n\n\n |
\n\n[\"aria-colspan\"?](#)\n\n\n | \n\n\n | \n\nnumber \\| undefined\n\n\n | \n\n_(Optional)_ Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n\n\n |
\n\n[\"aria-controls\"?](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n_(Optional)_ Identifies the element (or elements) whose contents or presence are controlled by the current element.\n\n\n |
\n\n[\"aria-current\"?](#)\n\n\n | \n\n\n | \n\nboolean \\| 'false' \\| 'true' \\| 'page' \\| 'step' \\| 'location' \\| 'date' \\| 'time' \\| undefined\n\n\n | \n\n_(Optional)_ Indicates the element that represents the current item within a container or set of related elements.\n\n\n |
\n\n[\"aria-describedby\"?](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n_(Optional)_ Identifies the element (or elements) that describes the object.\n\n\n |
\n\n[\"aria-details\"?](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n_(Optional)_ Identifies the element that provides a detailed, extended description for the object.\n\n\n |
\n\n[\"aria-disabled\"?](#)\n\n\n | \n\n\n | \n\n[Booleanish](#booleanish) \\| undefined\n\n\n | \n\n_(Optional)_ Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n\n\n |
\n\n[\"aria-dropeffect\"?](#)\n\n\n | \n\n\n | \n\n'none' \\| 'copy' \\| 'execute' \\| 'link' \\| 'move' \\| 'popup' \\| undefined\n\n\n | \n\n_(Optional)_ Indicates what functions can be performed when a dragged object is released on the drop target.\n\n\n |
\n\n[\"aria-errormessage\"?](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n_(Optional)_ Identifies the element that provides an error message for the object.\n\n\n |
\n\n[\"aria-expanded\"?](#)\n\n\n | \n\n\n | \n\n[Booleanish](#booleanish) \\| undefined\n\n\n | \n\n_(Optional)_ Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.\n\n\n |
\n\n[\"aria-flowto\"?](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n_(Optional)_ Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.\n\n\n |
\n\n[\"aria-grabbed\"?](#)\n\n\n | \n\n\n | \n\n[Booleanish](#booleanish) \\| undefined\n\n\n | \n\n_(Optional)_ Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n\n\n |
\n\n[\"aria-haspopup\"?](#)\n\n\n | \n\n\n | \n\nboolean \\| 'false' \\| 'true' \\| 'menu' \\| 'listbox' \\| 'tree' \\| 'grid' \\| 'dialog' \\| undefined\n\n\n | \n\n_(Optional)_ Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.\n\n\n |
\n\n[\"aria-hidden\"?](#)\n\n\n | \n\n\n | \n\n[Booleanish](#booleanish) \\| undefined\n\n\n | \n\n_(Optional)_ Indicates whether the element is exposed to an accessibility API.\n\n\n |
\n\n[\"aria-invalid\"?](#)\n\n\n | \n\n\n | \n\nboolean \\| 'false' \\| 'true' \\| 'grammar' \\| 'spelling' \\| undefined\n\n\n | \n\n_(Optional)_ Indicates the entered value does not conform to the format expected by the application.\n\n\n |
\n\n[\"aria-keyshortcuts\"?](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n_(Optional)_ Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.\n\n\n |
\n\n[\"aria-label\"?](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n_(Optional)_ Defines a string value that labels the current element.\n\n\n |
\n\n[\"aria-labelledby\"?](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n_(Optional)_ Identifies the element (or elements) that labels the current element.\n\n\n |
\n\n[\"aria-level\"?](#)\n\n\n | \n\n\n | \n\nnumber \\| undefined\n\n\n | \n\n_(Optional)_ Defines the hierarchical level of an element within a structure.\n\n\n |
\n\n[\"aria-live\"?](#)\n\n\n | \n\n\n | \n\n'off' \\| 'assertive' \\| 'polite' \\| undefined\n\n\n | \n\n_(Optional)_ Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.\n\n\n |
\n\n[\"aria-modal\"?](#)\n\n\n | \n\n\n | \n\n[Booleanish](#booleanish) \\| undefined\n\n\n | \n\n_(Optional)_ Indicates whether an element is modal when displayed.\n\n\n |
\n\n[\"aria-multiline\"?](#)\n\n\n | \n\n\n | \n\n[Booleanish](#booleanish) \\| undefined\n\n\n | \n\n_(Optional)_ Indicates whether a text box accepts multiple lines of input or only a single line.\n\n\n |
\n\n[\"aria-multiselectable\"?](#)\n\n\n | \n\n\n | \n\n[Booleanish](#booleanish) \\| undefined\n\n\n | \n\n_(Optional)_ Indicates that the user may select more than one item from the current selectable descendants.\n\n\n |
\n\n[\"aria-orientation\"?](#)\n\n\n | \n\n\n | \n\n'horizontal' \\| 'vertical' \\| undefined\n\n\n | \n\n_(Optional)_ Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.\n\n\n |
\n\n[\"aria-owns\"?](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n_(Optional)_ Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n\n\n |
\n\n[\"aria-placeholder\"?](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n_(Optional)_ Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.\n\n\n |
\n\n[\"aria-posinset\"?](#)\n\n\n | \n\n\n | \n\nnumber \\| undefined\n\n\n | \n\n_(Optional)_ Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n\n\n |
\n\n[\"aria-pressed\"?](#)\n\n\n | \n\n\n | \n\nboolean \\| 'false' \\| 'mixed' \\| 'true' \\| undefined\n\n\n | \n\n_(Optional)_ Indicates the current \"pressed\" state of toggle buttons.\n\n\n |
\n\n[\"aria-readonly\"?](#)\n\n\n | \n\n\n | \n\n[Booleanish](#booleanish) \\| undefined\n\n\n | \n\n_(Optional)_ Indicates that the element is not editable, but is otherwise operable.\n\n\n |
\n\n[\"aria-relevant\"?](#)\n\n\n | \n\n\n | \n\n'additions' \\| 'additions removals' \\| 'additions text' \\| 'all' \\| 'removals' \\| 'removals additions' \\| 'removals text' \\| 'text' \\| 'text additions' \\| 'text removals' \\| undefined\n\n\n | \n\n_(Optional)_ Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n\n\n |
\n\n[\"aria-required\"?](#)\n\n\n | \n\n\n | \n\n[Booleanish](#booleanish) \\| undefined\n\n\n | \n\n_(Optional)_ Indicates that user input is required on the element before a form may be submitted.\n\n\n |
\n\n[\"aria-roledescription\"?](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n_(Optional)_ Defines a human-readable, author-localized description for the role of an element.\n\n\n |
\n\n[\"aria-rowcount\"?](#)\n\n\n | \n\n\n | \n\nnumber \\| undefined\n\n\n | \n\n_(Optional)_ Defines the total number of rows in a table, grid, or treegrid.\n\n\n |
\n\n[\"aria-rowindex\"?](#)\n\n\n | \n\n\n | \n\nnumber \\| undefined\n\n\n | \n\n_(Optional)_ Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n\n\n |
\n\n[\"aria-rowspan\"?](#)\n\n\n | \n\n\n | \n\nnumber \\| undefined\n\n\n | \n\n_(Optional)_ Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n\n\n |
\n\n[\"aria-selected\"?](#)\n\n\n | \n\n\n | \n\n[Booleanish](#booleanish) \\| undefined\n\n\n | \n\n_(Optional)_ Indicates the current \"selected\" state of various widgets.\n\n\n |
\n\n[\"aria-setsize\"?](#)\n\n\n | \n\n\n | \n\nnumber \\| undefined\n\n\n | \n\n_(Optional)_ Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n\n\n |
\n\n[\"aria-sort\"?](#)\n\n\n | \n\n\n | \n\n'none' \\| 'ascending' \\| 'descending' \\| 'other' \\| undefined\n\n\n | \n\n_(Optional)_ Indicates if items in a table or grid are sorted in ascending or descending order.\n\n\n |
\n\n[\"aria-valuemax\"?](#)\n\n\n | \n\n\n | \n\nnumber \\| undefined\n\n\n | \n\n_(Optional)_ Defines the maximum allowed value for a range widget.\n\n\n |
\n\n[\"aria-valuemin\"?](#)\n\n\n | \n\n\n | \n\nnumber \\| undefined\n\n\n | \n\n_(Optional)_ Defines the minimum allowed value for a range widget.\n\n\n |
\n\n[\"aria-valuenow\"?](#)\n\n\n | \n\n\n | \n\nnumber \\| undefined\n\n\n | \n\n_(Optional)_ Defines the current value for a range widget.\n\n\n |
\n\n[\"aria-valuetext\"?](#)\n\n\n | \n\n\n | \n\nstring \\| undefined\n\n\n | \n\n_(Optional)_ Defines the human readable text alternative of aria-valuenow for a range widget.\n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\npolicyOrMilliseconds\n\n\n | \n\nnumber \\| 'immutable'\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nonMount\n\n\n | \n\n[OnRenderFn](#onrenderfn)<PROPS>\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[\"q:slot\"?](#componentbaseprops-_q_slot_)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_\n\n\n |
\n\n[key?](#)\n\n\n | \n\n\n | \n\nstring \\| number \\| null \\| undefined\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\ncomponentQrl\n\n\n | \n\n[QRL](#qrl)<[OnRenderFn](#onrenderfn)<PROPS>>\n\n\n | \n\n\n |
\n\nMethod\n\n\n | \n\nDescription\n\n\n |
---|---|
\n\n[force()](#computedsignal-force)\n\n\n | \n\nUse this to force recalculation and running subscribers, for example when the calculated value mutates but remains the same object. Useful for third-party libraries.\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[\\_\\_brand\\_context\\_type\\_\\_](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nSTATE\n\n\n | \n\nDesign-time property to store type information for the context.\n\n\n |
\n\n[id](#)\n\n\n | \n\n`readonly`\n\n\n | \n\nstring\n\n\n | \n\nA unique ID for the context.\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[chunkForSymbol](#)\n\n\n | \n\n\n | \n\n(symbolName: string, chunk: string \\| null, parent?: string) => readonly \\[symbol: string, chunk: string\\] \\| undefined\n\n\n | \n\nRetrieve chunk name for the symbol.\n\nWhen the application is running on the server the symbols may be imported from different files (as server build is typically a single javascript chunk.) For this reason, it is necessary to convert the chunks from server format to client (browser) format. This is done by looking up symbols (which are globally unique) in the manifest. (Manifest is the mapping of symbols to the client chunk names.)\n\n\n |
\n\n[importSymbol](#)\n\n\n | \n\n\n | \n\n(containerEl: Element \\| undefined, url: string \\| URL \\| undefined \\| null, symbol: string) => [ValueOrPromise](#valueorpromise)<any>\n\n\n | \n\nRetrieve a symbol value from QRL.\n\nQwik needs to lazy load data and closures. For this Qwik uses QRLs that are serializable references of resources that are needed. The QRLs contain all the information necessary to retrieve the reference using `importSymbol`.\n\nWhy not use `import()`? Because `import()` is relative to the current file, and the current file is always the Qwik framework. So QRLs have additional information that allows them to serialize imports relative to application base rather than the Qwik framework file.\n\n\n |
\n\n[isServer](#)\n\n\n | \n\n\n | \n\nboolean\n\n\n | \n\nTrue of running on the server platform.\n\n\n |
\n\n[nextTick](#)\n\n\n | \n\n\n | \n\n(fn: () => any) => Promise<any>\n\n\n | \n\nPerform operation on next tick.\n\n\n |
\n\n[raf](#)\n\n\n | \n\n\n | \n\n(fn: () => any) => Promise<any>\n\n\n | \n\nPerform operation on next request-animation-frame.\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[newState](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n'open' \\| 'closed'\n\n\n | \n\n\n |
\n\n[prevState](#)\n\n\n | \n\n`readonly`\n\n\n | \n\n'open' \\| 'closed'\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nqrl\n\n\n | \n\n[ComputedFn](#computedfn)<T>\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nqrl\n\n\n | \n\n[QRL](#qrl)<[ComputedFn](#computedfn)<T>>\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nqrl\n\n\n | \n\n() => T\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nname\n\n\n | \n\nstring\n\n\n | \n\nThe name of the context.\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[columnNumber](#)\n\n\n | \n\n\n | \n\nnumber\n\n\n | \n\n\n |
\n\n[fileName](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\n[lineNumber](#)\n\n\n | \n\n\n | \n\nnumber\n\n\n | \n\n\n |
\n\n[stack?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[class?](#)\n\n\n | \n\n\n | \n\n[ClassList](#classlist) \\| [Signal](#signal)<[ClassList](#classlist)> \\| undefined\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[children](#)\n\n\n | \n\n\n | \n\n[JSXChildren](#jsxchildren)\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[error](#)\n\n\n | \n\n\n | \n\nany \\| undefined\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nqrl\n\n\n | \n\nT\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nqrl\n\n\n | \n\n[QRL](#qrl)<T>\n\n\n | \n\n\n |
= {\n renderFn(props: P, key: string | null, flags: number, dev?: DevJSX): JSXOutput;\n}['renderFn'];\n```\n**References:** [DevJSX](#devjsx), [JSXOutput](#jsxoutput)", - "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/render/jsx/types/jsx-node.ts", - "mdFile": "qwik.functioncomponent.md" - }, - { - "name": "getPlatform", - "id": "getplatform", - "hierarchy": [ - { - "name": "getPlatform", - "id": "getplatform" - } - ], - "kind": "Function", - "content": "Retrieve the `CorePlatform`.\n\nThe `CorePlatform` is also responsible for retrieving the Manifest, that contains mappings from symbols to javascript import chunks. For this reason, `CorePlatform` can't be global, but is specific to the application currently running. On server it is possible that many different applications are running in a single server instance, and for this reason the `CorePlatform` is associated with the application document.\n\n\n```typescript\ngetPlatform: () => CorePlatform\n```\n**Returns:**\n\n[CorePlatform](#coreplatform)", - "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/platform/platform.ts", - "mdFile": "qwik.getplatform.md" - }, - { - "name": "h", - "id": "h", - "hierarchy": [ - { - "name": "h", - "id": "h" + "name": "CSSProperties", + "id": "cssproperties" } ], - "kind": "Function", - "content": "```typescript\nexport declare namespace h \n```\n\n\n
\n\nFunction\n\n\n | \n\nDescription\n\n\n |
---|---|
\n\n[h(type)](#)\n\n\n | \n\n\n |
\n\n[h(type, data)](#)\n\n\n | \n\n\n |
\n\n[h(type, text)](#)\n\n\n | \n\n\n |
\n\n[h(type, children)](#)\n\n\n | \n\n\n |
\n\n[h(type, data, text)](#)\n\n\n | \n\n\n |
\n\n[h(type, data, children)](#)\n\n\n | \n\n\n |
\n\n[h(sel, data, children)](#)\n\n\n | \n\n\n |
\n\nFunction\n\n\n | \n\nDescription\n\n\n |
---|---|
\n\n[h(type)](#)\n\n\n | \n\n\n |
\n\n[h(type, data)](#)\n\n\n | \n\n\n |
\n\n[h(type, text)](#)\n\n\n | \n\n\n |
\n\n[h(type, children)](#)\n\n\n | \n\n\n |
\n\n[h(type, data, text)](#)\n\n\n | \n\n\n |
\n\n[h(type, data, children)](#)\n\n\n | \n\n\n |
\n\n[h(sel, data, children)](#)\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[columnNumber](#)\n\n\n | \n\n\n | \n\nnumber\n\n\n | \n\n\n |
\n\n[fileName](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n\n |
\n\n[lineNumber](#)\n\n\n | \n\n\n | \n\nnumber\n\n\n | \n\n\n |
\n\n[stack?](#)\n\n\n | \n\n\n | \n\nstring\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[class?](#)\n\n\n | \n\n\n | \n\n[ClassList](#classlist) \\| [Signal](#signal)<[ClassList](#classlist)> \\| undefined\n\n\n | \n\n_(Optional)_\n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[children](#)\n\n\n | \n\n\n | \n\n[JSXChildren](#jsxchildren)\n\n\n | \n\n\n |
\n\nProperty\n\n\n | \n\nModifiers\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|---|
\n\n[error](#)\n\n\n | \n\n\n | \n\nany \\| undefined\n\n\n | \n\n\n |
\n\nParameter\n\n\n | \n\nType\n\n\n | \n\nDescription\n\n\n |
---|---|---|
\n\nqrl\n\n\n | \n\nT\n\n\n | \n\n\n |
= {\n renderFn(props: P, key: string | null, flags: number, dev?: DevJSX): JSXOutput;\n}['renderFn'];\n```\n**References:** [DevJSX](#devjsx), [JSXOutput](#jsxoutput)",
+ "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-node.ts",
+ "mdFile": "core.functioncomponent.md"
},
{
- "name": "IframeHTMLAttributes",
- "id": "iframehtmlattributes",
+ "name": "getDomContainer",
+ "id": "getdomcontainer",
"hierarchy": [
{
- "name": "IframeHTMLAttributes",
- "id": "iframehtmlattributes"
+ "name": "getDomContainer",
+ "id": "getdomcontainer"
}
],
- "kind": "Interface",
- "content": "```typescript\nexport interface IframeHTMLAttributes
\n**Returns:**\n\nIClientContainer",
+ "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/client/dom-container.ts",
+ "mdFile": "core.getdomcontainer.md"
},
{
- "name": "ImgHTMLAttributes",
- "id": "imghtmlattributes",
+ "name": "getLocale",
+ "id": "getlocale",
"hierarchy": [
{
- "name": "ImgHTMLAttributes",
- "id": "imghtmlattributes"
+ "name": "getLocale",
+ "id": "getlocale"
}
],
- "kind": "Interface",
- "content": "```typescript\nexport interface ImgHTMLAttributes \n\n\nParameter\n\n\n \n\nType\n\n\n \n\nDescription\n\n\n \n\n\nelement\n\n\n \n\nElement \\| VNode\n\n\n \n\n\n
\n**Returns:**\n\nstring\n\nThe locale.",
+ "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/use/use-locale.ts",
+ "mdFile": "core.getlocale.md"
},
{
- "name": "implicit$FirstArg",
- "id": "implicit_firstarg",
+ "name": "getPlatform",
+ "id": "getplatform",
"hierarchy": [
{
- "name": "implicit$FirstArg",
- "id": "implicit_firstarg"
+ "name": "getPlatform",
+ "id": "getplatform"
}
],
"kind": "Function",
- "content": "Create a `____$(...)` convenience method from `___(...)`.\n\nIt is very common for functions to take a lazy-loadable resource as a first argument. For this reason, the Qwik Optimizer automatically extracts the first argument from any function which ends in `$`.\n\nThis means that `foo$(arg0)` and `foo($(arg0))` are equivalent with respect to Qwik Optimizer. The former is just a shorthand for the latter.\n\nFor example, these function calls are equivalent:\n\n- `component$(() => {...})` is same as `component($(() => {...}))`\n\n```tsx\nexport function myApi(callback: QRL<() => void>): void {\n // ...\n}\n\nexport const myApi$ = implicit$FirstArg(myApi);\n// type of myApi$: (callback: () => void): void\n\n// can be used as:\nmyApi$(() => console.log('callback'));\n\n// will be transpiled to:\n// FILE: \n\n\nParameter\n\n\n \n\nType\n\n\n \n\nDescription\n\n\n \n\n\ndefaultLocale\n\n\n \n\nstring\n\n\n \n\n_(Optional)_\n\n\n
\n**Returns:**\n\n((qrl: FIRST, ...rest: REST) => RET)",
- "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/util/implicit_dollar.ts",
- "mdFile": "qwik.implicit_firstarg.md"
+ "content": "Retrieve the `CorePlatform`.\n\nThe `CorePlatform` is also responsible for retrieving the Manifest, that contains mappings from symbols to javascript import chunks. For this reason, `CorePlatform` can't be global, but is specific to the application currently running. On server it is possible that many different applications are running in a single server instance, and for this reason the `CorePlatform` is associated with the application document.\n\n\n```typescript\ngetPlatform: () => CorePlatform\n```\n**Returns:**\n\n[CorePlatform](#coreplatform)",
+ "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/platform/platform.ts",
+ "mdFile": "core.getplatform.md"
},
{
- "name": "InputHTMLAttributes",
- "id": "inputhtmlattributes",
+ "name": "h",
+ "id": "h",
"hierarchy": [
{
- "name": "InputHTMLAttributes",
- "id": "inputhtmlattributes"
+ "name": "h",
+ "id": "h"
}
],
- "kind": "TypeAlias",
- "content": "```typescript\nexport type InputHTMLAttributes \n\n\nParameter\n\n\n \n\nType\n\n\n \n\nDescription\n\n\n \n\n\nfn\n\n\n \n\n(qrl: [QRL](#qrl)<FIRST>, ...rest: REST) => RET\n\n\n \n\nA function that should have its first argument automatically `$`.\n\n\n
\n**Returns:**\n\n[JSXNode](#jsxnode)<TYPE>",
+ "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/jsx-runtime.ts",
+ "mdFile": "core.h.md"
},
{
- "name": "InsHTMLAttributes",
- "id": "inshtmlattributes",
+ "name": "implicit$FirstArg",
+ "id": "implicit_firstarg",
"hierarchy": [
{
- "name": "InsHTMLAttributes",
- "id": "inshtmlattributes"
+ "name": "implicit$FirstArg",
+ "id": "implicit_firstarg"
}
],
- "kind": "Interface",
- "content": "```typescript\nexport interface InsHTMLAttributes \n\n\nParameter\n\n\n \n\nType\n\n\n \n\nDescription\n\n\n \n\n\ntype\n\n\n \n\nTYPE\n\n\n \n\n\n \n\n\nprops\n\n\n \n\nPROPS \\| null\n\n\n \n\n_(Optional)_\n\n\n \n\n\nchildren\n\n\n \n\nany\\[\\]\n\n\n \n\n\n
\n**Returns:**\n\n((qrl: FIRST, ...rest: REST) => RET)",
+ "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/qrl/implicit_dollar.ts",
+ "mdFile": "core.implicit_firstarg.md"
},
{
"name": "IntrinsicAttributes",
@@ -1174,21 +514,24 @@
],
"kind": "Interface",
"content": "```typescript\ninterface IntrinsicAttributes extends QwikIntrinsicAttributes \n```\n**Extends:** QwikIntrinsicAttributes",
- "mdFile": "qwik.qwikjsx.intrinsicattributes.md"
+ "mdFile": "core.qwikjsx.intrinsicattributes.md"
},
{
"name": "IntrinsicElements",
- "id": "intrinsicelements",
+ "id": "qwikjsx-intrinsicelements",
"hierarchy": [
+ {
+ "name": "QwikJSX",
+ "id": "qwikjsx-intrinsicelements"
+ },
{
"name": "IntrinsicElements",
- "id": "intrinsicelements"
+ "id": "qwikjsx-intrinsicelements"
}
],
"kind": "Interface",
- "content": "```typescript\nexport interface IntrinsicElements extends IntrinsicHTMLElements, IntrinsicSVGElements \n```\n**Extends:** IntrinsicHTMLElements, IntrinsicSVGElements",
- "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/render/jsx/types/jsx-generated.ts",
- "mdFile": "qwik.intrinsicelements.md"
+ "content": "```typescript\ninterface IntrinsicElements extends LenientQwikElements \n```\n**Extends:** LenientQwikElements",
+ "mdFile": "core.qwikjsx.intrinsicelements.md"
},
{
"name": "isSignal",
@@ -1200,9 +543,9 @@
}
],
"kind": "Function",
- "content": "Checks if a given object is a `Signal`.\n\n\n```typescript\nisSignal: \n\n\nParameter\n\n\n \n\nType\n\n\n \n\nDescription\n\n\n \n\n\nfn\n\n\n \n\n(qrl: [QRL](#qrl)<FIRST>, ...rest: REST) => RET\n\n\n \n\nA function that should have its first argument automatically `$`.\n\n\n
\n**Returns:**\n\nobj is [Signal](#signal)<T>\n\nBoolean - True if the object is a `Signal`.",
- "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/state/signal.ts",
- "mdFile": "qwik.issignal.md"
+ "content": "```typescript\nisSignal: (value: any) => value is ISignal \n\n\nParameter\n\n\n \n\nType\n\n\n \n\nDescription\n\n\n \n\n\nobj\n\n\n \n\nany\n\n\n \n\nThe object to check if `Signal`.\n\n\n
\n**Returns:**\n\nvalue is [ISignal](#signal)<unknown>",
+ "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/signal/signal.ts",
+ "mdFile": "core.issignal.md"
},
{
"name": "jsx",
@@ -1214,9 +557,9 @@
}
],
"kind": "Function",
- "content": "Used by the JSX transpilers to create a JSXNode. Note that the optimizer will not use this, instead using \\_jsxQ, \\_jsxS, and \\_jsxC directly.\n\n\n```typescript\njsx: \n\n\nParameter\n\n\n \n\nType\n\n\n \n\nDescription\n\n\n \n\n\nvalue\n\n\n \n\nany\n\n\n \n\n\n
\n**Returns:**\n\n[JSXNode](#jsxnode)<T>",
- "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/render/jsx/jsx-runtime.ts",
- "mdFile": "qwik.jsx.md"
+ "content": "Used by the JSX transpilers to create a JSXNode. Note that the optimizer will not use this, instead using \\_jsxSplit and \\_jsxSorted directly.\n\n\n```typescript\njsx: \n\n\nParameter\n\n\n \n\nType\n\n\n \n\nDescription\n\n\n \n\n\ntype\n\n\n \n\nT\n\n\n \n\n\n \n\n\nprops\n\n\n \n\nT extends [FunctionComponent](#functioncomponent)<infer PROPS> ? PROPS : Record<any, unknown>\n\n\n \n\n\n \n\n\nkey\n\n\n \n\nstring \\| number \\| null\n\n\n \n\n_(Optional)_\n\n\n
\n**Returns:**\n\n[JSXNode](#jsxnode)<T>",
+ "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/jsx-runtime.ts",
+ "mdFile": "core.jsx.md"
},
{
"name": "JSXChildren",
@@ -1229,8 +572,8 @@
],
"kind": "TypeAlias",
"content": "```typescript\nexport type JSXChildren = string | number | boolean | null | undefined | Function | RegExp | JSXChildren[] | Promise \n\n\nParameter\n\n\n \n\nType\n\n\n \n\nDescription\n\n\n \n\n\ntype\n\n\n \n\nT\n\n\n \n\n\n \n\n\nprops\n\n\n \n\nT extends [FunctionComponent](#functioncomponent)<infer PROPS> ? PROPS : Props\n\n\n \n\n\n \n\n\nkey\n\n\n \n\nstring \\| number \\| null\n\n\n \n\n_(Optional)_\n\n\n