@@ -6,18 +6,18 @@ export type ScullySystem = `scullySystem`;
66export type ErrorString = string ;
77export type ConfigValidator = ( RouteConfig ) => ErrorString [ ] | Promise < ErrorString [ ] > ;
88
9- export type RoutePlugin = {
10- ( route ? : string , config ?: any ) : Promise < HandledRoute [ ] > ;
9+ export interface RoutePlugin {
10+ ( route : string , config ?: any ) : Promise < HandledRoute [ ] > ;
1111 [ configValidator ] ?: ConfigValidator | undefined ;
1212} ;
1313export type PluginFunction = ( ...args : any [ ] ) => any ;
1414export type postProcessByDomPlugin = ( dom ?: JSDOM , route ?: HandledRoute ) => Promise < JSDOM > ;
1515export type postProcessByHtmlPlugin = ( html : string , route : HandledRoute ) => Promise < string > ;
16- export type RouteProcess = { ( routes ?: HandledRoute [ ] ) : Promise < HandledRoute [ ] > ; [ routeProcessPriority ] ?: number } ;
16+ export type RouteProcess = { ( routes ?: HandledRoute [ ] ) : Promise < HandledRoute [ ] > ; [ routeProcessPriority ] ?: number } ;
1717export type RouteDiscoveryPlugin = ( routes ?: HandledRoute [ ] ) => Promise < void > ;
1818export type AllDonePlugin = ( routes ?: HandledRoute [ ] ) => Promise < void > ;
19- export type BeforeAllPlugin = { ( ) : Promise < void | undefined | boolean > ; [ priority ] ?: number } ;
20- export type FilePlugin = { ( html : string , route ?: HandledRoute ) : Promise < string > ; [ AlternateExtensionsForFilePlugin ] ?: string [ ] } ;
19+ export type BeforeAllPlugin = { ( ) : Promise < void | undefined | boolean > ; [ priority ] ?: number } ;
20+ export type FilePlugin = { ( html : string , route ?: HandledRoute ) : Promise < string > ; [ AlternateExtensionsForFilePlugin ] ?: string [ ] } ;
2121export type ScullySystemPlugin = PluginFunction ;
2222export type EnterprisePlugin = PluginFunction ;
2323
0 commit comments