diff --git a/src/Kinobi.ts b/src/Kinobi.ts index af589766..291bdd18 100644 --- a/src/Kinobi.ts +++ b/src/Kinobi.ts @@ -4,7 +4,7 @@ import { KinobiVersion, Node, RootNode, - rootNodeFromIdls, + rootNodeFromIdl, } from './nodes'; import { KinobiError } from './shared'; import { defaultVisitor, visit, Visitor } from './visitors'; @@ -49,11 +49,11 @@ export function createFromRoot( export function createFromIdl( program: IdlInput, - additionalPrograms: IdlInput[], + additionalPrograms: IdlInput[] = [], useDefaultVisitor = true ): Kinobi { return createFromRoot( - rootNodeFromIdls(program, additionalPrograms), + rootNodeFromIdl(program, additionalPrograms), useDefaultVisitor ); } diff --git a/src/nodes/RootNode.ts b/src/nodes/RootNode.ts index 739943f2..9e19daa8 100644 --- a/src/nodes/RootNode.ts +++ b/src/nodes/RootNode.ts @@ -42,9 +42,9 @@ export function rootNode< }; } -export function rootNodeFromIdls( +export function rootNodeFromIdl( program: IdlInput, - additionalPrograms: IdlInput[] + additionalPrograms: IdlInput[] = [] ): RootNode { const resolveIdl = (idl: IdlInput) => typeof idl === 'string' ? readJson>(idl) : idl;