create-app
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -41,3 +41,3 @@ import { | ||
interface Render { | ||
(targetPath: string | ILWithBQ | ILWithQuery): any | ||
(targetPath: string | ILWithBQ | ILWithQuery): unknown | ||
} | ||
@@ -60,6 +60,2 @@ | ||
interface Publish { | ||
(location: ILWithBQ | ILWithQuery): void | ||
} | ||
interface Subscribe { | ||
@@ -86,3 +82,3 @@ (listener: Listener): () => void | ||
c: ControllerConstructor | Promise<ControllerConstructor> | ||
): any | ||
): unknown | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function render(element, controller, container) { | ||
function render(element, _, container) { | ||
if (container) { | ||
@@ -5,0 +5,0 @@ container.innerHTML = element; |
@@ -39,4 +39,20 @@ import { History, LocationTypeMap } from 'create-history' | ||
( | ||
requestPath: string | ||
): InitControllerReturn | Promise<InitControllerReturn> | ||
( | ||
requestPath: string, | ||
injectContext?: Context | null, | ||
injectContext: Context | null | ||
): InitControllerReturn | Promise<InitControllerReturn> | ||
( | ||
requestPath: string, | ||
callback: Callback | ||
): InitControllerReturn | Promise<InitControllerReturn> | ||
( | ||
requestPath: string, | ||
injectContext: Context | null, | ||
callback: Callback | ||
): InitControllerReturn | Promise<InitControllerReturn> | ||
( | ||
requestPath: string, | ||
injectContext?: Context | null | Callback, | ||
callback?: Callback | ||
@@ -47,4 +63,4 @@ ): InitControllerReturn | Promise<InitControllerReturn> | ||
interface InitControllerReturn { | ||
content?: any | ||
content?: unknown | ||
controller: Controller | ||
} |
@@ -8,6 +8,6 @@ /** | ||
toString(): string; | ||
[propName: string]: any; | ||
[propName: number]: any; | ||
[propName: string]: unknown; | ||
[propName: number]: unknown; | ||
} | ||
declare const viewEngine: ViewEngine<string | ToString, ServerController>; | ||
export default viewEngine; |
@@ -11,3 +11,5 @@ /* | ||
LocationTypeMap, | ||
HistoryWithBFOL | ||
HistoryWithBFOL, | ||
BLWithQuery, | ||
ILWithQuery | ||
} from 'create-history' | ||
@@ -22,3 +24,3 @@ import pathToRegexp from 'path-to-regexp' | ||
path: pathToRegexp.Path | ||
controller: ControllerConstructor | LoadController | string | ||
controller: unknown | ||
} | ||
@@ -30,7 +32,7 @@ | ||
path: pathToRegexp.Path | ||
controller: ControllerConstructor | LoadController | string | ||
controller: unknown | ||
} | ||
export interface Params { | ||
[propName: string]: any | ||
[propName: string]: unknown | ||
} | ||
@@ -41,3 +43,3 @@ | ||
params: Params | ||
controller: ControllerConstructor | LoadController | string | ||
controller: unknown | ||
} | ||
@@ -69,3 +71,3 @@ | ||
routes?: Route[] | ||
viewEngine?: ViewEngine<any, Controller> | ||
viewEngine?: ViewEngine<unknown, Controller> | ||
} | ||
@@ -82,3 +84,3 @@ | ||
location?: HistoryBaseLocation | ||
[propName: string]: any | ||
[propName: string]: unknown | ||
} | ||
@@ -100,3 +102,15 @@ | ||
<C extends Controller>( | ||
controller: ControllerConstructor | LoadController | string, | ||
controller: any | ||
): ControllerConstructor | Promise<ControllerConstructor> | ||
<C extends Controller>( | ||
controller: any, | ||
location: HistoryLocation | ||
): ControllerConstructor | Promise<ControllerConstructor> | ||
<C extends Controller>( | ||
controller: any, | ||
location: HistoryLocation, | ||
context: Context | ||
): ControllerConstructor | Promise<ControllerConstructor> | ||
<C extends Controller>( | ||
controller: any, | ||
location?: HistoryLocation, | ||
@@ -117,9 +131,14 @@ context?: Context | ||
count?: number | ||
restore?(location?: HistoryLocation, context?: Context): any | ||
init(): any | ||
render(): any | ||
location?: HistoryLocation | ||
context?: Context | ||
history?: History<BLWithBQ, ILWithBQ> | History<BLWithQuery, ILWithQuery> | ||
matcher?: Matcher | ||
loader?: Loader | ||
routes?: Route[] | ||
restore?(location?: HistoryLocation, context?: Context): unknown | ||
init(): unknown | ||
render(): unknown | ||
destroy?(): void | ||
getContainer?(): HTMLElement | null | ||
refreshView?(): void | ||
[x: string]: any | ||
} | ||
@@ -163,6 +182,13 @@ | ||
( | ||
element: E | ||
): unknown | ||
( | ||
element: E, | ||
controller?: C, | ||
container?: Element | null | ||
): any | ||
controller: C | ||
): unknown | ||
( | ||
element: E, | ||
controller: C, | ||
container: Element | null | ||
): unknown | ||
} |
{ | ||
"name": "create-app", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "configuring once, rendering both client and server.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
40651
1053
0