Skip to content

Instantly share code, notes, and snippets.

@TobiaszCudnik
Created July 17, 2012 20:25
Show Gist options
  • Save TobiaszCudnik/3131821 to your computer and use it in GitHub Desktop.
Save TobiaszCudnik/3131821 to your computer and use it in GitHub Desktop.
contracts.coffee class typing
# CoffeeScript classes supported?
# https://github.com/disnet/contracts.coffee/issues/26
# TServer is a contract
# Server is a class
for prop, Tcontr of TServer.oc
continue if not Server::[prop] or
prop is 'constructor'
Server::[prop] :: Tcontr
Server::[prop] = Server::[prop]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment