-
Notifications
You must be signed in to change notification settings - Fork 28
/
remix.env.d.ts
76 lines (67 loc) · 2.11 KB
/
remix.env.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
71
72
73
74
75
76
/// <reference types="@remix-run/dev" />
/// <reference types="@shopify/remix-oxygen" />
/// <reference types="@shopify/oxygen-workers-types" />
// Enhance TypeScript's built-in typings.
import type {
HydrogenCart,
Storefront,
HydrogenSessionData,
CustomerAccount,
} from '@shopify/hydrogen';
import type {AriaAttributes, DOMAttributes} from 'react';
import '@total-typescript/ts-reset';
import type {HydrogenSession} from '~/lib/hydrogen.session.server';
import type {SanitySession} from '~/lib/sanity/sanity.session.server';
import type {I18nLocale} from '~/lib/type';
import type {Sanity} from './app/lib/sanity/sanity.server';
declare global {
/**
* A global `process` object is only available during build to access NODE_ENV.
*/
const process: {env: {NODE_ENV: 'development' | 'production'}};
/**
* Declare expected Env parameter in fetch handler.
*/
interface Env {
NODE_ENV: 'development' | 'production';
PRIVATE_STOREFRONT_API_TOKEN: string;
PUBLIC_STORE_DOMAIN: string;
PUBLIC_STOREFRONT_API_TOKEN: string;
PUBLIC_STOREFRONT_API_VERSION: string;
PUBLIC_STOREFRONT_ID: string;
PUBLIC_CUSTOMER_ACCOUNT_API_CLIENT_ID: string;
PUBLIC_CUSTOMER_ACCOUNT_API_URL: string;
PUBLIC_CHECKOUT_DOMAIN: string;
SANITY_STUDIO_API_VERSION: string;
SANITY_STUDIO_DATASET: string;
SANITY_STUDIO_PROJECT_ID: string;
SANITY_STUDIO_URL: string;
SANITY_STUDIO_USE_PREVIEW_MODE: string;
SANITY_STUDIO_TOKEN: string;
SESSION_SECRET: string;
SHOP_ID: string;
}
}
declare module '@shopify/remix-oxygen' {
/**
* Declare local additions to the Remix loader context.
*/
export interface AppLoadContext {
cart: HydrogenCart;
customerAccount: CustomerAccount;
env: Env;
isDev: boolean;
locale: I18nLocale;
sanity: Sanity;
sanityPreviewMode: boolean;
sanitySession: SanitySession;
session: HydrogenSession;
storefront: Storefront;
waitUntil: ExecutionContext['waitUntil'];
}
}
declare module 'react' {
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
fetchpriority?: 'high' | 'low' | 'auto';
}
}