Skip to content

Instantly share code, notes, and snippets.

@jack-guy
jack-guy / feathers.d.ts
Last active September 7, 2017 10:34
These are basic typings for Feathers.js based off of those in DefinitelyTyped for Express. This doesn't type feathers plugins, but does have some interfaces that can be used in them. WIP.
// Type definitions for Feathers
// Project: http://feathersjs.com/
// Definitions by: Jack Guy <http://thatguyjackguy.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Application, Handler, ErrorRequestHandler } from 'express';
type HandlerArgument = Handler | Handler[];
export = Feathers;
import { Directive, ViewChild, Inject, ContentChildren, QueryList, ContentChild,
ElementRef, Input, forwardRef, AfterViewInit, EventEmitter } from 'angular2/core';
import { Subject } from 'rxjs';
const imagesLoaded = require('imagesloaded');
@Directive({
selector: '[masonry-item]',
host: {
'[style.position]': 'position',
@jack-guy
jack-guy / app-injector.ts
Created March 7, 2016 22:39
How to set up a Socket.io-based Feathers app with Angular 2
import {Injector} from 'angular2/core';
let appInjectorRef: Injector;
export const appInjector = (injector?: Injector):Injector => {
if (injector) {
appInjectorRef = injector;
}
return appInjectorRef;
};