See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/28597 I would suggest renaming the `size` attribute. As a workaround you can define a dummy interface and pass it to the `attrs` constructor.