Even more 2.0 (#12503)

* Always use forceConsistentCasingInFileNames

* Rename files

* Convert more packages to `types-2.0` style
This commit is contained in:
Andy 2016-11-05 13:34:11 -07:00 committed by GitHub
parent 0c861b0b4c
commit d2150a603f
94 changed files with 779 additions and 431 deletions

View File

@ -13,6 +13,6 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": false
"forceConsistentCasingInFileNames": true
}
}

View File

@ -13,6 +13,6 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": false
"forceConsistentCasingInFileNames": true
}
}

View File

@ -14,6 +14,6 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": false
"forceConsistentCasingInFileNames": true
}
}

View File

@ -15,6 +15,6 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": false
"forceConsistentCasingInFileNames": true
}
}

View File

@ -14,6 +14,6 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": false
"forceConsistentCasingInFileNames": true
}
}

View File

@ -14,6 +14,6 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": false
"forceConsistentCasingInFileNames": true
}
}

View File

@ -14,6 +14,6 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": false
"forceConsistentCasingInFileNames": true
}
}

View File

@ -14,6 +14,6 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": false
"forceConsistentCasingInFileNames": true
}
}

View File

@ -14,6 +14,6 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": false
"forceConsistentCasingInFileNames": true
}
}

View File

@ -14,6 +14,6 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": false
"forceConsistentCasingInFileNames": true
}
}

View File

@ -14,6 +14,6 @@
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": false
"forceConsistentCasingInFileNames": true
}
}

View File

@ -1,6 +1,4 @@
/// <reference path="async-polling.d.ts" />
import * as AsyncPolling from "async-polling";
import AsyncPolling = require("async-polling");
// Tests based on examples in https://github.com/cGuille/async-polling#readme

View File

@ -1,18 +0,0 @@
// Type definitions for AsyncPolling
// Project: https://github.com/cGuille/async-polling
// Definitions by: Zlatko Andonovski <https://github.com/Goldsmith42/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "async-polling" {
module AsyncPolling {
export type EventName = "run"|"start"|"error"|"result"|"end"|"schedule"|"stop";
}
function AsyncPolling<Result>(pollingFunc: (end: (err?: Error, result?: Result) => any) => any, delay: number): {
run: () => any;
stop: () => any;
on: (eventName: AsyncPolling.EventName, listener: Function) => any;
}
export = AsyncPolling;
}

16
async-polling/index.d.ts vendored Normal file
View File

@ -0,0 +1,16 @@
// Type definitions for AsyncPolling
// Project: https://github.com/cGuille/async-polling
// Definitions by: Zlatko Andonovski <https://github.com/Goldsmith42/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace AsyncPolling {
export type EventName = "run"|"start"|"error"|"result"|"end"|"schedule"|"stop";
}
declare function AsyncPolling<Result>(pollingFunc: (end: (err?: Error, result?: Result) => any) => any, delay: number): {
run: () => any;
stop: () => any;
on: (eventName: AsyncPolling.EventName, listener: Function) => any;
}
export = AsyncPolling;

View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"async-polling-tests.ts"
]
}

View File

@ -1,5 +1,3 @@
/// <reference path="awesomplete.d.ts" />
var input = document.getElementById("myinput");
new Awesomplete(input, {list: "#mylist"});

19
awesomplete/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"awesomplete-tests.ts"
]
}

View File

@ -1,10 +1,9 @@
/// <reference path="./bases.d.ts" />
import * as bases from 'bases';
let bs16String: string = bases.toBase(200, 16); // => 'c8'
let bs62String: string = bases.toBase(99999, 62); // => 'q0T'
let customBaseString: string = bases.toAlphabet(300, 'aAbBcC'); // => 'Abba'
let frombs16Int: number = bases.fromBase('c8', 16); // => 200
let frombs62Int: number = bases.fromBase('q0T', 62); // => 99999
let customBaseInt: number = bases.fromAlphabet('Abba', 'aAbBcC'); // => 300
let bs16String: string = bases.toBase(200, 16); // => 'c8'
let bs62String: string = bases.toBase(99999, 62); // => 'q0T'
let customBaseString: string = bases.toAlphabet(300, 'aAbBcC'); // => 'Abba'
let frombs16Int: number = bases.fromBase('c8', 16); // => 200
let frombs62Int: number = bases.fromBase('q0T', 62); // => 99999
let customBaseInt: number = bases.fromAlphabet('Abba', 'aAbBcC'); // => 300

22
bases/bases.d.ts vendored
View File

@ -1,22 +0,0 @@
// Type definitions for bases 0.2.1
// Project: https://github.com/aseemk/bases.js
// Definitions by: Hari Krishna <https://github.com/harikv>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "bases" {
export function toAlphabet(num: number, alphabet: string): string;
export function fromAlphabet(str: string, alphabet: string): number;
export function toBase(num: number, base: number): string;
export function fromBase(str: string, base:number): number;
export let KNOWN_ALPHABETS: any;
export let NUMERALS: string;
export let LETTERS_LOWERCASE: string;
export let LETTERS_UPPERCASE: string;
}

20
bases/index.d.ts vendored Normal file
View File

@ -0,0 +1,20 @@
// Type definitions for bases 0.2.1
// Project: https://github.com/aseemk/bases.js
// Definitions by: Hari Krishna <https://github.com/harikv>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function toAlphabet(num: number, alphabet: string): string;
export function fromAlphabet(str: string, alphabet: string): number;
export function toBase(num: number, base: number): string;
export function fromBase(str: string, base:number): number;
export let KNOWN_ALPHABETS: any;
export let NUMERALS: string;
export let LETTERS_LOWERCASE: string;
export let LETTERS_UPPERCASE: string;

19
bases/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"bases-tests.ts"
]
}

View File

@ -1,4 +1,3 @@
/// <reference path="bonjour.d.ts" />
import * as bonjour from 'bonjour';
var bonjourOptions: bonjour.BonjourOptions;

71
bonjour/bonjour.d.ts vendored
View File

@ -1,71 +0,0 @@
// Type definitions for bonjour v3.5.0
// Project: https://github.com/watson/bonjour
// Definitions by: Quentin Lampin <https://github.com/quentin-ol/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "bonjour" {
export interface BonjourOptions {
multicast?: boolean;
interface?: string;
port?: number;
ip?: string;
ttl?: number;
loopback?: boolean;
reuseAddr?: boolean;
}
export interface BrowserOptions {
type?: string;
subtypes?: string[];
protocol?: string;
txt?: Object;
}
export interface ServiceOptions {
name: string;
host?: string;
port: number;
type: string;
subtypes?: string[];
protocol?: 'udp'|'tcp';
txt?: Object;
}
export interface Service {
name: string;
type: string;
subtypes: string[];
protocol: string;
host: string;
port: number;
fqdn: string;
rawTxt: Object;
txt: Object;
published: boolean;
stop: (cb: ()=>any) => void;
start: () => void;
}
export class Bonjour {
constructor(opts: BonjourOptions);
publish(options: ServiceOptions):Service;
unpublishAll(cb: ()=>any): void;
find(options:BrowserOptions, onUp: ()=>any): Browser;
findOne(options:any, cb: (service: Service)=>any): Browser;
destroy():void;
}
export class Browser {
services: Service[];
start():void;
update():void;
stop():void;
}
export function find(options: BrowserOptions, onUp?: ()=>any): Browser;
export function findOne(options: BrowserOptions): Browser;
}

68
bonjour/index.d.ts vendored Normal file
View File

@ -0,0 +1,68 @@
// Type definitions for bonjour v3.5.0
// Project: https://github.com/watson/bonjour
// Definitions by: Quentin Lampin <https://github.com/quentin-ol/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface BonjourOptions {
multicast?: boolean;
interface?: string;
port?: number;
ip?: string;
ttl?: number;
loopback?: boolean;
reuseAddr?: boolean;
}
export interface BrowserOptions {
type?: string;
subtypes?: string[];
protocol?: string;
txt?: Object;
}
export interface ServiceOptions {
name: string;
host?: string;
port: number;
type: string;
subtypes?: string[];
protocol?: 'udp'|'tcp';
txt?: Object;
}
export interface Service {
name: string;
type: string;
subtypes: string[];
protocol: string;
host: string;
port: number;
fqdn: string;
rawTxt: Object;
txt: Object;
published: boolean;
stop: (cb: ()=>any) => void;
start: () => void;
}
export class Bonjour {
constructor(opts: BonjourOptions);
publish(options: ServiceOptions):Service;
unpublishAll(cb: ()=>any): void;
find(options:BrowserOptions, onUp: ()=>any): Browser;
findOne(options:any, cb: (service: Service)=>any): Browser;
destroy():void;
}
export class Browser {
services: Service[];
start():void;
update():void;
stop():void;
}
export function find(options: BrowserOptions, onUp?: ()=>any): Browser;
export function findOne(options: BrowserOptions): Browser;

19
bonjour/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"bonjour-tests.ts"
]
}

View File

@ -1,5 +1,3 @@
/// <reference path="chunked-dc.d.ts" />
// Chunker
let chunker = new Chunker(1337, Uint8Array.of(1,2,3), 2);

View File

@ -1 +0,0 @@
--target es2015 --noImplicitAny

19
chunked-dc/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"chunked-dc-tests.ts"
]
}

View File

@ -1,5 +1,3 @@
/// <reference path="clipboard-js.d.ts" />
clipboard.copy("Hello World");
clipboard.copy(document.body).then(() => console.log("success"));

View File

@ -13,6 +13,5 @@ declare namespace clipboard {
declare var clipboard: clipboard.IClipboardJsStatic;
declare module 'clipboard-js' {
export = clipboard;
}
export = clipboard;
export as namespace clipboard;

View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"clipboard-js-tests.ts"
]
}

View File

@ -1,8 +1,6 @@
/// <reference path="./ejson.d.ts" />
import {
clone as importedClone,
parse as importedParse,
clone as importedClone,
parse as importedParse,
stringify as importedStringify,
toJSONValue as importedToJSONValue,
fromJSONValue as importedFromJSONValue,

26
ejson/ejson.d.ts vendored
View File

@ -1,26 +0,0 @@
// Type definitions for ejson v2.1.2
// Project: https://www.npmjs.com/package/ejson
// Definitions by: Shantanu Bhadoria <https://github.com/shantanubhadoria>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "ejson" {
interface StringifyOptions {
canonical: boolean;
indent: boolean|number|string;
}
interface CloneOptions {
keyOrderSensitive: boolean;
}
function clone<T>(obj: T): T;
function parse(str: string): any;
function stringify(obj: any, options?: StringifyOptions): string;
function toJSONValue(obj: any): string;
function fromJSONValue(obj: string): any;
function isBinary(value: any): boolean;
function newBinary(len: number): Uint8Array;
function equals(a: any, b: any, options?: CloneOptions): boolean;
}

23
ejson/index.d.ts vendored Normal file
View File

@ -0,0 +1,23 @@
// Type definitions for ejson v2.1.2
// Project: https://www.npmjs.com/package/ejson
// Definitions by: Shantanu Bhadoria <https://github.com/shantanubhadoria>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface StringifyOptions {
canonical: boolean;
indent: boolean|number|string;
}
interface CloneOptions {
keyOrderSensitive: boolean;
}
export function clone<T>(obj: T): T;
export function parse(str: string): any;
export function stringify(obj: any, options?: StringifyOptions): string;
export function toJSONValue(obj: any): string;
export function fromJSONValue(obj: string): any;
export function isBinary(value: any): boolean;
export function newBinary(len: number): Uint8Array;
export function equals(a: any, b: any, options?: CloneOptions): boolean;

19
ejson/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"ejson-tests.ts"
]
}

View File

@ -1,5 +1,3 @@
/// <reference path="ldclient-js.d.ts" />
// Implicitly calls LDClient#identify
const ldClient = LDClient.initialize(
'ENV KEY',
@ -27,6 +25,6 @@ function changeCallback(changes: LaunchDarkly.LDFlagChangeset) {
ldClient.on('change', changeCallback);
document.getElementById('disable-change-tracking').addEventListener('click', () => {
document.getElementById('disable-change-tracking')!.addEventListener('click', () => {
ldClient.off('change', changeCallback);
});

19
ldclient-js/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"ldclient-js-tests.ts"
]
}

View File

@ -1,5 +1,3 @@
/// <reference path="qrcode.d.ts" />
import * as QRCode from 'qrcode';
QRCode.toDataURL('i am a pony!', function (err, url) {

19
qrcode/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"qrcode-tests.ts"
]
}

25
quoted-printable/index.d.ts vendored Normal file
View File

@ -0,0 +1,25 @@
// Type definitions for quoted-printable v0.2.1
// Project: https://github.com/mathiasbynens/quoted-printable
// Definitions by: Jeffery Grajkowski <https://github.com/pushplay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* A string representing the semantic version number.
*/
export const version: string;
/**
* This function takes an encoded byte string (the input
* parameter) and Quoted-Printable-encodes it. Each item
* in the input string represents an octet as per the
* desired character encoding.
*/
export function encode(input: string): string;
/**
* This function takes a string of text (the text parameter)
* and Quoted-Printable-decodes it. The return value is a
* byte string, i.e. a string of which each item represents
* an octet as per the character encoding thats being used.
*/
export function decode(input: string): string;

View File

@ -1,6 +1,3 @@
/// <reference path="./quoted-printable.d.ts" />
/// <reference path="../utf8/utf8.d.ts" />
import * as quotedPrintable from "quoted-printable";
import * as utf8 from "utf8";

View File

@ -1,27 +0,0 @@
// Type definitions for quoted-printable v0.2.1
// Project: https://github.com/mathiasbynens/quoted-printable
// Definitions by: Jeffery Grajkowski <https://github.com/pushplay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "quoted-printable" {
/**
* A string representing the semantic version number.
*/
export const version: string;
/**
* This function takes an encoded byte string (the input
* parameter) and Quoted-Printable-encodes it. Each item
* in the input string represents an octet as per the
* desired character encoding.
*/
export function encode(input: string): string;
/**
* This function takes a string of text (the text parameter)
* and Quoted-Printable-decodes it. The return value is a
* byte string, i.e. a string of which each item represents
* an octet as per the character encoding thats being used.
*/
export function decode(input: string): string;
}

View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"quoted-printable-tests.ts"
]
}

25
react-native-orientation/index.d.ts vendored Normal file
View File

@ -0,0 +1,25 @@
// Type definitions for react-native-orientation
// Project: https://github.com/yamill/react-native-orientation
// Definitions by: Moshe Atlow <https://github.com/MoLow/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace Orientation {
type orientation = "LANDSCAPE" | "PORTRAIT" | "UNKNOWN" | "PORTRAITUPSIDEDOWN";
type specificOrientation = "LANDSCAPE-LEFT" | "LANDSCAPE-RIGHT" | "PORTRAIT" | "UNKNOWN" | "PORTRAITUPSIDEDOWN";
export function addOrientationListener(callback: (orientation: orientation) => void): void;
export function removeOrientationListener(callback: (orientation: orientation) => void): void;
export function addSpecificOrientationListener(callback: (specificOrientation: specificOrientation) => void): void;
export function removeSpecificOrientationListener(callback: (specificOrientation: specificOrientation) => void): void;
export function getInitialOrientation(): orientation;
export function lockToPortrait(): void;
export function lockToLandscape(): void;
export function lockToLandscapeLeft(): void;
export function lockToLandscapeRight(): void;
export function unlockAllOrientations(): void;
export function getOrientation(callback: (err: Error, orientation: orientation) => void): void;
export function getSpecificOrientation(callback: (err: Error, orientation: specificOrientation) => void): void;
}
export = Orientation;

View File

@ -1,5 +1,3 @@
/// <reference path="react-native-orientation.d.ts" />
import * as Orientation from 'react-native-orientation';
Orientation.addOrientationListener((orientation)=>{});

View File

@ -1,28 +0,0 @@
// Type definitions for react-native-orientation
// Project: https://github.com/yamill/react-native-orientation
// Definitions by: Moshe Atlow <https://github.com/MoLow/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'react-native-orientation' {
namespace Orientation {
type orientation = "LANDSCAPE" | "PORTRAIT" | "UNKNOWN" | "PORTRAITUPSIDEDOWN";
type specificOrientation = "LANDSCAPE-LEFT" | "LANDSCAPE-RIGHT" | "PORTRAIT" | "UNKNOWN" | "PORTRAITUPSIDEDOWN";
export function addOrientationListener(callback: (orientation: orientation) => void): void;
export function removeOrientationListener(callback: (orientation: orientation) => void): void;
export function addSpecificOrientationListener(callback: (specificOrientation: specificOrientation) => void): void;
export function removeSpecificOrientationListener(callback: (specificOrientation: specificOrientation) => void): void;
export function getInitialOrientation(): orientation;
export function lockToPortrait(): void;
export function lockToLandscape(): void;
export function lockToLandscapeLeft(): void;
export function lockToLandscapeRight(): void;
export function unlockAllOrientations(): void;
export function getOrientation(callback: (err: Error, orientation: orientation) => void): void;
export function getSpecificOrientation(callback: (err: Error, orientation: specificOrientation) => void): void;
}
export = Orientation;
}

View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"react-native-orientation-tests.ts"
]
}

31
request-promise-native/index.d.ts vendored Normal file
View File

@ -0,0 +1,31 @@
// Type definitions for request-promise-native v1.0.3
// Project: https://github.com/request/request-promise-native
// Definitions by: Gustavo Henke <https://github.com/gustavohenke>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import request = require('request');
import http = require('http');
declare namespace requestPromise {
interface RequestPromise extends request.Request {
then<TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>;
then<TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): Promise<TResult>;
catch(onrejected?: (reason: any) => any | PromiseLike<any>): Promise<any>;
catch(onrejected?: (reason: any) => void): Promise<any>;
promise(): Promise<any>;
cancel(): void;
}
interface RequestPromiseOptions extends request.CoreOptions {
simple?: boolean;
transform?: (body: any, response: http.IncomingMessage, resolveWithFullResponse?: boolean) => any;
resolveWithFullResponse?: boolean;
}
export type OptionsWithUri = request.UriOptions & RequestPromiseOptions;
export type OptionsWithUrl = request.UrlOptions & RequestPromiseOptions;
export type Options = OptionsWithUri | OptionsWithUrl;
}
declare var requestPromise: request.RequestAPI<requestPromise.RequestPromise, requestPromise.RequestPromiseOptions, request.RequiredUriUrl>;
export = requestPromise;

View File

@ -1,5 +1,3 @@
/// <reference path="request-promise-native.d.ts" />
import * as rp from 'request-promise-native';
rp('http://www.google.com')

View File

@ -1,35 +0,0 @@
// Type definitions for request-promise-native v1.0.3
// Project: https://github.com/request/request-promise-native
// Definitions by: Gustavo Henke <https://github.com/gustavohenke>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../request/request.d.ts" />
declare module 'request-promise-native' {
import request = require('request');
import http = require('http');
namespace requestPromise {
interface RequestPromise extends request.Request {
then<TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>;
then<TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): Promise<TResult>;
catch(onrejected?: (reason: any) => any | PromiseLike<any>): Promise<any>;
catch(onrejected?: (reason: any) => void): Promise<any>;
promise(): Promise<any>;
cancel(): void;
}
interface RequestPromiseOptions extends request.CoreOptions {
simple?: boolean;
transform?: (body: any, response: http.IncomingMessage, resolveWithFullResponse?: boolean) => any;
resolveWithFullResponse?: boolean;
}
export type OptionsWithUri = request.UriOptions & RequestPromiseOptions;
export type OptionsWithUrl = request.UrlOptions & RequestPromiseOptions;
export type Options = OptionsWithUri | OptionsWithUrl;
}
var requestPromise: request.RequestAPI<requestPromise.RequestPromise, requestPromise.RequestPromiseOptions, request.RequiredUriUrl>;
export = requestPromise;
}

View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"request-promise-native-tests.ts"
]
}

View File

@ -76,6 +76,5 @@ declare namespace SassGraph {
export function parseDir(dirpath: string, options?: Options): Graph;
}
declare module "sass-graph" {
export = SassGraph;
}
export = SassGraph;
export as namespace SassGraph;

View File

@ -1,5 +1,3 @@
/// <reference path="sass-graph.d.ts" />
import { parseFile, parseDir, Graph } from "sass-graph";
// Example copied from readme:

19
sass-graph/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"sass-graph-tests.ts"
]
}

View File

@ -1,5 +1,4 @@
/// <reference path="shopify-buy.d.ts" />
/// <reference path="../jquery/jquery.d.ts" />
/// <reference types="jquery" />
/* Build new ShopifyBuy client
============================================================ */

19
shopify-buy/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"shopify-buy-tests.ts"
]
}

View File

@ -1,4 +1,3 @@
/// <reference path="string-template.d.ts"/>
import * as format from "string-template";
import * as compile from "string-template/compile";
@ -6,21 +5,21 @@ import * as compile from "string-template/compile";
namespace format_tests {
let greeting: string;
// Format using an object hash with keys matching [0-9a-zA-Z]+
// Format using an object hash with keys matching [0-9a-zA-Z]+
greeting = format("Hello {name}, you have {count} unread messages", { name: "Robert", count: 12 })
// greeting -> "Hello Robert, you have 12 unread messages"
// greeting -> "Hello Robert, you have 12 unread messages"
// Format using a number indexed array
// Format using a number indexed array
greeting = format("Hello {0}, you have {1} unread messages", ["Robert", 12])
// greeting -> "Hello Robert, you have 12 unread messages"
// greeting -> "Hello Robert, you have 12 unread messages"
// Format using optional arguments
// Format using optional arguments
greeting = format("Hello {0}, you have {1} unread messages", "Robert", 12)
// greeting -> "Hello Robert, you have 12 unread messages"
// greeting -> "Hello Robert, you have 12 unread messages"
// Escape {} pairs by using double {{}}
// Escape {} pairs by using double {{}}
let text: string = format("{{0}}")
// text -> "{0}"
// text -> "{0}"
}
@ -28,14 +27,14 @@ namespace compile_tests {
{
let greetingTemplate = compile("Hello {0}, you have {1} unread messages", true)
// -> greetingTemplate generated using new Function
// -> greetingTemplate generated using new Function
let greeting = greetingTemplate("Robert", 12)
// -> "Hello Robert, you have 12 unread messages"
}
{
let greetingTemplate = compile("Hello {0}, you have {1} unread messages", true)
// -> greetingTemplate generated using new Function
// -> greetingTemplate generated using new Function
let greeting = greetingTemplate(["Robert", 12])
// -> "Hello Robert, you have 12 unread messages"

View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"string-template-tests.ts"
]
}

View File

@ -3,9 +3,9 @@
// Definitions by: York Yao <https://github.com/plantain-00/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
/// <reference types="node" />
declare module Tesseract {
declare namespace Tesseract {
type ImageLike = string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement
| CanvasRenderingContext2D | File | Blob | ImageData | Buffer;
interface Progress {
@ -141,9 +141,6 @@ declare module Tesseract {
}
}
declare module "tesseract.js" {
var Tesseract: Tesseract.TesseractStatic
export = Tesseract;
}
declare var Tesseract: Tesseract.TesseractStatic;
export = Tesseract;
export as namespace Tesseract;

View File

@ -1,36 +1,4 @@
/// <reference path="tesseract.js.d.ts" />
import * as TesseractLib from 'tesseract.js';
TesseractLib.recognize("./demo.png", {
lang: 'chi_sim',
}).progress(function (p) {
console.log('progress', p);
}).then(function (result) {
console.log(result.text)
});
TesseractLib.detect("./demo.png").then(function (result) {
console.log(result)
});
TesseractLib.recognize("./demo.png")
.progress(message => console.log(message))
.catch(err => console.error(err))
.then(result => console.log(result))
.finally(resultOrError => console.log(resultOrError));
var job1 = TesseractLib.recognize("./demo.png");
job1.progress(message => console.log(message));
job1.catch(err => console.error(err));
job1.then(result => console.log(result));
job1.finally(resultOrError => console.log(resultOrError));
TesseractLib.create({
workerPath: '/path/to/worker.js',
langPath: 'https://cdn.rawgit.com/naptha/tessdata/gh-pages/3.02/',
corePath: 'https://cdn.rawgit.com/naptha/tesseract.js-core/0.1.0/index.js',
});
import * as Tesseract from 'tesseract.js';
Tesseract.recognize("./demo.png", {
lang: 'chi_sim',
@ -50,11 +18,11 @@ Tesseract.recognize("./demo.png")
.then(result => console.log(result))
.finally(resultOrError => console.log(resultOrError));
var job2 = Tesseract.recognize("./demo.png");
job2.progress(message => console.log(message));
job2.catch(err => console.error(err));
job2.then(result => console.log(result));
job2.finally(resultOrError => console.log(resultOrError));
var job = Tesseract.recognize("./demo.png");
job.progress(message => console.log(message));
job.catch(err => console.error(err));
job.then(result => console.log(result));
job.finally(resultOrError => console.log(resultOrError));
Tesseract.create({
workerPath: '/path/to/worker.js',

View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"tesseract.js-tests.ts"
]
}

View File

@ -1,5 +1,3 @@
/// <reference path="timelinejs3.d.ts" />
let date1: TL.ITimelineDate = {
year: 1999,
month: 3,

19
timelinejs3/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"timelinejs3-tests.ts"
]
}

View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"uk.co.workingedge.phonegap.plugin.istablet-tests.ts"
]
}

View File

@ -1,3 +1 @@
/// <reference path="uk.co.workingedge.phonegap.plugin.istablet.d.ts" />
console.log("isTablet: "+window.isTablet);
console.log("isTablet: "+window.isTablet);

View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"uk.co.workingedge.phonegap.plugin.launchnavigator-tests.ts"
]
}

View File

@ -1,6 +1,4 @@
/// <reference path="uk.co.workingedge.phonegap.plugin.launchnavigator.d.ts" />
let app = launchnavigator.APP["GOOGLE_MAPS"];
let app = launchnavigator.APP["GOOGLE_MAPS"];
let platform = launchnavigator.PLATFORM["ANDROID"];
let destination = "Westminster, London, UK";

43
valid-url/index.d.ts vendored Normal file
View File

@ -0,0 +1,43 @@
// Type definitions for valid-url v1.0.9
// Project: https://github.com/ogt/valid-url
// Definitions by: Steve Hipwell <https://github.com/stevehipwell>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Is the value a well-formed uri?
* Returns the untainted URI if the test value appears to be well-formed. Note that you may really want one of the more practical methods like is_http_uri or is_https_uri, since the URI standard (RFC 3986) allows a lot of things you probably don't want.
* @param {string} value - The potential URI to test.
* @returns {string} - The untainted RFC 3986 URI on success, undefined on failure.
*/
export function isUri(value: any): string;
/**
* Is the value a well-formed HTTP uri?
* Specialized version of isUri() that only likes http:// urls. As a result, it can also do a much more thorough job validating. Also, unlike isUri() it is more concerned with only allowing real-world URIs through. Things like relative hostnames are allowed by the standards, but probably aren't wise. Conversely, null paths aren't allowed per RFC 2616 (should be '/' instead), but are allowed by this function.
*
* This function only works for fully-qualified URIs. /bob.html won't work. See RFC 3986 for the appropriate method to turn a relative URI into an absolute one given its context.
*
* Note that you probably want to either call this in combo with is_https_uri().
* i.e. if(isHttpUri(uri) || isHttpsUri(uri)) console.log('Good');
* or use the convenience method isWebUri which is equivalent.
* @param {string} value - The potential URI to test.
* @returns {string} - The untainted RFC 3986 URI on success, undefined on failure.
*/
export function isHttpUri(value: any): string;
/**
* Is the value a well-formed HTTPS uri?
*See is_http_uri() for details. This version only likes the https URI scheme. Otherwise it's identical to is_http_uri().
* @param {string} value - The potential URI to test.
* @returns {string} - The untainted RFC 3986 URI on success, undefined on failure.
*/
export function isHttpsUri(value: any): string;
/**
* Is the value a well-formed HTTP or HTTPS uri?
* This is just a convenience method that combines isHttpUri and isHttpsUri to accept most common real-world URLs.
* @param {string} value - The potential URI to test.
* @returns {string} - The untainted RFC 3986 URI on success, undefined on failure.
*/
export function isWebUri(value: any): string;

19
valid-url/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"valid-url-tests.ts"
]
}

View File

@ -1,5 +1,3 @@
/// <reference path="valid-url.d.ts"/>
import validUrl = require('valid-url');
function testIsUri() {

View File

@ -1,47 +0,0 @@
// Type definitions for valid-url v1.0.9
// Project: https://github.com/ogt/valid-url
// Definitions by: Steve Hipwell <https://github.com/stevehipwell>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'valid-url' {
/**
* Is the value a well-formed uri?
* Returns the untainted URI if the test value appears to be well-formed. Note that you may really want one of the more practical methods like is_http_uri or is_https_uri, since the URI standard (RFC 3986) allows a lot of things you probably don't want.
* @param {string} value - The potential URI to test.
* @returns {string} - The untainted RFC 3986 URI on success, undefined on failure.
*/
export function isUri(value: any): string;
/**
* Is the value a well-formed HTTP uri?
* Specialized version of isUri() that only likes http:// urls. As a result, it can also do a much more thorough job validating. Also, unlike isUri() it is more concerned with only allowing real-world URIs through. Things like relative hostnames are allowed by the standards, but probably aren't wise. Conversely, null paths aren't allowed per RFC 2616 (should be '/' instead), but are allowed by this function.
*
* This function only works for fully-qualified URIs. /bob.html won't work. See RFC 3986 for the appropriate method to turn a relative URI into an absolute one given its context.
*
* Note that you probably want to either call this in combo with is_https_uri().
* i.e. if(isHttpUri(uri) || isHttpsUri(uri)) console.log('Good');
* or use the convenience method isWebUri which is equivalent.
* @param {string} value - The potential URI to test.
* @returns {string} - The untainted RFC 3986 URI on success, undefined on failure.
*/
export function isHttpUri(value: any): string;
/**
* Is the value a well-formed HTTPS uri?
*See is_http_uri() for details. This version only likes the https URI scheme. Otherwise it's identical to is_http_uri().
* @param {string} value - The potential URI to test.
* @returns {string} - The untainted RFC 3986 URI on success, undefined on failure.
*/
export function isHttpsUri(value: any): string;
/**
* Is the value a well-formed HTTP or HTTPS uri?
* This is just a convenience method that combines isHttpUri and isHttpsUri to accept most common real-world URLs.
* @param {string} value - The potential URI to test.
* @returns {string} - The untainted RFC 3986 URI on success, undefined on failure.
*/
export function isWebUri(value: any): string;
}

19
vectorious/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"vectorious-tests.ts"
]
}

View File

@ -1,6 +1,4 @@
/// <reference path="vectorious.d.ts" />
import { Matrix, Vector } from './vectorious';
import { Matrix, Vector } from 'vectorious';
let vector: Vector;
let num: number;
@ -9,7 +7,7 @@ let str: string;
let numberArray: number[];
function testMatrix () {
const a = new Matrix([[1, 2, 3], [1, 2, 3], [1, 2, 3]]);
const b = new Matrix([[1, 2, 3], [1, 2, 3], [1, 2, 3]]);
@ -59,7 +57,7 @@ function testMatrix () {
}
function testVector () {
const a = new Vector([1, 2, 3]);
const b = new Vector([4, 5, 6]);

View File

@ -3,7 +3,7 @@
// Definitions by: Andrew Short <http://ajshort.me>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
/// <reference types="node" />
declare module 'xmlrpc' {
import { EventEmitter } from 'events';

19
xmlrpc/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"xmlrpc-tests.ts"
]
}

View File

@ -1,5 +1,3 @@
/// <reference path="xmlrpc.d.ts" />
import * as xmlrpc from 'xmlrpc';
const serverOpts = {

15
xtend/index.d.ts vendored Normal file
View File

@ -0,0 +1,15 @@
// Type definitions for xtend 4.0.1
// Project: https://github.com/Raynos/xtend
// Definitions by: rhysd <https://rhysd.github.io>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Xtend {
<T, U>(target: T, source: U): T & U;
<T, U, V>(target: T, source1: U, source2: V): T & U & V;
<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
<T, U, V, W, Q>(target: T, source1: U, source2: V, source3: W, source4: Q): T & U & V & W & Q;
<T, U, V, W, Q, R>(target: T, source1: U, source2: V, source3: W, source4: Q, source5: R): T & U & V & W & Q & R;
(target: any, ...sources: any[]): any;
}
declare const xtend: Xtend;
export = xtend;

19
xtend/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"xtend-tests.ts"
]
}

View File

@ -1,4 +1,3 @@
/// <reference path="xtend.d.ts" />
import * as xtend from "xtend";
interface Target {

17
xtend/xtend.d.ts vendored
View File

@ -1,17 +0,0 @@
// Type definitions for xtend 4.0.1
// Project: https://github.com/Raynos/xtend
// Definitions by: rhysd <https://rhysd.github.io>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "xtend" {
interface Xtend {
<T, U>(target: T, source: U): T & U;
<T, U, V>(target: T, source1: U, source2: V): T & U & V;
<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
<T, U, V, W, Q>(target: T, source1: U, source2: V, source3: W, source4: Q): T & U & V & W & Q;
<T, U, V, W, Q, R>(target: T, source1: U, source2: V, source3: W, source4: Q, source5: R): T & U & V & W & Q & R;
(target: any, ...sources: any[]): any;
}
const xtend: Xtend;
export = xtend;
}

View File

@ -57,7 +57,7 @@ interface XtermConstructor {
/**
* A terminal options.
*/
declare module Xterm {
declare namespace Xterm {
interface IOptions {
colors?: string[];
@ -85,8 +85,5 @@ declare module Xterm {
declare var Xterm: XtermConstructor;
declare module 'xterm' {
export = Xterm;
}
export = Xterm;
export as namespace Xterm;

19
xterm/tsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"xterm-tests.ts"
]
}

View File

@ -1,5 +1,3 @@
/// <reference path="xterm.d.ts" />
import * as Terminal from 'xterm';
declare var fetch: any;