More fixes

This commit is contained in:
Ryan Cavanaugh
2016-05-04 18:42:46 -07:00
parent 33686b47c5
commit 290d5dfb4d
94 changed files with 300 additions and 311 deletions

View File

@@ -3,6 +3,8 @@
// Definitions by: Dan Marshall <https://github.com/danmarshall>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../three/three.d.ts" />
declare namespace THREE {
var CSG: {
fromCSG: (csg: CSG, defaultColor: any) => {

View File

@@ -1,4 +1,5 @@
{
"files": ["devextreme.d.ts", "devextreme-tests.ts"],
"compilerOptions": {
"module": "commonjs",
"target": "es6",

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../"
}

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../"
}

View File

@@ -1,5 +1,3 @@
///<reference path="json-stable-stringify.d.ts"/>
import stringify = require('json-stable-stringify');
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };

View File

@@ -10,7 +10,7 @@ var editor:JSONEditor = new JSONEditor(container, options);
var json = {
"Array": [1, 2, 3],
"Boolean": true,
"Null": null,
"Null": <any>null,
"Number": 123,
"Object": {"a": "b", "c": "d"},
"String": "Hello World"
@@ -28,7 +28,7 @@ var formatter: JSONFormatter = new JSONFormatter(container, options);
var json2 = {
"Array": [1, 2, 3],
"Boolean": true,
"Null": null,
"Null": <any>null,
"Number": 123,
"Object": {"a": "b", "c": "d"},
"String": "Hello World"

View File

@@ -9,7 +9,7 @@ declare var jsPlumb: jsPlumbInstance;
interface jsPlumbInstance {
setRenderMode(renderMode: string): string;
bind(event: string, callback: (e) => void ): void;
bind(event: string, callback: (e: any) => void ): void;
unbind(event?: string): void;
ready(callback: () => void): void;
importDefaults(defaults: Defaults): void;

View File

@@ -1,4 +1,5 @@
{
"files": ["jssha.d.ts", "jssha-tests.ts"],
"compilerOptions": {
"module": "commonjs",
"target": "es6",

View File

@@ -1,5 +1,4 @@
/// <reference path="../chai/chai.d.ts"/>
/// <reference path="jsx-chai.d.ts"/>
import chai = require('chai');
import jsxChai = require('jsx-chai');

View File

@@ -3,14 +3,15 @@
// Definitions by: Michael Randolph <https://github.com/mrand01>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export as namespace katex;
interface KatexOptions {
export interface KatexOptions {
displayMode?: boolean;
breakOnUnsupportedCmds?: boolean;
errorColor?: string;
}
declare class ParseError implements Error {
export class ParseError implements Error {
constructor(message: string, lexer: any, position: number);
name: string;
message: string;
@@ -23,10 +24,10 @@ declare class ParseError implements Error {
* @param element The DOM element to render into
* @param options KaTeX options
*/
declare function render(tex: string, element: HTMLElement, options?: KatexOptions): void;
export function render(tex: string, element: HTMLElement, options?: KatexOptions): void;
/**
* Renders a TeX expression into an HTML string
* @param tex A TeX expression
* @param options KaTeX options
*/
declare function renderToString(tex: string, options?: KatexOptions): string;
export function renderToString(tex: string, options?: KatexOptions): string;

View File

@@ -1,5 +1,3 @@
/// <reference path="katex.d.ts" />
import katexLib = require('katex');
class KatexTest {

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../"
}

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../../"
}

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../"
}

3
kue/index.d.ts vendored
View File

@@ -7,7 +7,7 @@
import events = require('events');
import express = require('express');
import redis = require('redis');
export import redis = require('redis');
export declare class Queue extends events.EventEmitter {
name: string;
@@ -139,7 +139,6 @@ interface TestMode {
}
export declare var app: express.Application;
export declare var redis: Redis;
export declare var workers: Worker[];
export declare function createQueue(options?: Object): Queue;

View File

@@ -1,8 +1,3 @@
/// <reference path="../gulp-minify-html/gulp-minify-html.d.ts" />
/// <reference path="./lazypipe.d.ts" />
import * as gulp from "gulp";
import minifyHtml = require("gulp-minify-html");
import size = require("gulp-size");

View File

@@ -1,4 +1,4 @@
import Leap = require('./LeapMotionTS');
import Leap = require('LeapMotionTS');
var controller: Leap.Controller = new Leap.Controller();
controller.addEventListener(Leap.LeapEvent.LEAPMOTION_FRAME, (event: Leap.LeapEvent) => {

View File

@@ -46,10 +46,10 @@ db.batch()
var open:boolean = db.isOpen();
var closed:boolean = db.isClosed();
db.createReadStream()
.on('data', function (data) {
.on('data', function (data: any) {
console.log(data.key, '=', data.value)
})
.on('error', function (err) {
.on('error', function (err: any) {
console.log('Oh my!', err)
})
.on('close', function () {

View File

@@ -1,8 +1,9 @@
{
"files": ["linq.d.ts", "linq-tests.d.ts"],
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../"
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"exprimentalDecorators": true
}
}

View File

@@ -1,4 +1,5 @@
{
"files": ["lodash.d.ts", "lodash-tests.d.ts"],
"compilerOptions": {
"module": "commonjs",
"target": "es6",

View File

@@ -3,8 +3,7 @@
// Definitions by: Ray Martone <https://github.com/rmartone>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface LogglyOptions {
export interface LogglyOptions {
token: string;
subdomain: string;
tags?: string[];
@@ -16,9 +15,9 @@ interface LogglyOptions {
}
}
interface Loggly {
export interface Loggly {
log(message: any, tags?: string[], callback?: (err: any, results: any) => void): void;
log(message: any, callback?: (err: any, results: any) => void): void;
}
declare function createClient(options: LogglyOptions): Loggly;
export function createClient(options: LogglyOptions): Loggly;

View File

@@ -1,4 +1,3 @@
/// <reference path='./loggly.d.ts' />
import loggly = require("loggly");
var options: loggly.LogglyOptions = {

View File

@@ -5,15 +5,14 @@
/// <reference path="../node/node.d.ts" />
export type ColorObject = { r: number, g: number, b: number, a?: number };
export type Color = string | [number, number, number, number] | ColorObject;
type ColorObject = { r: number, g: number, b: number, a?: number };
type Color = string | [number, number, number, number] | ColorObject;
interface ImageCallback {
export interface ImageCallback {
(err: any, image: Image): void;
}
interface BufferCallback {
export interface BufferCallback {
(err: any, buffer: Buffer): void;
}
@@ -21,28 +20,28 @@ interface BufferCallback {
* Open an image
* @param source The path to the image on disk.
*/
declare function open(source: string, callback: ImageCallback): void;
export function open(source: string, callback: ImageCallback): void;
/**
* Open an image
* @param source The path to the image on disk.
* @param type Optional type of the image. If omitted, the type will be inferred from the file extension. Type must be a string of the image type (i.e. "jpg").
*/
declare function open(source: string, type: string, callback: ImageCallback): void;
export function open(source: string, type: string, callback: ImageCallback): void;
/**
* Open an image
* @param source The path to the image on disk or an image buffer.
* @param type Type of the image. If source is an encoded image buffer, type must be a string of the image type (i.e. "jpg"). If source is a raw pixels buffer type must be an object with type.width and type.height properties.
*/
declare function open(source: Buffer, type: string | { width: number, height: number }, callback: ImageCallback): any;
export function open(source: Buffer, type: string | { width: number, height: number }, callback: ImageCallback): any;
/**
* Create a new image
* @param width The width of the new image.
* @param height The height of the new image.
*/
declare function create(width: number, height: number, callback: ImageCallback): void;
export function create(width: number, height: number, callback: ImageCallback): void;
/**
* Create a new image
@@ -50,26 +49,26 @@ declare function create(width: number, height: number, callback: ImageCallback):
* @param height The height of the new image.
* @param color Optional Color of the canvas.
*/
declare function create(width: number, height: number, color: Color, callback: ImageCallback): void;
export function create(width: number, height: number, color: Color, callback: ImageCallback): void;
type JpegBufferParams = {
export type JpegBufferParams = {
quality?: number;
};
type PngBufferParams = {
export type PngBufferParams = {
compression?: string;
interlaced?: boolean;
transparency?: boolean | string;
};
type GifBufferParams = {
export type GifBufferParams = {
colors?: number;
interlaced?: boolean;
transparency?: boolean | string;
threshold: number;
}
interface Image {
export interface Image {
// Image operations
/**
@@ -555,7 +554,7 @@ interface Image {
batch(): Batch;
}
interface Batch {
export interface Batch {
// Using a batch object
/**

View File

@@ -1,5 +1,3 @@
/// <reference path="./lwip.d.ts" />
import * as lwip from 'lwip';
lwip.open('lena.jpg', function(err, image) {

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../"
}

View File

@@ -5,6 +5,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../../"
"baseUrl": "../../",
"jsx": "react"
}
}

View File

@@ -83,9 +83,9 @@ declare module "material-ui" {
import NavigationChevronRight = __MaterialUI.SvgIcon; // require('material-ui/lib/svg-icon/navigation/chevron-right');
export const Icons: {
NavigationMenu: NavigationMenu,
NavigationChevronLeft: NavigationChevronLeft,
NavigationChevronRight: NavigationChevronRight,
NavigationMenu: typeof NavigationMenu,
NavigationChevronLeft: typeof NavigationChevronLeft,
NavigationChevronRight: typeof NavigationChevronRight,
};
// export type definitions

View File

@@ -3,8 +3,10 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react",
"experimentalDecorators": true
}
}

View File

@@ -1,4 +1,3 @@
/// <reference path="./mobservable-react.d.ts"/>
/// <reference path="../react/react-global.d.ts" />
import {reactiveComponent} from 'mobservable-react';

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"experimentalDecorators": true
}
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"experimentalDecorators": true
}
}

View File

@@ -9,7 +9,7 @@ export as namespace moment;
export = moment;
declare namespace moment {
interface Range {
export interface Range {
start: Moment;
end: Moment;
@@ -44,6 +44,8 @@ declare namespace moment {
}
declare module '../moment' {
import Range = moment.Range;
interface Moment {
within (x: moment.Range): boolean;
}

View File

@@ -1,4 +1,4 @@
/// <reference path="index.d.ts" />
import * as moment from 'moment';
var range: moment.Range = moment.range(new Date(2012, 0, 15), new Date(2012, 4, 23));
var range2: moment.Range = moment.range(moment("2011-04-15", "YYYY-MM-DD"), moment("2011-11-27", "YYYY-MM-DD"));

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../"
}

View File

@@ -1,5 +1,3 @@
/// <reference path="node-schedule.d.ts"/>
import nodeSchedule = require("node-schedule");
/**

View File

@@ -6,10 +6,6 @@
/// <reference path="../node/node.d.ts" />
/// <reference path="./nodemailer-types.d.ts" />
/// <reference path="../nodemailer-smtp-transport/nodemailer-smtp-transport.d.ts" />
import directTransport = require("nodemailer-direct-transport");
import smtpTransport = require("nodemailer-smtp-transport");

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../"
}

View File

@@ -1,5 +1,4 @@
///<reference path="../node/node.d.ts"/>
///<reference path="node-webkit.d.ts"/>
// Load native UI library
// See docs: https://github.com/rogerwang/node-webkit/wiki/Shell
@@ -8,198 +7,198 @@ import gui = require("nw.gui");
/* WINDOW */
// Get the current window
var win = gui.Window.get();
// Get the current window
var win = gui.Window.get();
// Listen to the minimize event
win.on('minimize', function() {
console.log('Window is minimized');
});
// Listen to the minimize event
win.on('minimize', function() {
console.log('Window is minimized');
});
// Minimize the window
win.minimize();
// Minimize the window
win.minimize();
// Unlisten the minimize event
win.removeAllListeners('minimize');
// Unlisten the minimize event
win.removeAllListeners('minimize');
// Create a new window and get it
var new_win = gui.Window.get(
window.open('https://github.com')
);
// Create a new window and get it
var new_win = gui.Window.get(
window.open('https://github.com')
);
// And listen to new window's focus event
new_win.on('focus', function() {
console.log('New window is focused');
});
// And listen to new window's focus event
new_win.on('focus', function() {
console.log('New window is focused');
});
// Get the current window
var win = gui.Window.get();
// Get the current window
var win = gui.Window.get();
// Create a new window and get it
var new_win = gui.Window.get(
window.open('https://github.com')
);
// Create a new window and get it
var new_win = gui.Window.get(
window.open('https://github.com')
);
// png as base64string
win.capturePage(function(base64string:string){
// do something with the base64string
}, { format : 'png', datatype : 'raw'} );
// png as base64string
win.capturePage(function(base64string: string) {
// do something with the base64string
}, { format: 'png', datatype: 'raw' });
// png as node buffer
win.capturePage(function(buffer:Buffer){
// do something with the buffer
}, { format : 'png', datatype : 'buffer'} );
// png as node buffer
win.capturePage(function(buffer: Buffer) {
// do something with the buffer
}, { format: 'png', datatype: 'buffer' });
// Open a new window.
var win = gui.Window.get(
window.open('popup.html')
);
// Open a new window.
var win = gui.Window.get(
window.open('popup.html')
);
// Release the 'win' object here after the new window is closed.
win.on('closed', function() {
win = null;
});
// Release the 'win' object here after the new window is closed.
win.on('closed', function() {
win = null;
});
// Listen to main window's close event
gui.Window.get().on('close', function() {
// Hide the window to give user the feeling of closing immediately
this.hide();
// Listen to main window's close event
gui.Window.get().on('close', function() {
// Hide the window to give user the feeling of closing immediately
this.hide();
// If the new window is still open then close it.
if (win != null)
win.close(true);
// If the new window is still open then close it.
if (win != null)
win.close(true);
// After closing the new window, close the main window.
this.close(true);
});
// After closing the new window, close the main window.
this.close(true);
});
/* MENU */
// Create an empty menu
var menu = new gui.Menu();
// Create an empty menu
var menu = new gui.Menu();
// Add some items
menu.append(new gui.MenuItem({ label: 'Item A' }));
menu.append(new gui.MenuItem({ label: 'Item B' }));
menu.append(new gui.MenuItem({ type: 'separator' }));
menu.append(new gui.MenuItem({ label: 'Item C' }));
// Add some items
menu.append(new gui.MenuItem({ label: 'Item A' }));
menu.append(new gui.MenuItem({ label: 'Item B' }));
menu.append(new gui.MenuItem({ type: 'separator' }));
menu.append(new gui.MenuItem({ label: 'Item C' }));
// Remove one item
menu.removeAt(1);
// Remove one item
menu.removeAt(1);
// Popup as context menu
menu.popup(10, 10);
// Popup as context menu
menu.popup(10, 10);
// Iterate menu's items
for (var i = 0; i < menu.items.length; ++i) {
console.log(menu.items[i]);
}
// Iterate menu's items
for (var i = 0; i < menu.items.length; ++i) {
console.log(menu.items[i]);
}
var win = gui.Window.get();
var nativeMenuBar = new gui.Menu({ type: "menubar" });
nativeMenuBar.createMacBuiltin("My App");
win.menu = nativeMenuBar;
var win = gui.Window.get();
var nativeMenuBar = new gui.Menu({ type: "menubar" });
nativeMenuBar.createMacBuiltin("My App");
win.menu = nativeMenuBar;
nativeMenuBar.createMacBuiltin("My App", {
hideEdit: true,
hideWindow: true
});
nativeMenuBar.createMacBuiltin("My App", {
hideEdit: true,
hideWindow: true
});
/* MENU ITEM */
var itemc:gui.MenuItem;
var itemc: gui.MenuItem;
// Create a separator
itemc = new gui.MenuItem({ type: 'separator' });
// Create a separator
itemc = new gui.MenuItem({ type: 'separator' });
// Create a normal item with label and icon
itemc = new gui.MenuItem({
type: "normal",
label: "I'm a menu item",
icon: "img/icon.png"
});
// Create a normal item with label and icon
itemc = new gui.MenuItem({
type: "normal",
label: "I'm a menu item",
icon: "img/icon.png"
});
// Or you can omit the 'type' field for normal items
itemc = new gui.MenuItem({ label: 'Simple item' });
// Or you can omit the 'type' field for normal items
itemc = new gui.MenuItem({ label: 'Simple item' });
// Bind a callback to item
itemc = new gui.MenuItem({
label: "Click me",
click: function() {
console.log("I'm clicked");
},
key: "s",
modifiers: "ctrl-alt",
});
// Bind a callback to item
itemc = new gui.MenuItem({
label: "Click me",
click: function() {
console.log("I'm clicked");
},
key: "s",
modifiers: "ctrl-alt",
});
// You can have submenu!
var submenu = new gui.Menu();
submenu.append(new gui.MenuItem({ label: 'Item 1' }));
submenu.append(new gui.MenuItem({ label: 'Item 2' }));
submenu.append(new gui.MenuItem({ label: 'Item 3' }));
itemc.submenu = submenu;
// You can have submenu!
var submenu = new gui.Menu();
submenu.append(new gui.MenuItem({ label: 'Item 1' }));
submenu.append(new gui.MenuItem({ label: 'Item 2' }));
submenu.append(new gui.MenuItem({ label: 'Item 3' }));
itemc.submenu = submenu;
// And everything can be changed at runtime
itemc.label = 'New label';
itemc.click = function() { console.log('New click callback'); };
// And everything can be changed at runtime
itemc.label = 'New label';
itemc.click = function() { console.log('New click callback'); };
/* APP */
// Print arguments
console.log(gui.App.argv);
// Print arguments
console.log(gui.App.argv);
// Quit current app
gui.App.quit();
// Quit current app
gui.App.quit();
// Get the name field in manifest
gui.App.manifest.name
// Get the name field in manifest
gui.App.manifest.name
gui.App.addOriginAccessWhitelistEntry('http://github.com/', 'app', 'myapp', true);
gui.App.addOriginAccessWhitelistEntry('http://github.com/', 'app', 'myapp', true);
/* CLIPBOARD */
// We can not create a clipboard, we have to receive the system clipboard
var clipboard = gui.Clipboard.get();
// We can not create a clipboard, we have to receive the system clipboard
var clipboard = gui.Clipboard.get();
// Read from clipboard
var text = clipboard.get('text');
console.log(text);
// Read from clipboard
var text = clipboard.get('text');
console.log(text);
// Or write something
clipboard.set('I love node-webkit :)', 'text');
// Or write something
clipboard.set('I love node-webkit :)', 'text');
// And clear it!
clipboard.clear();
// And clear it!
clipboard.clear();
/* TRAY */
// Create a tray icon
var tray = new gui.Tray({ title: 'Tray', icon: 'img/icon.png' });
// Create a tray icon
var tray = new gui.Tray({ title: 'Tray', icon: 'img/icon.png' });
// Give it a menu
var menu = new gui.Menu();
menu.append(new gui.MenuItem({ type: 'checkbox', label: 'box1' }));
tray.menu = menu;
// Give it a menu
var menu = new gui.Menu();
menu.append(new gui.MenuItem({ type: 'checkbox', label: 'box1' }));
tray.menu = menu;
// Remove the tray
tray.remove();
tray = null;
// Remove the tray
tray.remove();
tray = null;
/* SHELL */
// Open URL with default browser.
gui.Shell.openExternal('https://github.com/rogerwang/node-webkit');
// Open URL with default browser.
gui.Shell.openExternal('https://github.com/rogerwang/node-webkit');
// Open a text file with default text editor.
gui.Shell.openItem('test.txt');
// Open a text file with default text editor.
gui.Shell.openItem('test.txt');
// Open a file in file explorer.
gui.Shell.showItemInFolder('test.txt');
// Open a file in file explorer.
gui.Shell.showItemInFolder('test.txt');

View File

@@ -1,6 +1,4 @@
/// <reference path="on-headers.d.ts"/>
import http = require('http')
import http = require('http')
import onHeaders = require('on-headers')
http.createServer(onRequest)

View File

@@ -1,6 +1,3 @@
/// <reference path="../xmldom/xmldom.d.ts" />
import osmtogeojson from 'osmtogeojson';
import {OsmJSON, GeoJSON} from 'osmtogeojson';
import * as xmldom from 'xmldom';

View File

@@ -35,7 +35,7 @@ p3.map(fib).then(log);
var p4 = new Parallel([0, 1, 2, 3, 4, 5, 6, 7, 8]);
function add(d: number[]) { return d[0] + d[1]; }
function factorial(n: number) { return n < 2 ? 1 : n * factorial(n - 1); }
function factorial(n: number): number { return n < 2 ? 1 : n * factorial(n - 1); }
p4.require(factorial);
@@ -44,7 +44,7 @@ p4.map(function (n: number) { return Math.pow(10, n); }).reduce(add).then(log);
var p5 = new Parallel([1, 2, 3]);
function dbl(n) { return n * 2; }
function dbl(n: number) { return n * 2; }
p5.map(dbl).map(dbl).map(dbl).then(function (data) {
console.log(data); // logs [8, 16, 24]

View File

@@ -1,5 +1,3 @@
/// <reference path="./path-parse.d.ts"/>
import * as parse from "path-parse";
const parsed = parse("/foo/bar.img");

46
persona/persona.d.ts vendored
View File

@@ -6,42 +6,42 @@
declare namespace Persona {
export interface WatchOptions {
loggedInUser: String
onlogin: (String) => void
onlogout: () => void
onready?: () => void
loggedInUser: string;
onlogin: (s: string) => void;
onlogout: () => void;
onready?: () => void;
}
export interface RequestOptions {
backgroundColor?: String
siteName?: String
siteLogo?: String
termsOfService?: String
privacyPolicy?: String
returnTo?: String
oncancel?: () => void
backgroundColor?: string;
siteName?: string;
siteLogo?: string;
termsOfService?: string;
privacyPolicy?: string;
returnTo?: string;
oncancel?: () => void;
}
export interface GetOptions {
backgroundColor?: String
siteName?: String
siteLogo?: String
termsOfService?: String
privacyPolicy?: String
backgroundColor?: string;
siteName?: string;
siteLogo?: string;
termsOfService?: string;
privacyPolicy?: string;
}
export interface Persona {
watch( options: WatchOptions ): void
request( options: RequestOptions ): void
request(): void
logout(): void
get( gotAssertion: (String) => void ): void
get( gotAssertion: (String) => void, options: GetOptions ): void
watch(options: WatchOptions): void;
request(options: RequestOptions): void;
request(): void;
logout(): void;
get(gotAssertion: (s: string) => void): void;
get(gotAssertion: (s: string) => void, options: GetOptions): void;
}
}
interface Navigator {
id: Persona.Persona
id: Persona.Persona;
}

View File

@@ -1,4 +1,5 @@
{
"files": ["phatom.d.ts", "phantom-tests.ts"],
"compilerOptions": {
"module": "commonjs",
"target": "es6",

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../"
}

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../../"
}

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../"
}

View File

@@ -1,4 +1,5 @@
{
"files": ["postal.d.ts", "postal-tests.ts"],
"compilerOptions": {
"module": "commonjs",
"target": "es6",

View File

@@ -19,7 +19,7 @@ assert.throws(() => {
}, undefined, "DODGED IT");
assert.doesNotThrow(() => {
if (false) {
if (!!false) {
throw "a hammer at your face";
}
}, undefined, "What the...*crunch*");
@@ -44,7 +44,7 @@ customizedAssert1.throws(() => {
}, undefined, "DODGED IT");
customizedAssert1.doesNotThrow(() => {
if (false) {
if (!!false) {
throw "a hammer at your face";
}
}, undefined, "What the...*crunch*");

View File

@@ -1,8 +1,5 @@
/// <reference path="progress.d.ts"/>
var ProgressBar = require('progress');
/**
* Usage example from https://github.com/tj/node-progress
*/

View File

@@ -2,6 +2,8 @@
import helpers = require('protractor-helpers');
declare var $$: any, $: any, by: any, element: any; // ??
function testElementArrayFinder() {
var single1 : protractor.ElementFinder = $$('.foo').getByText('Hello');

View File

@@ -1,5 +1,3 @@
/// <reference path="pure-render-decorator.d.ts"/>
import * as PureRender from 'pure-render-decorator';
@PureRender

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"experimentalDecorators": true
}
}

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../"
}

View File

@@ -4,6 +4,8 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react",
"experimentalDecorators": true
}
}

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": false,
"baseUrl": "../"
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -1,4 +1,3 @@
/// <reference path="react-fa.d.ts"/>
/// <reference path="../react/react-dom.d.ts"/>
import * as React from "react";

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -1,9 +1,11 @@
{
"files": ["react-intl.d.ts", "react-intl-tests.ts"],
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -4,6 +4,8 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react",
"experimentalDecorators": true
}
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "preserve"
}
}

View File

@@ -1,9 +1,11 @@
{
"files": ["react-router.d.ts", "react-router-tests.tsx"],
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -1,9 +1,11 @@
{
"files": ["react-select.d.ts", "react-select-tests.tsx"],
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -1,5 +1,3 @@
/// <reference path="react-tap-event-plugin.d.ts"/>
import * as injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -7,4 +7,4 @@
import { Middleware } from 'redux';
export declare default function createDebounce(): Middleware;
export default function createDebounce(): Middleware;

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -35,4 +35,4 @@ interface ILogMonitorProps {
preserveScrollTop?: boolean
}
export declare default class LogMonitor extends React.Component<ILogMonitorProps, any> { }
export default class LogMonitor extends React.Component<ILogMonitorProps, any> { }

View File

@@ -4,6 +4,7 @@
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../"
"baseUrl": "../",
"jsx": "react"
}
}

View File

@@ -6,16 +6,16 @@
/// <reference path="../react/react.d.ts" />
import * as React from 'react'
import * as React from 'react';
interface IDevTools {
new (): JSX.ElementClass
instrument(): Function
new (): JSX.ElementClass;
instrument(): Function;
}
export declare function createDevTools(el: React.ReactElement<any>): IDevTools
export declare function persistState(debugSessionKey: string): Function
export declare function createDevTools(el: React.ReactElement<any>): IDevTools;
export declare function persistState(debugSessionKey: string): Function;
declare var factory: { instrument(): Function }
declare var factory: { instrument(): Function };
export default factory;

View File

@@ -3,8 +3,8 @@
/// <reference path="../react/react.d.ts" />
import { compose, createStore, applyMiddleware, Middleware, Reducer } from 'redux';
import { devTools, persistState } from 'redux-devtools';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
import { createDevTools as devTools, persistState } from 'redux-devtools';
import { LogMonitor } from 'redux-devtools-log-monitor';
import * as React from 'react';
import { Component } from 'react';
@@ -19,9 +19,9 @@ const finalCreateStore = compose(
// Enables your middleware:
applyMiddleware(m1, m2, m3), // any Redux middleware, e.g. redux-thunk
// Provides support for DevTools:
devTools(),
devTools(null),
// Lets you write ?debug_session=<name> in address bar to persist debug sessions
persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/))
persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/)[0])
)(createStore);
const store = finalCreateStore(reducer);
@@ -32,9 +32,6 @@ class Root extends Component<any, any> {
<Provider store={store}>
{() => <CounterApp />}
</Provider>
<DebugPanel top right bottom>
<DevTools store={store} monitor={LogMonitor} />
</DebugPanel>
</div>
);
}
@@ -51,11 +48,6 @@ class App extends Component<any, any> {
<Provider store={store}>
{() => <CounterApp />}
</Provider>
<DebugPanel top right bottom>
<DevTools store={store}
monitor={LogMonitor}
visibleOnLoad={true} />
</DebugPanel>
</div>
);
}

View File

@@ -1,4 +1,5 @@
{
"files": ["index.d.ts", "redux-devtools-tests.tsx"],
"compilerOptions": {
"module": "commonjs",
"target": "es6",

View File

@@ -3,10 +3,6 @@
// Definitions by: Paul Loyd <https://github.com/loyd>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../ref/ref.d.ts" />
import ref = require('ref');
/**

View File

@@ -1,5 +1,3 @@
/// <reference path="semaphore.d.ts"/>
import semaphore = require('semaphore');
var sem: semaphore.Semaphore = semaphore(10);

View File

@@ -1,5 +1,4 @@
/// <reference path="../socket.io/socket.io.d.ts"/>
/// <reference path="../redis/redis.d.ts"/>
/// <reference path="socket.io-redis.d.ts"/>
import socketIO = require('socket.io');

View File

@@ -2,7 +2,6 @@
/// <reference path="sql.js.d.ts" />
import fs = require("fs");
import SQL = require("sql.js");
var DB_PATH = "data.db";
@@ -14,7 +13,7 @@ function createFile(path: string): void {
// Open the database file. If it does not exist, create a blank database in memory.
var databaseData: Buffer;
databaseData = fs.existsSync(DB_PATH) ? fs.readFileSync(DB_PATH) : null;
var db = new SQL.Database(databaseData);
var db = new Database(databaseData);
// Create a new table 'test_table' in the database in memory.
var createTableStatement =

2
sql.js/sql.js.d.ts vendored
View File

@@ -5,8 +5,6 @@
/// <reference path="../node/node.d.ts" />
declare class Database {
constructor(data: Buffer);
constructor(data: Uint8Array);

View File

@@ -1,5 +1,5 @@
import Squire = require('Squire');
import Squire = require('squirejs');
// Default Configuration
var injector = new Squire();

View File

@@ -26,6 +26,6 @@ tempfs.mkdir({
if (err) { throw err; }
console.log(dir.path, dir.recursive);
throw new Error('Since it is tracked, tempfs will remove it for you.');
dir.unlink();
throw new Error('Since it is tracked, tempfs will remove it for you.');
});

1
yosay/index.d.ts vendored
View File

@@ -3,6 +3,5 @@
// Definitions by: Kentaro Okuno <http://github.com/armorik83>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function yosay(message?: string, options?: { maxLength: number }): string;
export = yosay;

View File

@@ -1,3 +1,2 @@
import yosay = require('yosay');
yosay('Welcome to the generator!', {maxLength: 20});