Fix build failures

This commit is contained in:
Andy Hanson 2016-09-23 09:21:15 -07:00
parent b7882e2361
commit 25e287b4ff
5 changed files with 44 additions and 59 deletions

View File

@ -1,6 +1,3 @@
/// <reference path="../d3/d3.d.ts" />
/// <reference path="d3-tip.d.ts" />
// test variables
interface dataType {
@ -8,7 +5,7 @@ interface dataType {
Number: number
}
let data: dataType[] = [ { Title: "one", Number: 1 }, { Title: "two", Number: 2} ];
let data: dataType[] = [ { Title: "one", Number: 1 }, { Title: "two", Number: 2} ];
let svgElement: SVGElement;
let root: HTMLElement;

4
d3-tip/index.d.ts vendored
View File

@ -3,9 +3,9 @@
// Definitions by: Gert Braspenning <https://github.com/brspnnggrt>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="d3" />
import {Primitive} from "d3";
declare namespace d3 {
declare module "d3" {
type TooltipDirection = ("n" | "s" | "e" | "w" | "nw" | "ne" | "sw" | "se");
interface Tooltip {
hide(): Tooltip;

View File

@ -1,5 +1,3 @@
/// <reference path="./imap-simple.d.ts" />
import * as imaps from "imap-simple";
let config = {

View File

@ -3,55 +3,54 @@
// Definitions by: Jeffery Grajkowski <https://github.com/pushplay/>
// Definitions: https://github.com/psnider/DefinitelyTyped/imap-simple
/// <reference types="imap" />
import Imap = require("imap");
declare namespace IMAPS {
export interface ImapSimpleOptions {
/** Options to pass to node-imap constructor. */
imap: Imap.Config;
export interface ImapSimpleOptions {
/** Options to pass to node-imap constructor. */
imap: IMAP.Config;
/** Time in milliseconds to wait before giving up on a connection attempt. (Deprecated: please use options.imap.authTimeout instead) */
connectTimeout?: number;
}
/** Time in milliseconds to wait before giving up on a connection attempt. (Deprecated: please use options.imap.authTimeout instead) */
connectTimeout?: number;
}
export interface MessageBodyPart extends Imap.ImapMessageBodyInfo {
/** string type where which=='TEXT', complex Object where which=='HEADER' */
body: any;
}
export interface MessageBodyPart extends IMAP.ImapMessageBodyInfo {
/** string type where which=='TEXT', complex Object where which=='HEADER' */
body: any;
}
export interface Message {
attributes: Imap.ImapMessageAttributes;
parts: MessageBodyPart[];
}
export interface Message {
attributes: IMAP.ImapMessageAttributes;
parts: MessageBodyPart[];
}
export class ImapSimple {
constructor(imap: Imap);
export class ImapSimple {
constructor(imap: IMAP.Connection);
/** Open a mailbox, calling the provided callback with signature (err, boxName), or resolves the returned promise with boxName. */
openBox(boxName: string, callback: (err: Error, boxName: string) => void): void;
openBox(boxName: string): Promise<string>;
/** Open a mailbox, calling the provided callback with signature (err, boxName), or resolves the returned promise with boxName. */
openBox(boxName: string, callback: (err: Error, boxName: string) => void): void;
openBox(boxName: string): Promise<string>;
/** Search for and retrieve mail in the previously opened mailbox. */
search(searchCriteria: any[], fetchOptions: Imap.FetchOptions, callback: (err: Error, messages: Message[]) => void): void;
search(searchCriteria: any[], fetchOptions: Imap.FetchOptions): Promise<Message[]>;
/** Search for and retrieve mail in the previously opened mailbox. */
search(searchCriteria: any[], fetchOptions: IMAP.FetchOptions, callback: (err: Error, messages: Message[]) => void): void;
search(searchCriteria: any[], fetchOptions: IMAP.FetchOptions): Promise<Message[]>;
/** Close the connection to the imap server. */
end(): void;
/** Close the connection to the imap server. */
end(): void;
/** Downloads part data (which is either part of the message body, or an attachment). Upon success, either the provided callback will be called with signature (err, data), or the returned promise will be resolved with data. The data will be automatically decoded based on its encoding. If the encoding of the part is not supported, an error will occur. */
getPartData(message: Message, part: any, callback: (err: Error, data: any) => void): void;
getPartData(message: Message, part: any): Promise<any>;
/** Downloads part data (which is either part of the message body, or an attachment). Upon success, either the provided callback will be called with signature (err, data), or the returned promise will be resolved with data. The data will be automatically decoded based on its encoding. If the encoding of the part is not supported, an error will occur. */
getPartData(message: Message, part: any, callback: (err: Error, data: any) => void): void;
getPartData(message: Message, part: any): Promise<any>;
/** Adds the provided label(s) to the specified message(s). source corresponds to a node-imap MessageSource which specifies the messages to be moved. label is either a string or array of strings indicating the labels to add. When completed, either calls the provided callback with signature (err), or resolves the returned promise. */
addMessageLabel(source: string | string[], label: string | string[], callback: (err: Error) => void): void;
addMessageLabel(source: string | string[], label: string | string[]): Promise<void>;
/** Adds the provided label(s) to the specified message(s). source corresponds to a node-imap MessageSource which specifies the messages to be moved. label is either a string or array of strings indicating the labels to add. When completed, either calls the provided callback with signature (err), or resolves the returned promise. */
addMessageLabel(source: string | string[], label: string | string[], callback: (err: Error) => void): void;
addMessageLabel(source: string | string[], label: string | string[]): Promise<void>;
/** Moves the specified message(s) in the currently open mailbox to another mailbox. source corresponds to a node-imap MessageSource which specifies the messages to be moved. When completed, either calls the provided callback with signature (err), or resolves the returned promise. */
moveMessage(source: string | string[], boxName: string, callback: (err: Error) => void): void;
moveMessage(source: string | string[], boxName: string): Promise<void>;
}
/** Moves the specified message(s) in the currently open mailbox to another mailbox. source corresponds to a node-imap MessageSource which specifies the messages to be moved. When completed, either calls the provided callback with signature (err), or resolves the returned promise. */
moveMessage(source: string | string[], boxName: string, callback: (err: Error) => void): void;
moveMessage(source: string | string[], boxName: string): Promise<void>;
}
export namespace errors {
/** Error thrown when a connection attempt has timed out. */
export class ConnectionTimeoutError extends Error {
timeout: number;
@ -59,17 +58,10 @@ declare namespace IMAPS {
}
}
declare module "imap-simple" {
/** Main entry point. Connect to an Imap server. */
export function connect(options: IMAPS.ImapSimpleOptions, callback: (err: Error, connection: IMAPS.ImapSimple) => void): void;
export function connect(options: IMAPS.ImapSimpleOptions): Promise<IMAPS.ImapSimple>;
export namespace errors {
export import ConnectionTimeoutError = IMAPS.ConnectionTimeoutError;
}
/** Main entry point. Connect to an Imap server. */
export function connect(options: ImapSimpleOptions, callback: (err: Error, connection: ImapSimple) => void): void;
export function connect(options: ImapSimpleOptions): Promise<ImapSimple>;
export import ImapSimple = IMAPS.ImapSimple;
/** Given the message.attributes.struct, retrieve a flattened array of parts objects that describe the structure of the different parts of the message's body. Useful for getting a simple list to iterate for the purposes of, for example, finding all attachments. */
export function getParts(struct: any[]): any[];
}
/** Given the message.attributes.struct, retrieve a flattened array of parts objects that describe the structure of the different parts of the message's body. Useful for getting a simple list to iterate for the purposes of, for example, finding all attachments. */
export function getParts(struct: any[]): any[];

View File

@ -1,6 +1,4 @@
// These examples adapted from Mapbox's examples (https://www.mapbox.com/mapbox-gl-js/examples)
/// <reference path="./mapbox-gl.d.ts" />
/// <reference path="../geojson/geojson.d.ts" />
/**
* Set API Access Token