-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathconstants.ts
More file actions
68 lines (60 loc) · 1.5 KB
/
constants.ts
File metadata and controls
68 lines (60 loc) · 1.5 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import type { ImportDefinition, ImportIdentifierSpecifier } from './types';
// Source of solid-refresh (for import)
const SOLID_REFRESH_MODULE = 'solid-refresh';
// Exported names from solid-refresh that will be imported
export const IMPORT_REGISTRY: ImportDefinition = {
kind: 'named',
name: '$$registry',
source: SOLID_REFRESH_MODULE,
};
export const IMPORT_REFRESH: ImportDefinition = {
kind: 'named',
name: '$$refresh',
source: SOLID_REFRESH_MODULE,
};
export const IMPORT_COMPONENT: ImportDefinition = {
kind: 'named',
name: '$$component',
source: SOLID_REFRESH_MODULE,
};
export const IMPORT_CONTEXT: ImportDefinition = {
kind: 'named',
name: '$$context',
source: SOLID_REFRESH_MODULE,
};
export const IMPORT_DECLINE: ImportDefinition = {
kind: 'named',
name: '$$decline',
source: SOLID_REFRESH_MODULE,
};
export const IMPORT_PATCH_REGISTRY: ImportDefinition = {
kind: 'named',
name: '$$patchRegistry',
source: SOLID_REFRESH_MODULE,
};
export const IMPORT_SPECIFIERS: ImportIdentifierSpecifier[] = [
{
type: 'render',
definition: { name: 'render', kind: 'named', source: 'solid-js/web' },
},
{
type: 'render',
definition: { name: 'hydrate', kind: 'named', source: 'solid-js/web' },
},
{
type: 'createContext',
definition: {
name: 'createContext',
kind: 'named',
source: 'solid-js',
},
},
{
type: 'createContext',
definition: {
name: 'createContext',
kind: 'named',
source: 'solid-js/web',
},
},
];