Skip to content

Commit

Permalink
Merge pull request #14 from lino-levan/feat-dialog
Browse files Browse the repository at this point in the history
feat: add dialog handling
  • Loading branch information
lino-levan authored Sep 11, 2023
2 parents 0fd73cf + 2ec3a12 commit 463fba9
Show file tree
Hide file tree
Showing 6 changed files with 553 additions and 352 deletions.
6 changes: 3 additions & 3 deletions bindings/_tools/generate/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function generateParameters(commandParams: CommandParameter[], domain: string) {

let events = "";
let eventMap = "const CelestialEvents = {\n";
let eventMapType = "\ninterface CelestialEventMap {";
let eventMapType = "\nexport interface CelestialEventMap {";

let celestial = `
export class Celestial extends EventTarget {
Expand Down Expand Up @@ -240,11 +240,11 @@ for (const domain of protocol.domains) {
for (const event of domain.events || []) {
if (event.parameters) {
events += `
interface ${domain.domain}_${event.name} {
export interface ${domain.domain}_${event.name} {
${generateParameters(event.parameters, domain.domain)}
}
class ${domain.domain}_${event.name}Event extends CustomEvent<${domain.domain}_${event.name}> {
export class ${domain.domain}_${event.name}Event extends CustomEvent<${domain.domain}_${event.name}> {
constructor(detail: ${domain.domain}_${event.name}) {
super("${domain.domain}.${event.name}", { detail })
}
Expand Down
Loading

0 comments on commit 463fba9

Please sign in to comment.