-
Notifications
You must be signed in to change notification settings - Fork 1
/
globals.d.ts
70 lines (62 loc) · 1.73 KB
/
globals.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
interface NormalizedCacheObject {
[key: string]: unknown
}
type RequestIdleCallbackFunctionType = (
callbackNative: (deadline: {
readonly didTimeout: boolean
timeRemaining: () => number
}) => void,
opts?: { timeout: number }
) => any
/** @lint typescript var usage, not `var` as a variable */
/* eslint-disable no-var */
declare var dataLayer: any[]
declare global {
interface Window {
readonly gtag: any
readonly requestIdleCallback?: RequestIdleCallbackFunctionType
readonly cancelIdleCallback?: (handle: any) => void
readonly __LAST_PUBLISH_TIMESTAMP__: number
readonly __APOLLO_STATE__: NormalizedCacheObject
readonly dataLayer: any[]
}
}
interface Window {
readonly gtag: any
readonly requestIdleCallback?: RequestIdleCallbackFunctionType
readonly cancelIdleCallback?: (handle: any) => void
readonly __LAST_PUBLISH_TIMESTAMP__: number
readonly __APOLLO_STATE__: { [key: string]: unknown }
readonly dataLayer: any[]
}
declare namespace NodeJS {
interface Global {
process: Process
}
interface ProcessEnv {
NODE_ENV: 'test' | 'development' | 'production'
READONLY: 'true' | 'false' | undefined
IS_NOW: 'true' | 'false' | undefined
CONTENTFUL_SPACE_ID: string
CONTENTFUL_TOKEN: string
GOOGLE_TAG_MANAGER_WEB_ID: string
GOOGLE_TAG_MANAGER_AMP_ID: string
GRAPHQL_API_URL: string
/** @idea probably will remove this */
WEBSITE_ORIGIN?: string
}
interface Process {
browser: boolean
env: ProcessEnv
}
}
declare namespace JSX {
interface IntrinsicElements {
'i-amphtml-sizer-intrinsic': any
'amp-img': any
'amp-google-document-embed': any
'amp-analytics': any
'amp-install-serviceworker': any
'amp-accordion': any
}
}