mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
In aspnet-prerendering, simply type imports/exports by changing PrerenderingInterfaces to a regular module (not a .d.ts file)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/// <reference path="./PrerenderingInterfaces.d.ts" />
|
||||
import * as url from 'url';
|
||||
import * as path from 'path';
|
||||
import * as domain from 'domain';
|
||||
import { run as domainTaskRun, baseUrl as domainTaskBaseUrl } from 'domain-task/main';
|
||||
import { BootFunc, BootFuncParams, BootModuleInfo, RenderToStringCallback, RenderToStringFunc } from './PrerenderingInterfaces';
|
||||
|
||||
const defaultTimeoutMilliseconds = 30 * 1000;
|
||||
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
interface RenderToStringFunc {
|
||||
export interface RenderToStringFunc {
|
||||
(callback: RenderToStringCallback, applicationBasePath: string, bootModule: BootModuleInfo, absoluteRequestUrl: string, requestPathAndQuery: string, customDataParameter: any, overrideTimeoutMilliseconds: number, requestPathBase: string): void;
|
||||
}
|
||||
|
||||
interface RenderToStringCallback {
|
||||
export interface RenderToStringCallback {
|
||||
(error: any, result?: RenderToStringResult): void;
|
||||
}
|
||||
|
||||
interface RenderToStringResult {
|
||||
export interface RenderToStringResult {
|
||||
html: string;
|
||||
statusCode?: number;
|
||||
globals?: { [key: string]: any };
|
||||
}
|
||||
|
||||
interface RedirectResult {
|
||||
export interface RedirectResult {
|
||||
redirectUrl: string;
|
||||
}
|
||||
|
||||
interface BootFunc {
|
||||
export interface BootFunc {
|
||||
(params: BootFuncParams): Promise<RenderToStringResult>;
|
||||
}
|
||||
|
||||
interface BootFuncParams {
|
||||
export interface BootFuncParams {
|
||||
location: any; // e.g., Location object containing information '/some/path'
|
||||
origin: string; // e.g., 'https://example.com:1234'
|
||||
url: string; // e.g., '/some/path'
|
||||
@@ -30,7 +30,7 @@ interface BootFuncParams {
|
||||
data: any; // any custom object passed through from .NET
|
||||
}
|
||||
|
||||
interface BootModuleInfo {
|
||||
export interface BootModuleInfo {
|
||||
moduleName: string;
|
||||
exportName?: string;
|
||||
webpackConfig?: string;
|
||||
@@ -1,5 +1,4 @@
|
||||
/// <reference path="./PrerenderingInterfaces.d.ts" />
|
||||
|
||||
import { RenderToStringResult, RedirectResult } from './PrerenderingInterfaces';
|
||||
export * from './Prerendering';
|
||||
|
||||
export type RenderResult = RenderToStringResult | RedirectResult;
|
||||
|
||||
Reference in New Issue
Block a user