Skip to content

Commit 8258a59

Browse files
authored
Update emitter.ts
1 parent ec55cce commit 8258a59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/build/emitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,6 @@ export function emitWebIdl(
862862
printer.printLine("/** @deprecated */");
863863
printer.printLine("declare const name: void;");
864864
} else {
865-
const propertyName = p.name.includes("-") ? `"${p.name}"` : p.name;
866865
let pType: string;
867866
if (!p.overrideType && isEventHandler(p)) {
868867
// Sometimes event handlers with the same name may actually handle different
@@ -881,6 +880,7 @@ export function emitWebIdl(
881880
if (p.optional) {
882881
pType += " | undefined";
883882
}
883+
const propertyName = p.name.includes("-") ? `"${p.name}"` : p.name;
884884
const optionalModifier = !p.optional || prefix ? "" : "?";
885885
const canPutForward =
886886
compilerBehavior.allowUnrelatedSetterType || !p.readonly;

0 commit comments

Comments
 (0)