Looking at SetAttributes type we have from the API definition https://github.com/openscd/oscd-api/blob/main/docs/plugin-api.md#editv2-type
export type SetAttributes = {
element: Element;
attributes: Partial<Record<string, string | null>>;
attributesNS: Partial<Record<string, Partial<Record<string, string | null>>>>;
};
and in the actual type
export type SetAttributes = {
element: Element;
attributes?: AttributesV2;
attributesNS?: AttributesNS;
};