Typescript: Disposing margin after use