Skip to content

Commit fcd3cf9

Browse files
In aspnet-prerendering, simply type imports/exports by changing PrerenderingInterfaces to a regular module (not a .d.ts file)
1 parent 48bca77 commit fcd3cf9

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
/// <reference path="./PrerenderingInterfaces.d.ts" />
21
import * as url from 'url';
32
import * as path from 'path';
43
import * as domain from 'domain';
54
import { run as domainTaskRun, baseUrl as domainTaskBaseUrl } from 'domain-task/main';
5+
import { BootFunc, BootFuncParams, BootModuleInfo, RenderToStringCallback, RenderToStringFunc } from './PrerenderingInterfaces';
66

77
const defaultTimeoutMilliseconds = 30 * 1000;
88

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
interface RenderToStringFunc {
1+
export interface RenderToStringFunc {
22
(callback: RenderToStringCallback, applicationBasePath: string, bootModule: BootModuleInfo, absoluteRequestUrl: string, requestPathAndQuery: string, customDataParameter: any, overrideTimeoutMilliseconds: number, requestPathBase: string): void;
33
}
44

5-
interface RenderToStringCallback {
5+
export interface RenderToStringCallback {
66
(error: any, result?: RenderToStringResult): void;
77
}
88

9-
interface RenderToStringResult {
9+
export interface RenderToStringResult {
1010
html: string;
1111
statusCode?: number;
1212
globals?: { [key: string]: any };
1313
}
1414

15-
interface RedirectResult {
15+
export interface RedirectResult {
1616
redirectUrl: string;
1717
}
1818

19-
interface BootFunc {
19+
export interface BootFunc {
2020
(params: BootFuncParams): Promise<RenderToStringResult>;
2121
}
2222

23-
interface BootFuncParams {
23+
export interface BootFuncParams {
2424
location: any; // e.g., Location object containing information '/some/path'
2525
origin: string; // e.g., 'https://example.com:1234'
2626
url: string; // e.g., '/some/path'
@@ -30,7 +30,7 @@ interface BootFuncParams {
3030
data: any; // any custom object passed through from .NET
3131
}
3232

33-
interface BootModuleInfo {
33+
export interface BootModuleInfo {
3434
moduleName: string;
3535
exportName?: string;
3636
webpackConfig?: string;
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
/// <reference path="./PrerenderingInterfaces.d.ts" />
2-
1+
import { RenderToStringResult, RedirectResult } from './PrerenderingInterfaces';
32
export * from './Prerendering';
43

54
export type RenderResult = RenderToStringResult | RedirectResult;

0 commit comments

Comments
 (0)