---
title: "lint/types/add-datetime-property-type"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="lint/types/add-datetime-property-type" />

In the [`types`](/docs/rules/sets/types) set. Unsafe fix: it can change behaviour.

## What it does

Set DateTime to DateTimeInterface for DateTime property with DateTimeInterface docblock

## Configuration

```toml title="pun.toml"
[lint.rules]
"types/add-datetime-property-type" = "error"
```

To skip it in some files or lines, add an [override](/docs/configuration/pun-toml#lint) or an [ignore comment](/docs/configuration/ignore-comments).

## Replaces

- [`MergeDateTimePropertyTypeDeclaration`](https://getrector.com/rule-detail/merge-date-time-property-type-declaration-rector) (rector)

[More lint/types rules](/docs/rules/lint/types) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
