# Evt.asNonPostable(evt)

{% hint style="info" %}
Evt.asNonPostable() is the identity function with special type annotation
{% endhint %}

Return the passed evt typed as an object that can't be posted.

## Usecase:

Take [this example](https://docs.evt.land/api/statefulevt#make-a-statefulevt-readonly).

You could use this function to enforce that the return type by inferred and save you the trouble of having to import the `StatefulReadonlyEvt` interface:

```typescript
import { Evt } from "evt";

//Return an event that post every second.
function generateEvtTick(delay: number) {

    const evtTick= Evt.create(0);

    setInterval(()=> evtTick.state++, delay);

    retrun Evt.asNonPostable(evtTick);

}

const evtTick= generateTick(1000);


evtTick.state++; // TS ERROR
evtTick.post(2); // TS ERROR
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.evt.land/api/evt/asnonpostable.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
