alepha@docs:~/docs/reference/primitives$
cat $sms.md | pretty
1 min read

#$sms

#Import

typescript
1import { $sms } from "alepha/sms";

#Overview

Declares an SMS channel for sending text messages through the configured provider - the in-memory provider under test, a real gateway in production.

#Options

Option Type Required Description
name string No
provider InstantiableClass<SmsProvider> | "memory" No

#Examples

typescript
1class VerificationService {2  sms = $sms();3 4  async sendCode(to: string, code: string) {5    await this.sms.send({ to, message: `Your code: ${code}` });6  }7}