Skip to content

Commit fb36669

Browse files
committed
Explicitly export types from index.ts
1 parent 2f49356 commit fb36669

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/index.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,19 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
import type {TreeProto} from './ast.js';
1716
import * as ast from './ast.js';
1817
import * as dom from './dom.js';
1918

19+
// Reexport all types from ast
20+
export type {
21+
TreeProto,
22+
DocumentNodeProto,
23+
NodeProto,
24+
ElementNodeProto,
25+
TextNodeProto,
26+
AttributeProto,
27+
} from './ast.js';
28+
2029
export interface InstructionMap {
2130
[key: string]: (element: Element) => void;
2231
}
@@ -26,10 +35,10 @@ function defaultHandleError(tagName, e: Error) {
2635
}
2736

2837
export function renderAst(
29-
tree: TreeProto,
38+
tree: ast.TreeProto,
3039
instructions: InstructionMap,
3140
{handleError = defaultHandleError} = {}
32-
): TreeProto {
41+
): ast.TreeProto {
3342
const doc = dom.fromTreeProto(tree);
3443

3544
// TODO: Optimization opportunity by writing a custom walk instead of N querySelectorAll.

0 commit comments

Comments
 (0)