Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dialog handling #14

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading