Skip to content

Instantly share code, notes, and snippets.

@AlexMost
Last active December 12, 2015 03:28
Show Gist options
  • Save AlexMost/4706736 to your computer and use it in GitHub Desktop.
Save AlexMost/4706736 to your computer and use it in GitHub Desktop.
interface = require 'interface'
types = require 'interface-types'
INumber = interface.create(n,
validation = (n) ->
# IntParse(n) or FloatParseN
)
IsomeInterface = inteface.create([
{name, surname, INumber(age)}
])
handler = (IsomeInterface(user)) ->
console.log user.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment