forked from Shopify/hydrogen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.env.d.ts
More file actions
54 lines (47 loc) · 1.26 KB
/
dev.env.d.ts
File metadata and controls
54 lines (47 loc) · 1.26 KB
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
/**
* This file is used to provide types for generator utilities.
*/
import type {HydrogenContext, HydrogenSession} from '@shopify/hydrogen';
import type {
LanguageCode,
CountryCode,
} from '@shopify/hydrogen/storefront-api-types';
declare module 'react-router' {
/**
* Declare local additions to the Remix loader context.
*/
export interface AppLoadContext extends HydrogenContext<
HydrogenSession,
undefined,
I18nLocale
> {}
// TODO: remove this once we've migrated to `Route.LoaderArgs` instead for our loaders
interface LoaderFunctionArgs {
context: AppLoadContext;
}
// TODO: remove this once we've migrated to `Route.ActionArgs` instead for our actions
interface ActionFunctionArgs {
context: AppLoadContext;
}
}
declare global {
/**
* The I18nLocale used for Storefront API query context.
* Also used for the generated i18n functions.
*/
type I18nLocale = {
language: LanguageCode;
country: CountryCode;
pathPrefix?: string;
};
/**
* This type is used to import types from mini-oxygen
*/
type ExecutionContext = {
waitUntil: (promise: Promise<unknown>) => void;
};
/**
* This type is used to import types from mini-oxygen
*/
type ExportedHandlerFetchHandler = Function;
}