Troubleshooting TypeScript Integration with Effect Library's Exit Type

Hello! I'm new to effect, i'm trying to integrate the library in some critical parts of the application, i'm trying to use Exit to return error as value like rust's Result type, but i cannot seem to be able to use the type to define the return value of a function:

I'm getting:
Cannot use namespace Exit as a type.

for:
import { Exit } from 'effect';

static async create(input: CoursePlanInput, maxRetries: number): Promise<Exit<CoursePlan, HistoryEntry[]>> {...}

If i use the import type it does work but then i cannot do Exit.fail etc... how should i make it work?
Was this page helpful?