Skip to content

Commit

Permalink
fix(lib): correct escaped attribute for moveTo
Browse files Browse the repository at this point in the history
  • Loading branch information
Maed223 committed Oct 16, 2023
1 parent 4941616 commit 7362343
Showing 1 changed file with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { AttributeTypeModel } from "./attribute-type-model";
export type GetterType =
| { _type: "plain" }
| {
_type: "args";
args: string;
returnType?: string;
returnStatement: string;
}
_type: "args";
args: string;
returnType?: string;
returnStatement: string;
}
| {
_type: "stored_class";
};
_type: "stored_class";
};

export type SetterType =
| { _type: "none" }
Expand Down Expand Up @@ -50,7 +50,7 @@ export function escapeAttributeName(name: string) {
// `importFrom` has potential for common name collision with providers
if (name === "importFrom") return `${name}Attribute`;
// `move` could have common name collision with providers
if (name === "move") return `${name}Attribute`;
if (name === "moveTo") return `${name}Attribute`;
// `software` attribute can be confused with the JSII Java runtime package (see #3115)
if (name === "software") return `${name}Attribute`;
return name;
Expand Down Expand Up @@ -144,9 +144,8 @@ export class AttributeModel {

return {
_type: "set",
type: `${this.type.inputTypeDefinition}${
this.isProvider ? " | undefined" : ""
}`,
type: `${this.type.inputTypeDefinition}${this.isProvider ? " | undefined" : ""
}`,
};
}

Expand Down

0 comments on commit 7362343

Please sign in to comment.