forked from HL7/fhirpath.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
81 lines (73 loc) · 1.51 KB
/
index.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
77
78
79
80
81
declare module "fhirpath" {
export function compile(
path: string | Path,
model?: Model,
options?: {
resolveInternalTypes?: boolean
}
): Compile;
export function evaluate(
fhirData: any,
path: string | Path,
context?: Context,
model?: Model,
options?: {
resolveInternalTypes?: boolean,
traceFn?: (value: any, label: string) => void
}
): any[];
export function resolveInternalTypes(value: any): any;
export function types(value: any): string[];
}
declare module "fhirpath/fhir-context/dstu2" {
export const {
choiceTypePaths,
pathsDefinedElsewhere,
type2Parent,
path2Type
}: Model;
}
declare module "fhirpath/fhir-context/r5" {
export const {
choiceTypePaths,
pathsDefinedElsewhere,
type2Parent,
path2Type
}: Model;
}
declare module "fhirpath/fhir-context/r4" {
export const {
choiceTypePaths,
pathsDefinedElsewhere,
type2Parent,
path2Type
}: Model;
}
declare module "fhirpath/fhir-context/stu3" {
export const {
choiceTypePaths,
pathsDefinedElsewhere,
type2Parent,
path2Type
}: Model;
}
interface Path {
base: string;
expression: string;
}
interface Model {
choiceTypePaths: {
[path: string]: string[];
};
pathsDefinedElsewhere: {
[path: string]: string;
};
type2Parent: {
[path: string]: string;
};
path2Type: {
[path: string]: string;
};
}
type Compile = (resource: any, context?: Context) => any[];
type Context = void | Record<string, any>;