Skip to content

Commit

Permalink
Update AppOptions to include script* attributes referenced by AppForS…
Browse files Browse the repository at this point in the history
…erver
  • Loading branch information
craigbeck committed Oct 24, 2024
1 parent bcdbeac commit 3f6b714
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ export function createAppPage(derby): typeof Page {

export interface AppOptions {
appMetadata?: Record<string, string>,
scriptHash?: string,
scriptBaseUrl?: string,
scriptCrossOrigin?: boolean,
scriptHash?: string;
scriptMapBaseUrl?: string,
[key: string]: unknown,
}

type OnRouteCallback = (this: Page, page: Page, model: Model, params: PageParams, done?: () => void) => void;
Expand Down
4 changes: 2 additions & 2 deletions src/AppForServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import * as racer from 'racer';

import { App } from './App';
import { App, AppOptions } from './App';
import { type Derby } from './Derby';
import { type StyleCompilerOptions } from './files';
import { PageForServer } from './PageForServer';
Expand Down Expand Up @@ -79,7 +79,7 @@ export class AppForServer extends App {
watchFiles: boolean;
router: any;

constructor(derby: Derby, name: string, filename: string, options) {
constructor(derby: Derby, name: string, filename: string, options?: AppOptions) {
super(derby, name, filename, options);
this._init(options);
}
Expand Down

0 comments on commit 3f6b714

Please sign in to comment.