Skip to content

crelte / / CrelteWithRoute

Type Alias: CrelteWithRoute ​

ts
type CrelteWithRoute = Crelte & object;

This is Crelte a container of useful features and functions.

In svelte contexts for each of these functions and classes there should be a getter function like getCrelte() or getRouter().

Note ​

Plugins and other instances could modify this type, so when extending cloning or similar use the spread operator instead of naming all "properties".

Type Declaration ​

entry ​

Get Signature ​

ts
get entry(): Readable<Entry>;
Returns ​

Readable<Entry>

route ​

Get Signature ​

ts
get route(): Readable<Route>;

The route

Returns ​

Readable<Route>

site ​

Get Signature ​

ts
get site(): Readable<Site>;
Returns ​

Readable<Site>

getGlobal() ​

ts
getGlobal<T>(name): Readable<T> | null;

returns a store which contains a globalSet

Note ​

This only works in loadData, in loadGlobalData this will always return null. In that context you should use CrelteRequest.getGlobalAsync

Type Parameters ​

T ​

T = any

Parameters ​

name ​

string

Returns ​

Readable<T> | null