Skip to content

kayac-chang/advanced-type

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced Typescript

Requirement

  • typescript: ^5

Includes Type

  • Expect: Expect takes one type parameter and only type-checks if it is true.
  • Equal: Equal takes 2 types and returns true if they are the same.
  • Params: Params takes a function type and returns its parameters as a tuple.
  • Head: Head takes an array and returns its first element.
  • Tail: Tail takes an array and returns all but the first element.
  • HasTail: HasTail takes an array and returns true if it has more than one element.
  • Last: Last takes an array and returns its last element.
  • Length: Length takes an array and returns its length.
  • Prepend: Prepend takes an element and an array and returns a new array with the element prepended.
  • Drop: Drop takes a number and an array and returns a new array with the first N elements removed.
  • Curry: Curry takes a function and returns a curried version of it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published