# Evt.loosenType(evt)

{% hint style="info" %}
This is the identity function with special type annotations.
{% endhint %}

Swipe the type argument with a superset without giving up type safety.

If `A` is assignable to `B` ⇒ `Evt<A>` is assignable to `Evt<B>`

e.g:`Evt<1|2|3>` is assignable to `Evt<number>` however typescript wont let you do this assignation. This is where `Evt.loosenType` come in handy.

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

declare const evFooBar: Evt<"FOO" | "BAR">; 
declare function myFunc(evtText: Evt<string>): void;

myFunc(evtFooBar); //Gives a type error; 
myFunc(Evt.loosenType(evtFooBar)); //OK
```


---

# 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/loosentype.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.
