Skip to content
Source
Sign inSign up

01_basics.ts

14 lines227 Bytes

1/**
2 * @title Using the Predicate module
3 */
4import { Predicate } from "effect"
5​
6const thing: unknown = {
7 a: 1
8}
9​
10if (Predicate.isObject(thing)) {
11 if (Predicate.isNumber(thing.a)) {
12 console.log("number", thing.a)
13 }