File size: 3,063 Bytes
bc20498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# `broccoli-node-api`

TypeScript types for the [Broccoli Node Api](https://github.com/broccolijs/broccoli/blob/master/docs/node-api.md)

- [`broccoli-node-api`](#broccoli-node-api)
  - [Exports](#exports)
    - [Node](#node)
    - [InputNode](#inputnode)
    - [NodeCommon](#nodecommon)
    - [NodeMap](#nodemap)
    - [TransformNode](#transformnode)
    - [SourceNode](#sourcenode)
    - [FeatureSet](#featureset)
    - [NodeInfo](#nodeinfo)
    - [NodeType](#nodetype)
    - [NodeInfoMap](#nodeinfomap)
    - [NodeInfoCommon](#nodeinfocommon)
    - [TransformNodeInfo](#transformnodeinfo)
    - [CallbackObject](#callbackobject)
    - [SourceNodeInfo](#sourcenodeinfo)

## Exports

### Node

```ts
type Node = TransformNode | SourceNode;
```

[Node Documentation](https://github.com/broccolijs/broccoli/blob/master/docs/node-api.md#part-2-node-api-specification)

---

### InputNode

```ts
type InputNode = Node | string;
```

---

### NodeCommon

```ts
interface NodeCommon<T extends NodeInfo> {
  __broccoliFeatures__: FeatureSet;
  __broccoliGetInfo__: (builderFeatures: FeatureSet) => T;
}
```

---

### NodeMap

```ts
interface NodeMap = {
  transform: TransformNode;
  source: SourceNode;
};
```

---

### TransformNode

```ts
interface TransformNode extends NodeCommon<TransformNodeInfo> {}
```

---

### SourceNode

```ts
interface SourceNode extends NodeCommon<SourceNodeInfo> {}
```

---

### FeatureSet

```ts
interface FeatureSet {
  [feature: string]: boolean;
}
```

---

### NodeInfo

```ts
type NodeInfo = TransformNodeInfo | SourceNodeInfo;
```

[NodeInfo Documentation](https://github.com/broccolijs/broccoli/blob/master/docs/node-api.md#the-nodeinfo-object)

---

### NodeType

```ts
type NodeType = "transform" | "source";
```

---

### NodeInfoMap

```ts
interface NodeInfoMap = {
  transform: TransformNodeInfo;
  source: SourceNodeInfo;
};
```

---

### NodeInfoCommon

```ts
interface NodeInfoCommon<T extends NodeType> {
  nodeType: T;
  name: string;
  annotation: string | null | undefined;
  instantiationStack: string;
}
```

---

### TransformNodeInfo

```ts
interface TransformNodeInfo extends NodeInfoCommon<"transform"> {
  inputNodes: Node[];
  setup(
    features: FeatureSet,
    options: { inputPaths: string[]; outputPath: string; cachePath: string }
  ): void;
  getCallbackObject(): CallbackObject;
  persistentOutput: boolean;
  needsCache: boolean;
  volatile: boolean;
  trackInputChanges: boolean;
}
```

[TransformNodeInfo Documentation](https://github.com/broccolijs/broccoli/blob/master/docs/node-api.md#transform-nodes)

---

### CallbackObject

```ts
interface CallbackObject {
  build(buildChangeObject?: BuildChangeObject): Promise<void> | void;
}
```

---

### BuildChangeObject

```ts
interface BuildChangeObject {
  changedNodes: boolean[];
}
```

---

### SourceNodeInfo

```ts
interface SourceNodeInfo extends NodeInfoCommon<"source"> {
  sourceDirectory: string;
  watched: boolean;
}
```

[SourceNodeInfo Documentation](https://github.com/broccolijs/broccoli/blob/master/docs/node-api.md#source-nodes)