Introduction
Typend exposed two kinds of API:
- One that uses
generic<T>
TypeScript's notation to define required expectation(T
). - One that can be used outside(and at) TypeScript environment(using vanilla JavaScript).
Since generic notation has it's own limitations thats why both apis exist on this module.
Comparison of exposed APIs:
TypeScript API | JavaScript API |
---|---|
check() | validate() |
is() | isValid() |
instanceOf() | isInstanceOf() |