-
Notifications
You must be signed in to change notification settings - Fork 1
/
global.d.ts
30 lines (28 loc) · 925 Bytes
/
global.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
export {};
declare global {
namespace Eleventy {
interface Page {
readonly date: Date;
readonly inputPath: string;
readonly fileSlug: string;
readonly filePathStem: string;
readonly outputFileExtension: string;
readonly url: string;
readonly outputPath: string;
}
type TemplateContext<Mixin = {}> = {
readonly render: () => string;
readonly page: Page;
readonly slug: (this: TemplateContext<Mixin>) => string;
readonly slugify: (this: TemplateContext<Mixin>) => string;
readonly url: (this: TemplateContext<Mixin>) => string;
readonly log: (this: TemplateContext<Mixin>) => void;
readonly serverlessUrl: (this: TemplateContext<Mixin>) => string;
readonly getCollectionItem: (this: TemplateContext<Mixin>) => unknown;
readonly getPreviousCollectionItem: (
this: TemplateContext<Mixin>,
) => unknown;
readonly getNextCollectionItem: unknown;
} & Mixin;
}
}