Skip to content

A version of the Gilded Rose kata in JavaScript with approval testing.

Notifications You must be signed in to change notification settings

sroccaserra/gilded-rose-kata-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A version of the Gilded Rose kata in JavaScript with approval testing.

See also

About the Gilded Rose kata:

About approval tests:

Videos demonstrating or about the kata:

About type checking JavaScript files:

Type checking learnings

  • Only files marked by @ts-check are checked (can be configured, a black list is also possible)
  • Type errors are displayed on the fly in IDEs (tested on Vim + ALE)
  • Type checking can be run in watch mode
  • Type checking can be run in the CI environment
  • No runtime cost: type annotations are in comments
  • No additional build phase, no additional deployment phase
  • Function arity of @param annotated functions is checked
  • There is a type inference mecanism, no need to annotate everything
  • @private and @readonly annotation for class fields
  • Union Types
  • Parametric Types
  • Allows "rename method" and "rename field" automated refactorings, maybe more ?
  • Types used only in comment annotations can (should?) be declared only in comment annotations
  • We can declare and implement typechecked interfaces (@interface and @implements)

About

A version of the Gilded Rose kata in JavaScript with approval testing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published