Skip to content

Commit

Permalink
check for anonymous operations
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz committed Apr 5, 2018
1 parent 57918a3 commit c3d4f8a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/widlprocess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,13 @@ function getConstructor(extAttrs: webidl2.ExtendedAttributes[], parent: string)
}

function convertOperation(operation: webidl2.OperationMemberType): Browser.Method {
if (!operation.name || !operation.idlType) {
throw new Error("Unexpected anonymous operation");
}
return {
name: operation.name!,
name: operation.name,
signature: [{
...convertIdlType(operation.idlType!),
...convertIdlType(operation.idlType),
param: operation.arguments.map(convertArgument)
}],
getter: operation.getter ? 1 : undefined,
Expand Down

0 comments on commit c3d4f8a

Please sign in to comment.