Skip to content

Instantly share code, notes, and snippets.

View Jason-Rev's full-sized avatar

Jason Dent Jason-Rev

  • Street Side Software
  • Netherlands
View GitHub Profile
/**
* This is a d.ts file build from https://github.com/facebook/dataloader/blob/master/src/index.js
* Usage:
* import DataLoader = require('dataloader');
*
*/
declare module "dataloader/DataLoader" {
declare module "comment-json" {
type Reviver = (k: number | string, v: any) => any;
export function parse(json: string, reviver?: Reviver, removes_comments?: boolean): Object;
export function stringify(value: any, replacer?: any, space?: string | number): string;
}
@Jason-Rev
Jason-Rev / url-parse.d.ts
Created June 6, 2016 15:00
Typings for npm url-parse
declare module 'url-parse' {
interface Query {
[index: string]: string;
}
interface QueryParser {
(query: string): any;
}
interface ParsedUrl {
declare module 'JSONSelect' {
type Callback = (value: any) => any;
interface JsonSelectInstance {
match(obj: any): any[];
foreach(obj: any, fn: Callback): void;
}
interface JsonSelect {
match(select: string, json: any): any[];
/**
* Created by jasondent on 24/02/2016.
* Based upon index.js at https://github.com/Reactive-Extensions/rx-node/blob/master/index.js
*/
declare module "rx-node" {
import { Observable, Disposable } from 'rx';
import { EventEmitter } from 'events';
import { Stream } from 'stream';
/**
* This is a copy of Oliver W's gist: https://gist.github.com/oliverw/a3ba9d804d848417fac4
* With some minor modifications to get it to work in typescript 1.8+
*
* How to use:
* 1. Make sure it gets loaded via <reference path="./rx-dom.d.ts" />
* 2. So it gets loaded, you need to: import "rx-dom"; Example
import * as Rx from "rx"; // Make sure Rx is loaded
import "rx-dom"; // Make sure it gets loaded