Skip to content

Commit

Permalink
Update undocumented.md
Browse files Browse the repository at this point in the history
  • Loading branch information
familyfriendlymikey committed Sep 14, 2023
1 parent fec3423 commit 4943c0c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions content/docs/undocumented.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,29 @@ personal notes. Contributions are highly appreciated, especially:
If you have questions about any of these, don't hesitate to reach
out on [Discord](https://discord.gg/mkcbkRw).

## isa

`instanceof` is shortened to `isa` in imba:

```imba
[] isa Array
```

But we've added more functionality. If the right hand side is a string,
it will check `typeof`:

```imba
let s = 'hello'
typeof s is 'string' # true
s isa 'string' # true
```

It also works similarly to `is`:

```
7 isa ('string' or 'number') # true
```

## Awaits

You can await desired changes to observable properties with `imba.awaits`,
Expand Down

0 comments on commit 4943c0c

Please sign in to comment.