@ms-cloudpack/common-types 0.19.3 → 0.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/RenderFunction.d.ts +50 -2
- package/lib/RenderFunction.d.ts.map +1 -1
- package/lib/RenderFunction.js.map +1 -1
- package/lib/index.d.ts +1 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/lib/RenderFunctionOptions.d.ts +0 -23
- package/lib/RenderFunctionOptions.d.ts.map +0 -1
- package/lib/RenderFunctionOptions.js +0 -2
- package/lib/RenderFunctionOptions.js.map +0 -1
- package/lib/RenderFunctionResult.d.ts +0 -22
- package/lib/RenderFunctionResult.d.ts.map +0 -1
- package/lib/RenderFunctionResult.js +0 -2
- package/lib/RenderFunctionResult.js.map +0 -1
- package/lib/RenderFunctionScript.d.ts +0 -8
- package/lib/RenderFunctionScript.d.ts.map +0 -1
- package/lib/RenderFunctionScript.js +0 -2
- package/lib/RenderFunctionScript.js.map +0 -1
package/lib/RenderFunction.d.ts
CHANGED
|
@@ -1,7 +1,55 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Request, Response } from 'express';
|
|
2
|
+
import type { ImportMap } from './ImportMap.js';
|
|
3
|
+
import type { PackageJson } from './PackageJson.js';
|
|
4
|
+
import type { RenderedRoute } from './Route.js';
|
|
5
|
+
import type { Session } from './Session.js';
|
|
3
6
|
/**
|
|
4
7
|
* A custom server render function that can be used to override the default HTML response.
|
|
5
8
|
*/
|
|
6
9
|
export type RenderFunction = (options: RenderFunctionOptions) => Promise<RenderFunctionResult> | RenderFunctionResult;
|
|
10
|
+
/**
|
|
11
|
+
* The input options for a `renderScript` custom server render function.
|
|
12
|
+
*/
|
|
13
|
+
export interface RenderFunctionOptions {
|
|
14
|
+
session: Session;
|
|
15
|
+
route: RenderedRoute;
|
|
16
|
+
baseUrl: string;
|
|
17
|
+
definition: PackageJson;
|
|
18
|
+
importMap: ImportMap;
|
|
19
|
+
overlayScript?: string;
|
|
20
|
+
entryScripts?: string[];
|
|
21
|
+
inlineScripts?: string[];
|
|
22
|
+
req: Request;
|
|
23
|
+
res: Response;
|
|
24
|
+
/** @deprecated use entryScripts. */
|
|
25
|
+
entryScript?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The complete expected result of the `renderScript` custom server render function.
|
|
29
|
+
*/
|
|
30
|
+
export interface ExpandedRenderFunctionResult {
|
|
31
|
+
/** Response body */
|
|
32
|
+
content: string;
|
|
33
|
+
/** Standard HTTP status code - https://developer.mozilla.org/en-US/docs/Web/HTTP/Status */
|
|
34
|
+
statusCode: number;
|
|
35
|
+
/** MIME type for the response - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types */
|
|
36
|
+
contentType: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The expected result of the `renderScript` custom server render function.
|
|
40
|
+
*
|
|
41
|
+
* - If a string, it's assumed to be the HTML content.
|
|
42
|
+
* - If an object and the `content` is non-HTML, `contentType` must be set.
|
|
43
|
+
* - If null, this means the function fully handled the request (sent a response using
|
|
44
|
+
* `options.res.send('...')` or other methods).
|
|
45
|
+
*/
|
|
46
|
+
export type RenderFunctionResult = string | null | ({
|
|
47
|
+
content: string;
|
|
48
|
+
} & Partial<ExpandedRenderFunctionResult>);
|
|
49
|
+
/**
|
|
50
|
+
* The expected shape of the `renderScript` custom server render function JS file.
|
|
51
|
+
*/
|
|
52
|
+
export type RenderFunctionScript = {
|
|
53
|
+
default: RenderFunction;
|
|
54
|
+
};
|
|
7
55
|
//# sourceMappingURL=RenderFunction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderFunction.d.ts","sourceRoot":"","sources":["../src/RenderFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"RenderFunction.d.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jH;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAAE,OAAO,EAAE,cAAc,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderFunction.js","sourceRoot":"","sources":["../src/RenderFunction.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"RenderFunction.js","sourceRoot":"","sources":["../src/RenderFunction.ts"],"names":[],"mappings":"","sourcesContent":["import type { Request, Response } from 'express';\nimport type { ImportMap } from './ImportMap.js';\nimport type { PackageJson } from './PackageJson.js';\nimport type { RenderedRoute } from './Route.js';\nimport type { Session } from './Session.js';\n\n/**\n * A custom server render function that can be used to override the default HTML response.\n */\nexport type RenderFunction = (options: RenderFunctionOptions) => Promise<RenderFunctionResult> | RenderFunctionResult;\n\n/**\n * The input options for a `renderScript` custom server render function.\n */\nexport interface RenderFunctionOptions {\n session: Session;\n route: RenderedRoute;\n baseUrl: string;\n definition: PackageJson;\n importMap: ImportMap;\n overlayScript?: string;\n entryScripts?: string[];\n inlineScripts?: string[];\n req: Request;\n res: Response;\n\n /** @deprecated use entryScripts. */\n entryScript?: string;\n}\n\n/**\n * The complete expected result of the `renderScript` custom server render function.\n */\nexport interface ExpandedRenderFunctionResult {\n /** Response body */\n content: string;\n /** Standard HTTP status code - https://developer.mozilla.org/en-US/docs/Web/HTTP/Status */\n statusCode: number;\n /** MIME type for the response - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types */\n contentType: string;\n}\n\n/**\n * The expected result of the `renderScript` custom server render function.\n *\n * - If a string, it's assumed to be the HTML content.\n * - If an object and the `content` is non-HTML, `contentType` must be set.\n * - If null, this means the function fully handled the request (sent a response using\n * `options.res.send('...')` or other methods).\n */\nexport type RenderFunctionResult = string | null | ({ content: string } & Partial<ExpandedRenderFunctionResult>);\n\n/**\n * The expected shape of the `renderScript` custom server render function JS file.\n */\nexport type RenderFunctionScript = { default: RenderFunction };\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -25,10 +25,7 @@ export { isBootstrapRoute, isRenderedRoute, isStaticRoute, isRedirectRoute, isSh
|
|
|
25
25
|
export type { TelemetryConfig } from './TelemetryConfig.js';
|
|
26
26
|
export type { AppConfig } from './AppConfig.js';
|
|
27
27
|
export type { InternalBundlerCapabilityImplementations, InternalBundlerCapabilitiesMetaData, BundlerCapabilitiesOptions, ExternalBundlerCapabilityModule, BundlerCapabilityFunction, } from './BundlerCapability.js';
|
|
28
|
-
export type { RenderFunction } from './RenderFunction.js';
|
|
29
|
-
export type { RenderFunctionOptions } from './RenderFunctionOptions.js';
|
|
30
|
-
export type { RenderFunctionResult, ExpandedRenderFunctionResult } from './RenderFunctionResult.js';
|
|
31
|
-
export type { RenderFunctionScript } from './RenderFunctionScript.js';
|
|
28
|
+
export type { RenderFunction, RenderFunctionOptions, RenderFunctionResult, ExpandedRenderFunctionResult, RenderFunctionScript, } from './RenderFunction.js';
|
|
32
29
|
export type { Request, Response } from 'express';
|
|
33
30
|
export type { Session } from './Session.js';
|
|
34
31
|
export type { ResolveMap } from './ResolveMap.js';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,iCAAiC,EACjC,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,eAAe,EACf,WAAW,EACX,uBAAuB,EACvB,0BAA0B,EAC1B,kBAAkB,EAClB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAA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AAE,MAAM,sBAAsB,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAgD/C,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,eAAe,EACf,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,YAAY,CAAC","sourcesContent":["export { allFeatures } from './allFeatures.js';\nexport type {\n GetPackageDefinitionOptions,\n PackageDefinitionTransform,\n PackageDefinitionTransformFactory,\n PackageDefinitionsCache,\n PackageImporterContext,\n} from './PackageDefinitionsCache.js';\nexport type {\n LiteralOrString,\n PackageJson,\n PackageJsonDependencies,\n PackageJsonExportCondition,\n PackageJsonExports,\n PackageJsonExportsObject,\n PackageJsonExportsValue,\n PackageJsonImports,\n} from './PackageJson.js';\nexport type { BundleContext } from './BundleContext.js';\nexport type { BundleMessage } from './BundleMessage.js';\nexport type { BundleMessageLocation } from './BundleMessageLocation.js';\nexport type { BundleMessageNote } from './BundleMessageNote.js';\nexport type { BundleMode } from './BundleMode.js';\nexport type { BundleOptions } from './BundleOptions.js';\nexport type { BundleOutputFile } from './BundleOutputFile.js';\nexport type { BundleResult } from './BundleResult.js';\nexport type { BundlerPluginResult } from './BundlerPluginResult.js';\nexport type { BundlerPlugin } from './BundlerPlugin.js';\nexport type { CloudpackConfig } from './CloudpackConfig.js';\nexport type { DevServer } from './DevServer.js';\nexport type { ExpandedSourcePath } from './ExpandedSourcePath.js';\nexport type { Feature } from './Feature.js';\nexport type { Features } from './Features.js';\nexport type { GeneratedConfig } from './GeneratedConfig.js';\nexport type { HttpsConfig } from './HttpsConfig.js';\nexport type { ModuleType } from './ModuleType.js';\nexport type { PackageSettings, PackageSettingsMatch, GeneratedPackageSettings } from './PackageSettings.js';\nexport type {\n BootstrapRoute,\n RedirectRoute,\n RenderedRoute,\n Route,\n SharedRouteOptions,\n ShorthandRenderedRoute,\n ShorthandBootstrapRoute,\n ShorthandRoute,\n StaticRoute,\n} from './Route.js';\nexport {\n isBootstrapRoute,\n isRenderedRoute,\n isStaticRoute,\n isRedirectRoute,\n isShorthandBootstrapRoute,\n isShorthandRenderedRoute,\n} from './Route.js';\nexport type { TelemetryConfig } from './TelemetryConfig.js';\nexport type { AppConfig } from './AppConfig.js';\nexport type {\n InternalBundlerCapabilityImplementations,\n InternalBundlerCapabilitiesMetaData,\n BundlerCapabilitiesOptions,\n ExternalBundlerCapabilityModule,\n BundlerCapabilityFunction,\n} from './BundlerCapability.js';\nexport type {
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAgD/C,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,eAAe,EACf,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,YAAY,CAAC","sourcesContent":["export { allFeatures } from './allFeatures.js';\nexport type {\n GetPackageDefinitionOptions,\n PackageDefinitionTransform,\n PackageDefinitionTransformFactory,\n PackageDefinitionsCache,\n PackageImporterContext,\n} from './PackageDefinitionsCache.js';\nexport type {\n LiteralOrString,\n PackageJson,\n PackageJsonDependencies,\n PackageJsonExportCondition,\n PackageJsonExports,\n PackageJsonExportsObject,\n PackageJsonExportsValue,\n PackageJsonImports,\n} from './PackageJson.js';\nexport type { BundleContext } from './BundleContext.js';\nexport type { BundleMessage } from './BundleMessage.js';\nexport type { BundleMessageLocation } from './BundleMessageLocation.js';\nexport type { BundleMessageNote } from './BundleMessageNote.js';\nexport type { BundleMode } from './BundleMode.js';\nexport type { BundleOptions } from './BundleOptions.js';\nexport type { BundleOutputFile } from './BundleOutputFile.js';\nexport type { BundleResult } from './BundleResult.js';\nexport type { BundlerPluginResult } from './BundlerPluginResult.js';\nexport type { BundlerPlugin } from './BundlerPlugin.js';\nexport type { CloudpackConfig } from './CloudpackConfig.js';\nexport type { DevServer } from './DevServer.js';\nexport type { ExpandedSourcePath } from './ExpandedSourcePath.js';\nexport type { Feature } from './Feature.js';\nexport type { Features } from './Features.js';\nexport type { GeneratedConfig } from './GeneratedConfig.js';\nexport type { HttpsConfig } from './HttpsConfig.js';\nexport type { ModuleType } from './ModuleType.js';\nexport type { PackageSettings, PackageSettingsMatch, GeneratedPackageSettings } from './PackageSettings.js';\nexport type {\n BootstrapRoute,\n RedirectRoute,\n RenderedRoute,\n Route,\n SharedRouteOptions,\n ShorthandRenderedRoute,\n ShorthandBootstrapRoute,\n ShorthandRoute,\n StaticRoute,\n} from './Route.js';\nexport {\n isBootstrapRoute,\n isRenderedRoute,\n isStaticRoute,\n isRedirectRoute,\n isShorthandBootstrapRoute,\n isShorthandRenderedRoute,\n} from './Route.js';\nexport type { TelemetryConfig } from './TelemetryConfig.js';\nexport type { AppConfig } from './AppConfig.js';\nexport type {\n InternalBundlerCapabilityImplementations,\n InternalBundlerCapabilitiesMetaData,\n BundlerCapabilitiesOptions,\n ExternalBundlerCapabilityModule,\n BundlerCapabilityFunction,\n} from './BundlerCapability.js';\nexport type {\n RenderFunction,\n RenderFunctionOptions,\n RenderFunctionResult,\n ExpandedRenderFunctionResult,\n RenderFunctionScript,\n} from './RenderFunction.js';\nexport type { Request, Response } from 'express';\nexport type { Session } from './Session.js';\nexport type { ResolveMap } from './ResolveMap.js';\nexport type { ResolveMapEntry } from './ResolveMapEntry.js';\nexport type { LinkedPath } from './LinkedPath.js';\nexport type { ImportMap } from './ImportMap.js';\nexport type { UserPreferences } from './UserPreferences.js';\n"]}
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Request, Response } from 'express';
|
|
2
|
-
import type { ImportMap } from './ImportMap.js';
|
|
3
|
-
import type { PackageJson } from './PackageJson.js';
|
|
4
|
-
import type { RenderedRoute } from './Route.js';
|
|
5
|
-
import type { Session } from './Session.js';
|
|
6
|
-
/**
|
|
7
|
-
* The input options for a `renderScript` custom server render function.
|
|
8
|
-
*/
|
|
9
|
-
export interface RenderFunctionOptions {
|
|
10
|
-
session: Session;
|
|
11
|
-
route: RenderedRoute;
|
|
12
|
-
baseUrl: string;
|
|
13
|
-
definition: PackageJson;
|
|
14
|
-
importMap: ImportMap;
|
|
15
|
-
overlayScript?: string;
|
|
16
|
-
entryScripts?: string[];
|
|
17
|
-
inlineScripts?: string[];
|
|
18
|
-
req: Request;
|
|
19
|
-
res: Response;
|
|
20
|
-
/** @deprecated - use entryScripts. */
|
|
21
|
-
entryScript?: string;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=RenderFunctionOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderFunctionOptions.d.ts","sourceRoot":"","sources":["../src/RenderFunctionOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,EAAE,QAAQ,CAAC;IAEd,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderFunctionOptions.js","sourceRoot":"","sources":["../src/RenderFunctionOptions.ts"],"names":[],"mappings":"","sourcesContent":["import type { Request, Response } from 'express';\nimport type { ImportMap } from './ImportMap.js';\nimport type { PackageJson } from './PackageJson.js';\nimport type { RenderedRoute } from './Route.js';\nimport type { Session } from './Session.js';\n\n/**\n * The input options for a `renderScript` custom server render function.\n */\nexport interface RenderFunctionOptions {\n session: Session;\n route: RenderedRoute;\n baseUrl: string;\n definition: PackageJson;\n importMap: ImportMap;\n overlayScript?: string;\n entryScripts?: string[];\n inlineScripts?: string[];\n req: Request;\n res: Response;\n\n /** @deprecated - use entryScripts. */\n entryScript?: string;\n}\n"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The complete expected result of the `renderScript` custom server render function.
|
|
3
|
-
*/
|
|
4
|
-
export interface ExpandedRenderFunctionResult {
|
|
5
|
-
/** Response body */
|
|
6
|
-
content: string;
|
|
7
|
-
/** Standard HTTP status code - https://developer.mozilla.org/en-US/docs/Web/HTTP/Status */
|
|
8
|
-
statusCode: number;
|
|
9
|
-
/** MIME type for the response - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types */
|
|
10
|
-
contentType: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The expected result of the `renderScript` custom server render function.
|
|
14
|
-
*
|
|
15
|
-
* If the result is a string, it's assumed to be the HTML content.
|
|
16
|
-
*
|
|
17
|
-
* If an object and the `content` is non-HTML, `contentType` must be set.
|
|
18
|
-
*/
|
|
19
|
-
export type RenderFunctionResult = string | ({
|
|
20
|
-
content: string;
|
|
21
|
-
} & Partial<ExpandedRenderFunctionResult>);
|
|
22
|
-
//# sourceMappingURL=RenderFunctionResult.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderFunctionResult.d.ts","sourceRoot":"","sources":["../src/RenderFunctionResult.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,oBAAoB;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,2FAA2F;IAC3F,UAAU,EAAE,MAAM,CAAC;IACnB,4HAA4H;IAC5H,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderFunctionResult.js","sourceRoot":"","sources":["../src/RenderFunctionResult.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * The complete expected result of the `renderScript` custom server render function.\n */\nexport interface ExpandedRenderFunctionResult {\n /** Response body */\n content: string;\n /** Standard HTTP status code - https://developer.mozilla.org/en-US/docs/Web/HTTP/Status */\n statusCode: number;\n /** MIME type for the response - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types */\n contentType: string;\n}\n\n/**\n * The expected result of the `renderScript` custom server render function.\n *\n * If the result is a string, it's assumed to be the HTML content.\n *\n * If an object and the `content` is non-HTML, `contentType` must be set.\n */\nexport type RenderFunctionResult = string | ({ content: string } & Partial<ExpandedRenderFunctionResult>);\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { RenderFunction } from './RenderFunction.js';
|
|
2
|
-
/**
|
|
3
|
-
* The expected shape of the `renderScript` custom server render function script.
|
|
4
|
-
*/
|
|
5
|
-
export type RenderFunctionScript = {
|
|
6
|
-
default: RenderFunction;
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=RenderFunctionScript.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderFunctionScript.d.ts","sourceRoot":"","sources":["../src/RenderFunctionScript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAAE,OAAO,EAAE,cAAc,CAAA;CAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderFunctionScript.js","sourceRoot":"","sources":["../src/RenderFunctionScript.ts"],"names":[],"mappings":"","sourcesContent":["import type { RenderFunction } from './RenderFunction.js';\n\n/**\n * The expected shape of the `renderScript` custom server render function script.\n */\nexport type RenderFunctionScript = { default: RenderFunction };\n"]}
|