Skip to content

Instantly share code, notes, and snippets.

@zachbonham
Created April 28, 2012 12:55
Show Gist options
  • Save zachbonham/2518889 to your computer and use it in GitHub Desktop.
Save zachbonham/2518889 to your computer and use it in GitHub Desktop.
sample type declaration in javascript
function ServerRepository(connection)
{
var servers = [
{ name : "testin 1"},
{ name: "testin 2"}
];
var self = this;
self.connection = connection;
console.log('connecting ' + self.connection);
self.all = function()
{
return servers;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment