Skip to content

Commit

Permalink
feat: Template interface typed TemplateAPI injection
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-rietzke committed Jun 23, 2023
1 parent 0b1ba12 commit e1ccd87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/types/Template.ts
@@ -1,8 +1,9 @@
import * as d3 from "d3";
import { Node } from "./Node";
import type * as TAPI from "../templateAPI";

export interface Template<T = any> {
shapeSize: number;
shapePayload?: T;
shapeBuilder: (data: Node<T>, TemplateAPI: any) => d3.Selection<any, any, any, any>;
shapeBuilder: (data: Node<T>, TemplateAPI: typeof TAPI) => d3.Selection<any, any, any, any>;
}

0 comments on commit e1ccd87

Please sign in to comment.