types package
Why does this library exist?
@shlack/types
is a package containing broadly-useful types and type guards for our demo slack app. This is part of Mike’s JS & TS Monorepos Course which you can learn more about by visiting the repo on GitHub
If you want to watch a recorded video of this course, look for it on FrontEnd Masters
Remarks
All interfaces are prefixed with I
Functions
Function | Description |
---|---|
isChannel(arg) | (BETA) Check whether a given value is an IChannel |
isMessage(arg) | (BETA) Check whether a given value is an IMessage |
isTeam(arg) | (BETA) Check whether a given value is an ITeam |
isTypedArray(arr, check) | Check whether a given value is an array where each member is of a specified type |
Interfaces
Interface | Description |
---|---|
IChannel | A chat channel, containing many chat messages |
IMessage | A chat message |
ITeam | A team, containing one or more chat channels |
IUser | A user participating in a chat |