Merge remote-tracking branch 'DefinitelyTyped/master'

This commit is contained in:
Steve Mayes
2016-02-29 20:08:56 -05:00
54 changed files with 18117 additions and 2707 deletions
+21
View File
@@ -0,0 +1,21 @@
/// <reference path='../angularjs/angular.d.ts' />
/// <reference path='angular-cookie.d.ts' />
angular.module('myApp', ['ipCookie'])
.controller('cookieController', ['ipCookie', function(ipCookie: angular.cookie.CookieService) {
ipCookie('key', 'value');
ipCookie('key', { value: 'value'});
ipCookie('key', [1, 2, 3]);
ipCookie('key', 'value', { expires: 21 });
ipCookie('key', 'value', { encode: function (value) { return value; } });
ipCookie();
ipCookie('key');
ipCookie('key', undefined, {decode: function (value) { return value; }});
ipCookie.remove('key');
ipCookie.remove('key', { path: '/some/path/' });
var obj: Object = '255';
}]);
+65
View File
@@ -0,0 +1,65 @@
// Type definitions for angular-cookie v4.1.0
// Project: https://github.com/ivpusic/angular-cookie
// Definitions by: Borislav Zhivkov <https://github.com/borislavjivkov>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module angular.cookie {
interface CookieService {
/**
* Get all cookies
*/
(): any;
/**
* Get a cookie with a specific key
*/
(key: string): any;
/**
* Create a cookie
*/
(key: string, value: any, options?: CookieOptions): any;
/**
* Remove a cookie
*/
remove(key: string, options?: CookieOptions): void;
}
interface CookieOptions {
/**
* The domain tells the browser to which domain the cookie should be sent. If you don't specify it, it becomes the domain of the page that sets the cookie.
*/
domain?: string;
/**
* The path gives you the chance to specify a directory where the cookie is active.
*/
path?: string;
/**
* Each cookie has an expiry date after which it is trashed. If you don't specify the expiry date the cookie is trashed when you close the browser.
*/
expires?: number;
/**
* Allows you to set the expiration time in hours, minutes, seconds, or `milliseconds. If this is not specified, any expiration time specified will default to days.
*/
expirationUnit?: string;
/**
* The Secure attribute is meant to keep cookie communication limited to encrypted transmission, directing browsers to use cookies only via secure/encrypted connections.
*/
secure?: boolean;
/**
* The method that will be used to encode the cookie value (should be passed when using Set).
*/
encode?: (value: any) => any;
/**
* The method that will be used to decode extracted cookie values (should be passed when using Get).
*/
decode?: (value: any) => any;
}
}
+12
View File
@@ -0,0 +1,12 @@
/// <reference path="./angular-load.d.ts" />
angular.module('app',['angularLoad'])
.run(['angularLoad',(angularLoad:angular.load.IAngularLoadService)=> {
angularLoad.loadScript("https://ajax.googleapis.com/ajax/libs/angular_material/1.0.4/angular-material.min.js").then(
()=>console.log("angular material js loaded")
);
angularLoad.loadCss("https://ajax.googleapis.com/ajax/libs/angular_material/1.0.4/angular-material.css").then(
()=>console.log("angular material css loaded")
);
}]);
+15
View File
@@ -0,0 +1,15 @@
// Type definitions for angular-load v0.4.1
// Project: https://github.com/urish/angular-load
// Definitions by: david-gang <https://github.com/david-gang>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module angular.load {
interface IAngularLoadService {
loadScript(url:string): ng.IPromise<any>;
loadCss(url:string): ng.IPromise<any>;
}
}
+3 -1
View File
@@ -165,7 +165,7 @@ declare module AtomCore {
}
interface ICommandRegistry {
add(selector: string, name: string, callback: (event: any) => void): void; // selector:'atom-editor'|'atom-workspace'
add(target: string, commandName: Object, callback?: (event: any) => void): any; // selector:'atom-editor'|'atom-workspace'
findCommands(params: Object): Object[];
dispatch(selector: any, name:string): void;
}
@@ -589,6 +589,7 @@ declare module AtomCore {
subscriptionCounts: any;
subscriptionsByObject: any; /* WeakMap */
subscriptions: Emissary.ISubscription[];
destroy():void;
mini: any;
@@ -780,6 +781,7 @@ declare module AtomCore {
moveCursorToNextWordBoundary():void;
moveCursorToBeginningOfNextParagraph():void;
moveCursorToBeginningOfPreviousParagraph():void;
moveToBottom():void;
scrollToCursorPosition(options:any):any;
pageUp():void;
pageDown():void;
+22
View File
@@ -18,11 +18,33 @@ axios.interceptors.request.use<any>(config => {
return config;
});
const requestId: number = axios.interceptors.request.use<any>(
(config) => {
console.log("Method:" + config.method + " Url:" +config.url);
return config;
},
(error: any) => error);
axios.interceptors.request.eject(requestId);
axios.interceptors.request.eject(7);
axios.interceptors.response.use<any>(config => {
console.log("Status:" + config.status);
return config;
});
const responseId: number = axios.interceptors.response.use<any>(
config => {
console.log("Status:" + config.status);
return config;
},
(error: any) => error);
axios.interceptors.response.eject(responseId);
axios.get<Repository>("https://api.github.com/repos/mzabriskie/axios")
.then(r => console.log(r.config.method));
+19 -3
View File
@@ -1,4 +1,4 @@
// Type definitions for axios 0.8.1
// Type definitions for axios 0.9.1
// Project: https://github.com/mzabriskie/axios
// Definitions by: Marcel Buesing <https://github.com/marcelbuesing>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -167,18 +167,34 @@ declare module Axios {
response: ResponseInterceptor
}
type InterceptorId = number;
interface RequestInterceptor {
/**
* <U> - request body data type
*/
use<U>(fn: (config: AxiosXHRConfig<U>) => AxiosXHRConfig<U>): void;
use<U>(fulfilledFn: (config: AxiosXHRConfig<U>) => AxiosXHRConfig<U>): InterceptorId;
use<U>(fulfilledFn: (config: AxiosXHRConfig<U>) => AxiosXHRConfig<U>,
rejectedFn: (error: any) => any)
: InterceptorId;
eject(interceptorId: InterceptorId): void;
}
interface ResponseInterceptor {
/**
* <T> - expected response type
*/
use<T>(fn: (config: AxiosXHR<T>) => AxiosXHR<T>): void;
use<T>(fulfilledFn: (config: Axios.AxiosXHR<T>) => Axios.AxiosXHR<T>): InterceptorId;
use<T>(fulfilledFn: (config: Axios.AxiosXHR<T>) => Axios.AxiosXHR<T>,
rejectedFn: (error: any) => any)
: InterceptorId;
eject(interceptorId: InterceptorId): void;
}
/**
File diff suppressed because it is too large Load Diff
+135
View File
@@ -0,0 +1,135 @@
// Type definitions for babyparse
// Project: https://github.com/Rich-Harris/BabyParse
// Definitions by: Charles Parker <https://github.com/cdiddy77>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module BabyParse {
interface Static {
/**
* Parse a csv string or a csv file
*/
parse(csvString: string, config?: ParseConfig): ParseResult;
/**
* Unparses javascript data objects and returns a csv string
*/
unparse(data: Array<Object>, config?: UnparseConfig): string;
unparse(data: Array<Array<any>>, config?: UnparseConfig): string;
unparse(data: UnparseObject, config?: UnparseConfig): string;
/**
* Read-Only Properties
*/
// An array of characters that are not allowed as delimiters.
BAD_DELIMETERS: Array<string>;
// The true delimiter. Invisible. ASCII code 30. Should be doing the job we strangely rely upon commas and tabs for.
RECORD_SEP: string;
// Also sometimes used as a delimiting character. ASCII code 31.
UNIT_SEP: string;
// Whether or not the browser supports HTML5 Web Workers. If false, worker: true will have no effect.
WORKERS_SUPPORTED: boolean;
// The relative path to Papa Parse. This is automatically detected when Papa Parse is loaded synchronously.
SCRIPT_PATH: string;
/**
* Configurable Properties
*/
// The size in bytes of each file chunk. Used when streaming files obtained from the DOM that exist on the local computer. Default 10 MB.
LocalChunkSize: string;
// Same as LocalChunkSize, but for downloading files from remote locations. Default 5 MB.
RemoteChunkSize: string;
// The delimiter used when it is left unspecified and cannot be detected automatically. Default is comma.
DefaultDelimiter: string;
/**
* On Papa there are actually more classes exposed
* but none of them are officially documented
* Since we can interact with the Parser from one of the callbacks
* I have included the API for this class.
*/
Parser: ParserConstructor;
}
interface ParseConfig {
delimiter?: string; // default: ""
newline?: string; // default: ""
header?: boolean; // default: false
dynamicTyping?: boolean; // default: false
preview?: number; // default: 0
encoding?: string; // default: ""
worker?: boolean; // default: false
comments?: boolean; // default: false
download?: boolean; // default: false
skipEmptyLines?: boolean; // default: false
fastMode?: boolean; // default: undefined
// Callbacks
step?(results: ParseResult, parser: Parser): void; // default: undefined
complete?(results: ParseResult): void; // default: undefined
}
interface UnparseConfig {
quotes?: boolean|boolean[]; // default: false
delimiter?: string; // default: ","
newline?: string; // default: "\r\n"
}
interface UnparseObject {
fields: Array<any>;
data: string | Array<any>;
}
interface ParseError {
type: string; // A generalization of the error
code: string; // Standardized error code
message: string; // Human-readable details
row: number; // Row index of parsed data where error is
}
interface ParseMeta {
delimiter: string; // Delimiter used
linebreak: string; // Line break sequence used
aborted: boolean; // Whether process was aborted
fields: Array<string>; // Array of field names
truncated: boolean; // Whether preview consumed all input
}
/**
* @interface ParseResult
*
* data: is an array of rows. If header is false, rows are arrays; otherwise they are objects of data keyed by the field name.
* errors: is an array of errors
* meta: contains extra information about the parse, such as delimiter used, the newline sequence, whether the process was aborted, etc. Properties in this object are not guaranteed to exist in all situations
*/
interface ParseResult {
data: Array<any>;
errors: Array<ParseError>;
meta: ParseMeta;
}
interface ParserConstructor { new (config: ParseConfig): Parser; }
interface Parser {
// Parses the input
parse(input: string): any;
// Sets the abort flag
abort(): void;
// Gets the cursor position
getCharIndex(): number;
}
}
declare var Baby:BabyParse.Static;
declare module "babyparse"{
var Baby:BabyParse.Static;
export = Baby;
}
@@ -0,0 +1,11 @@
/// <reference path="../cordova/plugins/Push.d.ts" />
/// <reference path="./cordova-plugin-insomnia.d.ts" />
window.plugins.insomnia.allowSleepAgain(
() => { console.log("success"); },
() => { console.log("fail"); }
);
window.plugins.insomnia.keepAwake(
() => { console.log("success"); },
() => { console.log("fail"); }
);
+24
View File
@@ -0,0 +1,24 @@
// Type definitions for Insomnia-PhoneGap-Plugin v4.0.1
// Project: https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin/
// Definitions by: Markus Wagner <https://github.com/Ritzlgrmft/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface Plugins {
insomnia: InsomniaPlugin.Insomnia;
}
declare module InsomniaPlugin {
export interface Insomnia {
/**
* Prevent the screen of the mobile device from falling asleep.
*/
keepAwake(success?: () => any, fail?: () => any): void;
/**
* After making your app practically a zombie, you can allow it to sleep again by calling allowSleepAgain.
*/
allowSleepAgain(success?: () => any, fail?: () => any): void;
}
}
+5
View File
@@ -24,6 +24,11 @@ var payments = crossfilter<Payment>([
{date: "2011-11-14T17:29:52Z", quantity: 1, total: 200, tip: 100, type: "visa"}
]);
var total_payments : number = payments.groupAll<number>().reduce(
function(p,v) { return p+=v.total; },
function(p,v) { return p-=v.total; },
function() { return 0; } ).value();
var paymentsByTotal = payments.dimension((d) => d.total);
// Filters
+11 -9
View File
@@ -58,12 +58,12 @@ declare module CrossFilter {
(array: T[], lo: number, hi: number): T[];
}
export interface GroupAll<T> {
reduce<TValue>(add: (p: TValue, v: T) => TValue, remove: (p: TValue, v: T) => TValue, initial: () => TValue): GroupAll<T>;
reduceCount(): GroupAll<T>;
reduceSum(value: Selector<T>): GroupAll<T>;
dispose(): GroupAll<T>;
value(): T;
export interface GroupAll<T, TValue> {
reduce<TValue>(add: (p: TValue, v: T) => TValue, remove: (p: TValue, v: T) => TValue, initial: () => TValue): GroupAll<T, TValue>;
reduceCount(): GroupAll<T, TValue>;
reduceSum(value: Selector<T>): GroupAll<T, TValue>;
dispose(): GroupAll<T, TValue>;
value(): TValue;
}
export interface Grouping<TKey, TValue> {
@@ -87,7 +87,8 @@ declare module CrossFilter {
add(records: T[]): CrossFilter<T>;
remove(): CrossFilter<T>;
size(): number;
groupAll(): GroupAll<T>;
GroupAll(): GroupAll<T, T>;
groupAll<TValue>(): GroupAll<T, TValue>;
dimension<TDimension>(value: (data: T) => TDimension): Dimension<T, TDimension>;
}
@@ -103,8 +104,9 @@ declare module CrossFilter {
bottom(k: number): T[];
dispose(): void;
group(): Group<T, TDimension, TDimension>;
group<TGroup>(groupValue: (data: TDimension) => TGroup): Group<T, TDimension, TGroup>;
groupAll(): GroupAll<T>;
group<TGroup>(groupValue: (data: TDimension) => TGroup): Group<T, TDimension, TGroup>;
groupAll(): GroupAll<T, T>;
groupAll<TValue>(): GroupAll<T, TValue>;
}
}
+25
View File
@@ -0,0 +1,25 @@
/// <reference path="fromnow.d.ts" />
import fromnow = require( 'fromnow' );
function dateOnly() {
fromnow( '2015-12-31' );
}
function maxChunks() {
fromnow( '2015-12-31', {
maxChunks: 12
});
}
function useAgo() {
fromnow( '2015-12-31', {
useAgo: true
});
}
function useAnd() {
fromnow( '2015-12-31', {
useAnd: true
});
}
+28
View File
@@ -0,0 +1,28 @@
// Type definitions for fromnow v2.0.0
// Project: https://github.com/lukeed/fromNow
// Definitions by: Martin Bukovics <https://github.com/marinewater>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module FromNow {
interface FromNowOpts {
maxChunks?: number,
useAgo?: boolean,
useAnd?: boolean
}
export interface FromNowStatic {
/**
* Get readable time differences from now vs past or future dates.
* @param {string} date
* @param {object} [opts]
* @param {number} [opts.maxChucks=10]
* @param {boolean} [opts.useAgo=false]
* @param {boolean} [opts.useAnd=false]
*/
(date: string, opts?: FromNowOpts): string
}
}
declare module 'fromnow' {
var FromNow: FromNow.FromNowStatic;
export = FromNow;
}
@@ -227,6 +227,10 @@ app.commandLine.appendSwitch('vmodule', 'console=0');
autoUpdater.setFeedURL('http://mycompany.com/myapp/latest?version=' + app.getVersion());
autoUpdater.checkForUpdates();
autoUpdater.quitAndInstall();
// browser-window
// https://github.com/atom/electron/blob/master/docs/api/browser-window.md
+5
View File
@@ -1186,6 +1186,11 @@ declare module Electron {
* before using this API
*/
checkForUpdates(): any;
/**
* Restarts the app and installs the update after it has been downloaded.
* It should only be called after update-downloaded has been emitted.
*/
quitAndInstall(): void;
}
module Dialog {
+29
View File
@@ -0,0 +1,29 @@
/// <reference path="./graphene-pk11.d.ts" />
import * as graphene from "graphene-pk11";
// Example of Hashing from README.MD <https://github.com/PeculiarVentures/graphene#hashing>
let Module = graphene.Module;
let lib = "/usr/local/lib/softhsm/libsofthsm2.so";
let mod = Module.load(lib, "SoftHSM");
mod.initialize();
let slot = mod.getSlots(0);
if (slot.flags & graphene.SlotFlag.TOKEN_PRESENT) {
let session = slot.open();
let digest = session.createDigest("sha1");
digest.update("simple text 1");
digest.update("simple text 2");
let hash = digest.final();
console.log("Hash SHA1:", hash.toString("hex")); // Hash SHA1: e1dc1e52e9779cd69679b3e0af87d2e288190d34
session.close();
}
else {
console.error("Slot is not initialized");
}
mod.finalize();
+2719
View File
File diff suppressed because it is too large Load Diff
+48
View File
@@ -0,0 +1,48 @@
/// <reference path="./inflected.d.ts" />
import * as Inflector from "inflected";
Inflector.pluralize("Category");
Inflector.singularize("Categories");
Inflector.camelize("nerd_bar", false);
Inflector.underscore('FooBar') // => 'foo_bar'
//Inflector.humanize('employee_salary') // => 'Employee salary'
//Inflector.humanize('author_id') // => 'Author'
Inflector.humanize('author_id', { capitalize: false }) // => 'author'
Inflector.titleize('man from the boondocks') // => 'Man From The Boondocks'
Inflector.titleize('x-men: the last stand') // => 'X Men: The Last Stand'
Inflector.titleize('TheManWithoutAPast') // => 'The Man Without A Past'
Inflector.titleize('raiders_of_the_lost_ark') // => 'Raiders Of The Lost Ark'
Inflector.tableize('RawScaledScorer') // => 'raw_scaled_scorers'
Inflector.tableize('egg_and_ham') // => 'egg_and_hams'
Inflector.tableize('fancyCategory') // => 'fancy_categories'
Inflector.classify('egg_and_hams') // => 'EggAndHam'
Inflector.classify('posts') // => 'Post'
Inflector.dasherize('puni_puni') // => 'puni-puni'
Inflector.foreignKey('Message') // => 'message_id'
Inflector.foreignKey('Message', false) // => 'messageid'
Inflector.ordinal(1) // => 'st'
Inflector.ordinal(2) // => 'nd'
Inflector.ordinal(1002) // => 'nd'
Inflector.ordinal(1003) // => 'rd'
Inflector.ordinal(-11) // => 'th'
Inflector.ordinal(-1021) // => 'st'
Inflector.ordinalize(1) // => '1st'
Inflector.ordinalize(2) // => '2nd'
Inflector.ordinalize(1002) // => '1002nd'
Inflector.ordinalize(1003) // => '1003rd'
Inflector.ordinalize(-11) // => '-11th'
Inflector.ordinalize(-1021) // => '-1021st'
Inflector.transliterate('Ærøskøbing') // => 'AEroskobing'
Inflector.parameterize('Donald E. Knuth') // => 'donald-e-knuth'
Inflector.parameterize('Donald E. Knuth', { separator: '+' }) // => 'donald+e+knuth'
+44
View File
@@ -0,0 +1,44 @@
// Type definitions for inflected 1.1.6
// Project: https://github.com/martinandert/inflected
// Definitions by: Daniel Schmidt <https://github.com/dsci>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "inflected" {
module Options {
interface Humanize {
capitalize: boolean;
}
interface Transliterate {
locale: string;
replacement: string;
}
interface Parameterize {
separator: string;
}
}
interface Inflected {
pluralize(word: string, locale?: string): string;
singularize(word: string, locale?: string): string;
camelize(term: string, uppercaseFirstLetter?: boolean): string;
underscore(camelCaseWord: string): string;
humanize(lowerCaseAndUnderscoredWord: string,
options?: Options.Humanize): string;
titleize(sentence: string): string;
tableize(className: string): string;
classify(tableName: string): string;
dasherize(underscoredWord: string): string;
foreignKey(className: string,
separateClassNameAndIdWithUnderscore?:boolean): string;
ordinal(number: number): string;
ordinalize(number: number): string;
transliterate(sentence: string, options?: Options.Transliterate): string;
parameterize(sentence: string, options?: Options.Parameterize): string;
}
var Inflector:Inflected;
export = Inflector;
}
+27 -3
View File
@@ -1,6 +1,8 @@
/// <reference path="intro.js.d.ts" />
var intro = introJs();
var introWithElement = introJs(document.body);
var introWithQuerySelector = introJs('body');
intro.setOption('doneLabel', 'Next page');
intro.setOption('overlayOpacity', 50);
@@ -48,9 +50,31 @@ intro.start()
.onafterchange(function (element) {
element.getAttribute('class');
})
.onchange(function () {
alert('Changed');
.onchange(function (element) {
element.getAttribute('class');
})
.oncomplete(function () {
alert('Done');
});
})
.onexit(function () {
alert('Exiting');
})
.onhintsadded(function () {
alert('Hints added');
})
.onhintclick(function (hintElement, item, stepId) {
hintElement.getAttribute('class');
})
.onhintclose(function (stepId) {
alert('Hint close for Step ID ' + stepId);
})
.addHints()
.clone();
introWithElement.start()
.exit()
.clone();
introWithQuerySelector.start()
.exit()
.clone();
+15 -4
View File
@@ -1,4 +1,4 @@
// Type definitions for intro.js 1.1.1
// Type definitions for intro.js 2.0
// Project: https://github.com/usablica/intro.js
// Definitions by: Maxime Fabre <https://github.com/anahkiasen/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -29,12 +29,15 @@ declare module IntroJs {
overlayOpacity?: number;
positionPrecedence?: string[];
disableInteraction?: boolean;
steps: Step[];
hintPosition?: string;
hintButtonLabel?: string;
steps?: Step[];
}
interface IntroJs {
start(): IntroJs;
exit(): IntroJs;
clone(): IntroJs;
goToStep(step: number): IntroJs;
nextStep(): IntroJs;
@@ -48,12 +51,20 @@ declare module IntroJs {
onexit(callback: Function): IntroJs;
onbeforechange(callback: (element: HTMLElement) => any): IntroJs;
onafterchange(callback: (element: HTMLElement) => any): IntroJs;
onchange(callback: Function): IntroJs;
onchange(callback: (element: HTMLElement) => any): IntroJs;
oncomplete(callback: Function): IntroJs;
addHints(): IntroJs;
onhintsadded(callback: Function): IntroJs;
onhintclick(callback: (hintElement: HTMLElement, item: Step, stepId: number) => any): IntroJs;
onhintclose(callback: (stepId: number) => any): IntroJs;
}
interface Factory {
(element?: string): IntroJs;
(): IntroJs;
(element: HTMLElement): IntroJs;
(querySelector: string): IntroJs;
}
}
+2
View File
@@ -33,6 +33,7 @@ function test_JsMockito_when() {
}
function test_JsMockito_verify() {
JsMockito.verify(new TestClass()).test();
JsMockito.verify(new TestClass(), new TestVerifier()).test();
}
@@ -129,6 +130,7 @@ function test_when() {
}
function test_verify() {
verify(new TestClass()).test();
verify(new TestClass(), new TestVerifier()).test();
}
+2
View File
@@ -378,6 +378,7 @@ declare module JsMockito {
* @param verifier Optional JsMockito.Verifier instance (default: JsMockito.Verifiers.once())
* @return {T} A verifier on which the method or function to be verified can be invoked
*/
export function verify<T>(mock: T): T;
export function verify<T>(mock: T, verifier: Verifier): T;
/**
@@ -587,6 +588,7 @@ declare function when<T>(mock: T): T;
* @param verifier Optional JsMockito.Verifier instance (default: JsMockito.Verifiers.once())
* @return {T} A verifier on which the method or function to be verified can be invoked
*/
declare function verify<T>(mock: T): T;
declare function verify<T>(mock: T, verifier: JsMockito.Verifier): T;
/**
+13 -4
View File
@@ -1,4 +1,4 @@
// Type definitions for jsonwebtoken 0.4.0
// Type definitions for jsonwebtoken 5.7.0
// Project: https://github.com/auth0/node-jsonwebtoken
// Definitions by: Maxime LUCE <https://github.com/SomaticIT>, Daniel Heim <https://github.com/danielheim>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -22,17 +22,20 @@ declare module "jsonwebtoken" {
* - none: No digital signature or MAC value included
*/
algorithm?: string;
/**
/**
*@deprecated - see expiresIn
*@member {number} - Lifetime for the token in minutes
*@member {number} - Lifetime for the token in minutes
*/
expiresInMinutes?: number;
/** @member {string} - Lifetime for the token expressed in a string describing a time span [rauchg/ms](https://github.com/rauchg/ms.js). Eg: `60`, `"2 days"`, `"10h"`, `"7d"` */
expiresIn?: string;
notBefore?: string;
audience?: string;
subject?: string;
issuer?: string;
jwtid?: string;
noTimestamp?: boolean;
headers?: Object;
}
export interface VerifyOptions {
@@ -40,6 +43,12 @@ declare module "jsonwebtoken" {
audience?: string;
issuer?: string;
ignoreExpiration?: boolean;
ignoreNotBefore?: boolean;
subject?: string;
/**
*@deprecated
*@member {string} - Max age of token
*/
maxAge?: string;
}
@@ -74,7 +83,7 @@ declare module "jsonwebtoken" {
*/
export function sign(payload: string | Buffer | Object, secretOrPrivateKey: string | Buffer, callback: SignCallback): void;
export function sign(payload: string | Buffer | Object, secretOrPrivateKey: string | Buffer, options: SignOptions, callback: SignCallback): void;
/**
* Synchronously verify given token using a secret or a public key to get a decoded token
* @param {String} token - JWT string to verify
+3
View File
@@ -18284,3 +18284,6 @@ declare module _ {
declare module "lodash" {
export = _;
}
// Backward compatibility with --target es5
interface Map<K, V> {}
@@ -0,0 +1,534 @@
///<reference path='../../react/react.d.ts' />
///<reference path='../../react/react-addons-linked-state-mixin.d.ts' />
///<reference path='material-ui-0.13.4.d.ts' />
import * as React from "react";
import * as LinkedStateMixin from "react-addons-linked-state-mixin";
import Checkbox = require("material-ui/lib/checkbox");
import Colors = require("material-ui/lib/styles/colors");
import Spacing = require("material-ui/lib/styles/spacing");
import AppBar = require("material-ui/lib/app-bar");
import Badge = require("material-ui/lib/badge");
import IconButton = require("material-ui/lib/icon-button");
import FlatButton = require("material-ui/lib/flat-button");
import Avatar = require("material-ui/lib/avatar");
import FontIcon = require("material-ui/lib/font-icon");
import Typography = require("material-ui/lib/styles/typography");
import RaisedButton = require("material-ui/lib/raised-button");
import FloatingActionButton = require("material-ui/lib/floating-action-button");
import Card = require("material-ui/lib/card/card");
import CardHeader = require("material-ui/lib/card/card-header");
import CardText = require("material-ui/lib/card/card-text");
import CardActions = require("material-ui/lib/card/card-actions");
import Dialog = require("material-ui/lib/dialog");
import DropDownMenu = require("material-ui/lib/drop-down-menu");
import DatePicker = require("material-ui/lib/date-picker/date-picker");
import TimePicker = require("material-ui/lib/time-picker");
import RadioButtonGroup = require("material-ui/lib/radio-button-group");
import RadioButton = require("material-ui/lib/radio-button");
import Toggle = require("material-ui/lib/toggle");
import TextField = require("material-ui/lib/text-field");
import SelectField = require("material-ui/lib/select-field");
import IconMenu = require("material-ui/lib/menus/icon-menu");
import Menu = require('material-ui/lib/menus/menu');
import MenuItem = require('material-ui/lib/menus/menu-item');
import MenuDivider = require('material-ui/lib/menus/menu-divider');
import ThemeManager = require('material-ui/lib/styles/theme-manager');
import GridList = require('material-ui/lib/grid-list/grid-list');
import GridTile = require('material-ui/lib/grid-list/grid-tile');
import NavigationClose = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/navigation/close", but they aren't defined yet.
import FileFolder = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/file/folder", but they aren't defined yet.
import ToggleStar = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/toggle/star", but they aren't defined yet.
import ActionGrade = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/action/grade", but they aren't defined yet.
import ToggleStarBorder = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/toggle/star-border", but they aren't defined yet.
import ArrowDropRight = require("material-ui/lib/svg-icon"); // TODO: Should actually import the actual "material-ui/lib/svg-icons/toggle/star-border", but they aren't defined yet.
type CheckboxProps = __MaterialUI.CheckboxProps;
type MuiTheme = __MaterialUI.Styles.MuiTheme;
type TouchTapEvent = __MaterialUI.TouchTapEvent;
interface MaterialUiTestsState {
showDialogStandardActions: boolean;
showDialogCustomActions: boolean;
showDialogScrollable: boolean;
}
class MaterialUiTests extends React.Component<{}, MaterialUiTestsState> implements React.LinkedStateMixin {
// injected with mixin
linkState: <T>(key: string) => React.ReactLink<T>;
dialog: Dialog;
private touchTapEventHandler(e: TouchTapEvent) {
this.dialog.show();
}
private formEventHandler(e: React.FormEvent) {
}
private selectFieldChangeHandler(e: TouchTapEvent, si: number, mi: any) {
}
private handleRequestClose(buttonClicked: boolean) {
}
render() {
// "http://material-ui.com/#/customization/themes"
let muiTheme: MuiTheme = ThemeManager.getMuiTheme({
palette: {
accent1Color: Colors.cyan100
},
spacing: {
}
});
// "http://material-ui.com/#/customization/inline-styles"
let element: React.ReactElement<any>;
element = <Checkbox
id="checkboxId1"
name="checkboxName1"
value="checkboxValue1"
label="went for a run today"
style={{
width: '50%',
margin: '0 auto'
}}
iconStyle={{
fill: '#FF4081'
}}/>
element = React.createElement<CheckboxProps>(Checkbox, {
id: "checkboxId1", name: "checkboxName1", value: "checkboxValue1", label: "went for a run today", style: {
width: '50%',
margin: '0 auto'
}, iconStyle: {
fill: '#FF4081'
}
});
// "http://material-ui.com/#/components/appbar"
element = <AppBar
title="Title"
iconClassNameRight="muidocs-icon-navigation-expand-more" />
element = <AppBar
title="Title"
iconElementLeft={<IconButton><NavigationClose /></IconButton>}
iconElementRight={<FlatButton label="Save" />} />;
// "http://material-ui.com/#/components/avatars"
//image avatar
element = <Avatar src="images/uxceo-128.jpg" />;
//SvgIcon avatar
element = <Avatar icon={<FileFolder />} />;
//SvgIcon avatar with custom colors
element = <Avatar
icon={<FileFolder />}
color={Colors.orange200}
backgroundColor={Colors.pink400} />;
//FontIcon avatar
element = <Avatar
icon={
<FontIcon className="muidocs-icon-communication-voicemail" />
} />;
//FontIcon avatar with custom colors
element = <Avatar
icon={<FontIcon className="muidocs-icon-communication-voicemail" />}
color={Colors.blue300}
backgroundColor={Colors.indigo900} />;
//Letter avatar
element = <Avatar>A</Avatar>;
//Letter avatar with custom colors
element = <Avatar
color={Colors.deepOrange300}
backgroundColor={Colors.purple500}>
</Avatar>
// "http://material-ui.com/#/components/badge"
element = <Badge badgeContent={<span>Hello</span>}>
<Avatar color={Colors.deepOrange300} />
</Badge>;
element = <Badge
primary
badgeContent={<span>Hello</span>}
badgeStyle={{height: '24px', width: '24px'}}
>
This text has a badge!
</Badge>;
// "http://material-ui.com/#/components/buttons"
element = <FlatButton linkButton={true} href="https://github.com/callemall/material-ui" secondary={true} label="GitHub">
<FontIcon style={{ color: Typography.textFullWhite }} className="muidocs-icon-custom-github"/>
</FlatButton>;
element = <RaisedButton linkButton={true} href="https://github.com/callemall/material-ui" secondary={true} label="GitHub">
<FontIcon style={{ color: Typography.textFullWhite }} className="muidocs-icon-custom-github"/>
</RaisedButton>;
element = <FloatingActionButton secondary={true} mini={true} linkButton={true}
href="https://github.com/callemall/material-ui" >
<ToggleStar />
</FloatingActionButton>;
// "http://material-ui.com/#/components/cards"
element = <Card initiallyExpanded={true}>
<CardHeader
title="Title"
subtitle="Subtitle"
avatar={<Avatar style={{ color: 'red' }}>A</Avatar>}
showExpandableButton={true}>
</CardHeader>
<CardText expandable={true}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</CardText>
<CardActions expandable={true}>
<FlatButton label="Action1"/>
<FlatButton label="Action2"/>
</CardActions>
<CardText expandable={true}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</CardText>
</Card>;
// "http://material-ui.com/#/components/date-picker"
element = <DatePicker style={{ color: 'red' }} />;
element = <DatePicker
floatingLabelText="Floating Label Text" />;
element = <DatePicker
hintText="Hint Text" />;
// "http://material-ui.com/#/components/time-picker"
element = <TimePicker textFieldStyle={{width: '24px'}} />
// "http://material-ui.com/#/components/dialog"
let standardActions = [
{ text: 'Cancel' },
{ text: 'Submit', onTouchTap: this.touchTapEventHandler, ref: 'submit' }
];
element = <Dialog
title="Dialog With Standard Actions"
actions={standardActions}
actionFocus="submit"
open={this.state.showDialogStandardActions}
onRequestClose={this.handleRequestClose}>
The actions in this window are created from the json that's passed in.
</Dialog>;
//Custom Actions
let customActions = [
<FlatButton
label="Cancel"
secondary={true}
onTouchTap={this.touchTapEventHandler} />,
<FlatButton
label="Submit"
primary={true}
onTouchTap={this.touchTapEventHandler} />
];
element = <Dialog
title="Dialog With Custom Actions"
actions={customActions}
open={this.state.showDialogCustomActions}
onRequestClose={this.handleRequestClose}>
The actions in this window were passed in as an array of react objects.
</Dialog>;
element = <Dialog
title="Dialog With Scrollable Content"
actions={customActions}
autoDetectWindowHeight={true}
autoScrollBodyContent={true}
open={this.state.showDialogScrollable}
onRequestClose={this.handleRequestClose}>
<div style={{ height: '1000px' }}>
Really long content
</div>
</Dialog>;
// "http://material-ui.com/#/components/dropdown-menu"
let menuItems = [
{ payload: '1', text: 'Never' },
{ payload: '2', text: 'Every Night' },
{ payload: '3', text: 'Weeknights' },
{ payload: '4', text: 'Weekends' },
{ payload: '5', text: 'Weekly' },
];
element = <DropDownMenu menuItems={menuItems} />;
// "http://material-ui.com/#/components/icons"
element = <FontIcon className= "material-icons" color= { Colors.red500 } > home</FontIcon>;
// "http://material-ui.com/#/components/icon-buttons"
//Method 1: muidocs-icon-github is defined in a style sheet.
element = <IconButton iconClassName="muidocs-icon-custom-github" tooltip="GitHub"/>;
//Method 2: ActionGrade is a component created using mui.SvgIcon.
element = <IconButton tooltip= "Star" touch= { true}>
<ActionGrade/>
</IconButton >;
//Method 3: Manually creating a mui.FontIcon component within IconButton
element = <IconButton tooltip= "Sort" disabled= {true}>
<FontIcon className="muidocs-icon-custom-sort"/>
</IconButton>;
//Method 4: Using Google material-icons
element = <IconButton iconClassName="material-icons" tooltipPosition="bottom-center"
tooltip="Sky">settings_system_daydream</IconButton>;
// "http://material-ui.com/#/components/icon-menus"
element = <IconMenu iconButtonElement={<IconButton />}>
<MenuItem primaryText="Refresh" />
<MenuItem primaryText="Send feedback" />
<MenuItem primaryText="Settings" />
<MenuItem primaryText="Help" />
<MenuItem primaryText="Sign out" />
</IconMenu>;
// "http://material-ui.com/#/components/left-nav"
// "http://material-ui.com/#/components/lists"
// "http://material-ui.com/#/components/menus"
element = <Menu>
<MenuItem primaryText="Maps" />
<MenuItem primaryText="Books" />
<MenuItem primaryText="Flights" />
<MenuItem primaryText="Apps" />
</Menu>;
element = <Menu desktop={true} width={320}>
<MenuItem primaryText="Bold" secondaryText="&#8984;B" />
<MenuItem primaryText="Italic" secondaryText="&#8984;I" />
<MenuItem primaryText="Underline" secondaryText="&#8984;U" />
<MenuItem primaryText="Strikethrough" secondaryText="Alt+Shift+5" />
<MenuItem primaryText="Superscript" secondaryText="&#8984;." />
<MenuItem primaryText="Subscript" secondaryText="&#8984;," />
<MenuDivider />
<MenuItem primaryText="Paragraph styles" rightIcon={<ArrowDropRight />} />
<MenuItem primaryText="Align" rightIcon={<ArrowDropRight />} />
<MenuItem primaryText="Line spacing" rightIcon={<ArrowDropRight />} />
<MenuItem primaryText="Numbered list" rightIcon={<ArrowDropRight />} />
<MenuItem primaryText="List options" rightIcon={<ArrowDropRight />} />
<MenuDivider />
<MenuItem primaryText="Clear formatting" secondaryText="&#8984;/" />
</Menu>;
// "http://material-ui.com/#/components/paper"
// "http://material-ui.com/#/components/progress"
// "http://material-ui.com/#/components/refresh-indicator"
// "http://material-ui.com/#/components/sliders"
// "http://material-ui.com/#/components/switches"
element = <Checkbox
name="checkboxName2"
value="checkboxValue2"
label="fed the dog"
defaultChecked={true}/>;
element = <Checkbox
name = "checkboxName3"
value = "checkboxValue3"
label = "built a house on the moon"
disabled = {true}/>;
element = <Checkbox
name="checkboxName4"
value="checkboxValue4"
checkedIcon={<ToggleStar />}
unCheckedIcon={<ToggleStarBorder />}
label="custom icon" />;
element = <RadioButtonGroup name="shipSpeed" defaultSelected="not_light">
<RadioButton
value="light"
label="prepare for light speed"
style={{ marginBottom: 16 }} />;
<RadioButton
value="not_light"
label="light speed too slow"
style={{ marginBottom: 16 }}/>;
<RadioButton
value="ludicrous"
label="go to ludicrous speed"
style={{ marginBottom: 16 }}
disabled={true}/>
</RadioButtonGroup>;
element = <Toggle
name="toggleName1"
value="toggleValue1"
label="activate thrusters"/>;
element = <Toggle
name = "toggleName2"
value = "toggleValue2"
label = "auto-pilot"
defaultToggled = { true}/>;
element = <Toggle
name="toggleName3"
value="toggleValue3"
label="initiate self-destruct sequence"
disabled={true}/>;
// "http://material-ui.com/#/components/snackbar"
// "http://material-ui.com/#/components/table"
// "http://material-ui.com/#/components/tabs"
// "http://material-ui.com/#/components/text-fields"
element = <TextField
hintText="Hint Text" />;
element = <TextField
hintText="Hint Text"
defaultValue="Default Value" />;
element = <TextField
hintText = "Hint Text"
value = { "value" }
underlineStyle = {{ borderColor: Colors.green500 }}
onChange = { this.formEventHandler } />;
element = <TextField
hintText="Custom Underline Focus Color"
underlineFocusStyle={{ borderColor: Colors.amber900 }} />;
element = <TextField
hintText = "Hint Text"
valueLink = { this.linkState<string>('valueLinkValue') } />;
element = <TextField
hintText="Hint Text (MultiLine)"
multiLine={true} />;
element = <TextField
hintText = "The hint text can be as long as you want, it will wrap."
multiLine = { true} />;
element = <TextField
hintText="Hint Text"
errorText="The error text can be as long as you want, it will wrap." />;
element = <TextField
hintText = "Hint Text"
errorText = { "error text" }
onChange = { this.formEventHandler } />;
element = <TextField
hintText="Hint Text (custom error color)"
errorText={"error text"}
errorStyle={{ color: 'orange' }}
onChange={ this.formEventHandler }
defaultValue="Custom error color" />;
element = <TextField
hintText = "Disabled Hint Text"
disabled = { true} />;
element = <TextField
hintText="Disabled Hint Text"
disabled={true}
defaultValue="Disabled With Value" />;
//Select Fields
let arbitraryArrayMenuItems = [
{
id: 0,
name: "zero",
},
];
element = <SelectField
value = { 0 }
onChange = { this.selectFieldChangeHandler }
hintText = "Hint Text"
menuItems = { menuItems } />;
element = <SelectField
valueLink={this.linkState('selectValueLinkValue') }
floatingLabelText="Float Label Text"
valueMember="id"
displayMember="name"
menuItems={arbitraryArrayMenuItems} />;
element = <SelectField
valueLink = { this.linkState('selectValueLinkValue2') }
floatingLabelText = "Float Custom Label Text"
floatingLabelStyle = {{ color: "red" }}
valueMember = "id"
displayMember = "name"
menuItems = { arbitraryArrayMenuItems } />;
element = <SelectField
value={0}
onChange={ this.selectFieldChangeHandler }
menuItems={arbitraryArrayMenuItems} />;
//Floating Hint Text Labels
element = <TextField
hintText = "Hint Text"
floatingLabelText = "Floating Label Text" />;
element = <TextField
hintText="Hint Text"
defaultValue="Default Value"
floatingLabelText="Floating Label Text" />;
element = <TextField
hintText = "Hint Text"
floatingLabelText = "Floating Label Text"
value = { "value" }
onChange = { this.formEventHandler } />;
element = <TextField
hintText="Hint Text"
floatingLabelText="Floating Label Text"
valueLink={this.linkState<string>('floatingValueLinkValue') } />;
element = <TextField
hintText = "Hint Text (MultiLine)"
floatingLabelText = "Floating Label Text"
multiLine = { true} />;
element = <TextField
hintText="Hint Text"
errorText={"floating text"}
floatingLabelText="Floating Label Text"
onChange={this.formEventHandler } />;
element = <TextField
hintText = "Hint Text"
errorText = { "error text" }
defaultValue = "abc"
floatingLabelText = "Floating Label Text"
onChange = { this.formEventHandler } />;
element = <TextField
hintText="Disabled Hint Text"
disabled={true}
floatingLabelText="Floating Label Text" />;
element = <TextField
hintText = "Disabled Hint Text"
disabled = { true}
defaultValue = "Disabled With Value"
floatingLabelText = "Floating Label Text" />;
element = <TextField
hintText="Password Field"
floatingLabelText="Password"
type="password" />;
// "http://material-ui.com/#/components/time-picker"
// "http://material-ui.com/#/components/toolbars"
// "http://material-ui.com/#/components/grid-list"
element = <GridList
cols={3}
padding={50}
cellHeight={200}
style={{ color: 'red' }} />;
element = <GridTile
title="GridTileTitle"
actionIcon={<h1>GridTile</h1>}
actionPosition="left"
titlePosition="top"
titleBackground="rgba(0, 0, 0, 0.4)"
cols={2}
rows={1}
style={{ color: 'red' }}>
<h1>Children are Required!</h1>
</GridTile>;
return element;
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1 @@
--experimentalDecorators
+7115 -2154
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -280,9 +280,9 @@ declare module moment {
to(f: MomentComparable, suffix?: boolean): string;
toNow(withoutPrefix?: boolean): string;
diff(b: Moment): number;
diff(b: Moment, unitOfTime: string): number;
diff(b: Moment, unitOfTime: string, round: boolean): number;
diff(b: MomentComparable): number;
diff(b: MomentComparable, unitOfTime: string): number;
diff(b: MomentComparable, unitOfTime: string, round: boolean): number;
toArray(): number[];
toDate(): Date;
+13
View File
@@ -0,0 +1,13 @@
/// <reference path="./nanoajax.d.ts" />
import * as nanoajax from 'nanoajax';
nanoajax.ajax({
url: '/some-get-url'
}, function (code, responseText) {})
nanoajax.ajax({
url: '/some-post-url',
method: 'POST',
body: 'post=content&args=yaknow'
}, function (code, responseText, request) {})
+20
View File
@@ -0,0 +1,20 @@
// Type definitions for nanoajax v0.2.4
// Project: https://github.com/yanatan16/nanoajax
// Definitions by: Nathan Cahill <https://github.com/nathancahill/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module 'nanoajax' {
interface RequestParameters {
url: string;
headers?: { [key: string]: string; };
body?: string|FormData;
method?: string;
cors?: boolean;
}
interface Callback {
(statusCode: number, response: string, request: XMLHttpRequest): any
}
export function ajax(params: RequestParameters, callback: Callback): XMLHttpRequest
}
+10
View File
@@ -0,0 +1,10 @@
/// <reference path="noisejs.d.ts"/>
var noise = new Noise(Math.random());
var simplex2_noise_val = noise.simplex2(0.1, 0.2);
var simplex3_noise_val = noise.simplex3(0.1, 0.2, 0.3);
var perlin2_noise_val = noise.perlin2(0.1, 0.2);
var perlin3_noise_val = noise.perlin3(0.1, 0.2, 0.3);
noise.seed(Math.random());
+58
View File
@@ -0,0 +1,58 @@
// Type definitions for noisejs
// Project: https://github.com/xixixao/noisejs
// Definitions by: Atsushi Izumihara <https://github.com/izmhr>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare class Noise {
/**
* Passing in seed will seed this Noise instance
* @param {number} seed
* @return {Noise} Noise instance
*/
constructor(seed?: number);
/**
* 2D simplex noise
* @param {number} x
* @param {number} y
* @return {number} noise value
*/
simplex2(x: number, y: number): number;
/**
* 3D simplex noise
* @param {number} x
* @param {number} y
* @param {number} z
* @return {number} noise value
*/
simplex3(x: number, y: number, z: number): number;
/**
* 2D Perlin Noise
* @param {number} x
* @param {number} y
* @return {number} noise value
*/
perlin2(x: number, y: number): number;
/**
* 3D Perlin Noise
* @param {number} x
* @param {number} y
* @param {number} z
* @return {number} noise value
*/
perlin3(x: number, y: number, z: number): number;
/**
* This isn't a very good seeding function, but it works ok. It supports 2^16
* different seed values. Write something better if you need more seeds.
* @param {number} seed [description]
*/
seed(seed: number): void;
}
declare module "noisejs" {
export = Noise;
}
+2 -2
View File
@@ -89,7 +89,7 @@ angular.module('app').controller(['$ocLazyLoadProvider', function ($ocLazyLoad:
'testModule2.js'
]);
$ocLazyLoad.inject('testModule');
var promise: ng.IPromise<any> = $ocLazyLoad.inject('testModule');
$ocLazyLoad.toggleWatch(true);
}]);
}]);
+2 -2
View File
@@ -43,7 +43,7 @@ declare module oc {
* Injects a module with the associated name into Angular. Useful for manual injection when loading through RequireJS, SystemJS, etc. Useful in
* conjunction with the toggleWatch() method.
*/
inject(moduleName: string|string[]): boolean;
inject(moduleName: string|string[]): ng.IPromise<any>;
/**
* Enables or disables watching Angular for new modules. Useful in conjunction with the inject() method. Make sure to not keep the watch enabled
@@ -146,4 +146,4 @@ declare module angular {
*/
module(name: string, requires?: (string|oc.IModuleConfig)[], configFn?: Function): IModule;
}
}
}
+29 -26
View File
@@ -2,45 +2,48 @@
import optimist = require('optimist');
var fn: Function;
var checkFn: (argv: any) => any;
var logFn: (message: string) => void;
var str: string;
var value: any;
var num: number;
var bool: boolean;
var strArr: string[];
var argv: optimist.Argv;
var opt: optimist.Optimist;
var argv: any;
var opt: optimist.Opt;
var parser: optimist.Parser;
argv = opt.argv;
argv = opt.argv;
argv = optimist(strArr).argv;
argv = parser.argv;
argv = optimist([str]);
argv = optimist.parse([str]);
opt = optimist(strArr).default(str, value);
opt = optimist(strArr).default({});
parser = parser.alias(str, str);
parser = parser.alias(str, [str]);
parser = parser.alias({});
opt = optimist(strArr).boolean(str);
opt = optimist(strArr).boolean(strArr);
parser = parser.default(str, value);
parser = parser.default({});
opt = optimist(strArr).string(str);
opt = optimist(strArr).string(strArr);
parser = parser.demand(str);
parser = parser.demand(num);
parser = parser.demand([str]);
opt = opt.wrap(num);
parser = parser.describe(str, str);
parser = parser.describe({});
opt.help();
opt.showHelp(fn);
parser = parser.options(str, opt);
parser = parser.options({});
opt = opt.usage(str);
parser = parser.usage(str);
opt = opt.demand(str);
opt = opt.demand(num);
opt = opt.demand(strArr);
parser = parser.check(checkFn);
opt = opt.alias(str, str);
parser = parser.boolean(str);
parser = parser.boolean([str]);
opt = opt.describe(str, str);
parser = parser.string(str);
parser = parser.string([str]);
opt = opt.options(str, Object);
parser = parser.wrap(num);
opt.check(fn);
opt = opt.parse(strArr);
parser.help();
parser.showHelp(logFn);
+76 -40
View File
@@ -1,53 +1,89 @@
// Type definitions for optimist
// Project: https://github.com/substack/node-optimist
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// Imported from: https://github.com/soywiz/typescript-node-definitions/optimist.d.ts
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>, Christopher Brown <https://github.com/chbrown>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "optimist" {
function optimist(args: string[]): optimist.Optimist;
module optimist {
export interface Optimist {
default(name: string, value: any): Optimist;
default(args: Object): Optimist;
boolean(name: string): Optimist;
boolean(names: string[]): Optimist;
string(name: string): Optimist;
string(names: string[]): Optimist;
wrap(columns: number): Optimist;
help(): void;
showHelp(fn?: Function): void;
usage(message: string): Optimist;
demand(key: string): Optimist;
demand(key: number): Optimist;
demand(key: string[]): Optimist;
alias(key: string, alias: string): Optimist;
describe(key: string, desc: string): Optimist;
options(key: string, opt: Object): Optimist;
check(fn: Function): void;
parse(args: string[]): Optimist;
argv: Argv;
interface Opt {
alias?: string | string[];
default?: any;
demand?: string | number | string[];
describe?: string;
type?: string;
}
export interface Argv extends Object {
_: string[];
interface Parser {
/** Implicitly use process.argv array to construct the argv object */
argv: any;
/** Pass in the process.argv yourself */
(args: string[]): any;
/** Use .parse() to do the same thing as treating optimist as a function */
parse(args: string[]): any;
// The types below follow the order and documentation of https://github.com/substack/node-optimist
/** Set key names as equivalent such that updates to a key will propagate to aliases and vice-versa. */
alias(key: string, alias: string | string[]): Parser;
/** Take an object that maps keys to aliases. */
alias(aliases: {[index: string]: string | string[]}): Parser;
/** Set argv[key] to value if no option was specified on process.argv */
default(key: string, value: any): Parser;
/** Take an object that maps keys to default values */
default(defaults: {[index: string]: any}): Parser;
/** Show the usage information and exit if key wasn't specified in process.argv */
demand(key: string): Parser;
/** Demand at least as many non-option arguments, which show up in argv._ */
demand(key: number): Parser;
/** Demand each element in key */
demand(key: string[]): Parser;
/** Describe a key for the generated usage information */
describe(key: string, desc: string): Parser;
/** Take an object that maps keys to descriptions */
describe(descriptions: {[index: string]: string}): Parser;
/** Instead of chaining together, e.g. optimist.alias().demand().default()...,
you can specify keys in opt for each of the chainable methods. */
options(key: string, opt: Opt): Parser;
/** Take an object that maps keys to opt parameters */
options(options: {[index: string]: Opt}): Parser;
/** Set a usage message to show which commands to use. Inside message,
the string $0 will get interpolated to the current script name or node
command for the present script similar to how $0 works in bash or perl. */
usage(message: string): Parser;
/** Check that certain conditions are met in the provided arguments. If fn
throws or returns false, show the thrown error, usage information, and exit.
*/
check(fn: (argv: any) => any): Parser;
/** Interpret key as a boolean. If a non-flag option follows key in process.argv,
that string won't get set as the value of key. If key never shows up as a
flag in process.arguments, argv[key] will be false. */
boolean(key: string): Parser;
/** Interpret all the elements as booleans. */
boolean(key: string[]): Parser;
/** Tell the parser logic not to interpret key as a number or boolean. This can be useful if you need to preserve leading zeros in an input. */
string(key: string): Parser;
/** Interpret all the elements as strings */
string(key: string[]): Parser;
/** Format usage output to wrap at columns many columns. */
wrap(columns: number): Parser;
/** Return the generated usage string. */
help(): string;
/** Print the usage data using fn for printing (defaults to console.error). */
showHelp(fn?: (message: string) => void): void;
}
}
var optimist: optimist.Parser;
export = optimist;
}
Vendored
+4
View File
@@ -3,6 +3,10 @@
// Definitions by: Clark Stevenson <https://github.com/clark-stevenson>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "p2" {
export = p2;
}
declare module p2 {
export class AABB {
@@ -0,0 +1,20 @@
/// <reference path="./react-router-redux-2.x.d.ts" />
/// <reference path="../redux/redux.d.ts" />
/// <reference path="../react-router/react-router.d.ts" />
import { createStore, combineReducers, applyMiddleware } from 'redux';
import { browserHistory } from 'react-router';
import { syncHistory, routeReducer } from 'react-router-redux';
const reducer = combineReducers({ routing: routeReducer });
// Sync dispatched route actions to the history
const reduxRouterMiddleware = syncHistory(browserHistory);
const createStoreWithMiddleware = applyMiddleware(reduxRouterMiddleware)(createStore);
const store = createStoreWithMiddleware(reducer);
// Required for replaying actions from devtools to
reduxRouterMiddleware.listenForReplays(store);
+48
View File
@@ -0,0 +1,48 @@
// Type definitions for react-router-redux v2.x - v3.x
// Project: https://github.com/rackt/react-router-redux
// Definitions by: Isman Usoh <http://github.com/isman-usoh>, Noah Shipley <https://github.com/noah79>, Dimitri Rosenberg <https://github.com/rosendi>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../redux/redux.d.ts" />
/// <reference path="../react-router/react-router.d.ts"/>
declare namespace ReactRouterRedux {
import R = Redux;
import H = HistoryModule;
const TRANSITION: string;
const UPDATE_LOCATION: string;
const push: PushAction;
const replace: ReplaceAction;
const go: GoAction;
const goBack: GoForwardAction;
const goForward: GoBackAction;
const routeActions: RouteActions;
type LocationDescriptor = H.Location | H.Path;
type PushAction = (nextLocation: LocationDescriptor) => void;
type ReplaceAction = (nextLocation: LocationDescriptor) => void;
type GoAction = (n: number) => void;
type GoForwardAction = () => void;
type GoBackAction = () => void;
interface RouteActions {
push: PushAction;
replace: ReplaceAction;
go: GoAction;
goForward: GoForwardAction;
goBack: GoBackAction;
}
interface HistoryMiddleware extends R.Middleware {
listenForReplays(store: R.Store, selectLocationState?: Function): void;
unsubscribe(): void;
}
function routeReducer(state?: any, options?: any): R.Reducer;
function syncHistory(history: H.History): HistoryMiddleware;
}
declare module "react-router-redux" {
export = ReactRouterRedux;
}
+18 -8
View File
@@ -6,15 +6,25 @@
import { createStore, combineReducers, applyMiddleware } from 'redux';
import { browserHistory } from 'react-router';
import { syncHistory, routeReducer } from 'react-router-redux';
import { syncHistoryWithStore, routerReducer, routerMiddleware, push, replace, go, goForward, goBack } from 'react-router-redux';
const reducer = combineReducers({ routing: routeReducer });
const reducer = combineReducers({ routing: routerReducer });
// Sync dispatched route actions to the history
const reduxRouterMiddleware = syncHistory(browserHistory);
const createStoreWithMiddleware = applyMiddleware(reduxRouterMiddleware)(createStore);
// Apply the middleware to the store
const middleware = routerMiddleware(browserHistory);
const store = createStore(
reducer,
applyMiddleware(middleware)
);
const store = createStoreWithMiddleware(reducer);
// Create an enhanced history that syncs navigation events with the store
const history = syncHistoryWithStore(browserHistory, store);
history.listen(location => console.log(location) );
history.unsubscribe();
// Required for replaying actions from devtools to
reduxRouterMiddleware.listenForReplays(store);
// Dispatch from anywhere like normal.
store.dispatch(push('/foo'));
store.dispatch(replace('/foo'));
store.dispatch(go(1));
store.dispatch(goForward());
store.dispatch(goBack());
+27 -13
View File
@@ -1,4 +1,4 @@
// Type definitions for react-router-redux v2.1.0
// Type definitions for react-router-redux v4.0.0
// Project: https://github.com/rackt/react-router-redux
// Definitions by: Isman Usoh <http://github.com/isman-usoh>, Noah Shipley <https://github.com/noah79>, Dimitri Rosenberg <https://github.com/rosendi>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -10,23 +10,28 @@ declare namespace ReactRouterRedux {
import R = Redux;
import H = HistoryModule;
const TRANSITION: string;
const UPDATE_LOCATION: string;
const CALL_HISTORY_METHOD: string;
const LOCATION_CHANGE: string;
const push: PushAction;
const replace: ReplaceAction;
const go: GoAction;
const goBack: GoForwardAction;
const goForward: GoBackAction;
const routeActions: RouteActions;
const routerActions: RouteActions;
type LocationDescriptor = H.Location | H.Path;
type PushAction = (nextLocation: LocationDescriptor) => void;
type ReplaceAction = (nextLocation: LocationDescriptor) => void;
type GoAction = (n: number) => void;
type GoForwardAction = () => void;
type GoBackAction = () => void;
type PushAction = (nextLocation: LocationDescriptor) => RouterAction;
type ReplaceAction = (nextLocation: LocationDescriptor) => RouterAction;
type GoAction = (n: number) => RouterAction;
type GoForwardAction = () => RouterAction;
type GoBackAction = () => RouterAction;
type RouterAction = {
type: string
payload?: any
}
interface RouteActions {
push: PushAction;
replace: ReplaceAction;
@@ -34,13 +39,22 @@ declare namespace ReactRouterRedux {
goForward: GoForwardAction;
goBack: GoBackAction;
}
interface HistoryMiddleware extends R.Middleware {
listenForReplays(store: R.Store, selectLocationState?: Function): void;
interface ReactRouterReduxHistory extends H.History {
unsubscribe(): void;
}
interface DefaultSelectLocationState extends Function {
(state: any): any;
}
function routeReducer(state?: any, options?: any): R.Reducer;
function syncHistory(history: H.History): HistoryMiddleware;
interface SyncHistoryWithStoreOptions {
selectLocationState?: DefaultSelectLocationState;
adjustUrlOnReplay?: boolean;
}
function routerReducer(state?: any, options?: any): R.Reducer;
function syncHistoryWithStore(history: H.History, store: R.Store, options?: SyncHistoryWithStoreOptions): ReactRouterReduxHistory;
function routerMiddleware(history: H.History): R.Middleware;
}
declare module "react-router-redux" {
+50 -9
View File
@@ -2,17 +2,26 @@
import sagaMiddleware, {
storeIO,
runSaga,
Saga,
SagaCancellationException,
takeEvery,
takeLatest,
isCancelError
} from 'redux-saga'
import {
take,
put,
race,
call,
apply,
fork,
select,
cancel,
storeIO,
runSaga,
Saga,
SagaCancellationException
} from 'redux-saga'
} from 'redux-saga/effects'
import {applyMiddleware, createStore} from 'redux';
declare const delay: (ms: number) => Promise<any>;
@@ -47,13 +56,12 @@ namespace GettingStarted {
}
}
namespace EffectCombinators {
const fetchPostsWithTimeout:Saga = function* fetchPostsWithTimeout() {
while( yield take('FETCH_POSTS') ) {
// starts a race between 2 effects
const {posts, timeout} = yield race({
posts : call(fetchApi, '/posts'),
posts : call([this, fetchApi], '/posts'),
timeout : call(delay, 1000)
})
@@ -132,12 +140,12 @@ namespace TaskCancellation {
try {
while(true) {
yield put({type: 'REQUEST_START'})
const result = yield call(someApi)
const result = yield apply(this, someApi)
yield put({type: 'REQUEST_SUCCESS', result})
yield call(delay, 5000)
}
} catch(error) {
if(error instanceof SagaCancellationException)
if(error instanceof SagaCancellationException && isCancelError(error))
yield put({type: 'REQUEST_FAILURE', message: 'Sync cancelled!'})
}
}
@@ -170,3 +178,36 @@ namespace DynamicallyStartingSagasWithRunSaga {
storeIO(store)
)
}
namespace DynamicallyStartingSagasWithMiddleware {
function* startupSaga() {
}
function* dynamicSaga() {
}
sagaMiddleware(startupSaga).run(dynamicSaga)
}
namespace TestHelpers {
function* watchAndLog(getState) {
yield* takeEvery('*', function* logger(action) {
console.log('action', action)
})
}
function* fetchUser(action) {
}
function* watchLastFetchUser() {
yield* takeLatest('USER_REQUESTED', fetchUser)
}
}
namespace AccessCurrentState {
export const getCart = state => state.cart;
function* checkout() {
const cart = yield select(getCart)
}
}
+61 -34
View File
@@ -1,6 +1,6 @@
// Type definitions for redux-saga 0.6.0
// Type definitions for redux-saga 0.9.1
// Project: https://github.com/yelouafi/redux-saga
// Definitions by: Daniel Lytkin <https://github.com/aikoven>
// Definitions by: Daniel Lytkin <https://github.com/aikoven>, Dimitri Rosenberg <https://github.com/rosendi>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../redux/redux.d.ts" />
@@ -9,41 +9,17 @@ declare module 'redux-saga' {
export class SagaCancellationException {
}
export type Effect = {};
export type Saga = <T>(getState?: () => T) => Iterable<any>;
type Predicate = (action: any) => boolean;
export function take(pattern?: string|string[]|Predicate): Effect;
export function put(action: any): Effect;
export function race(effects: {[key:string]: any}): Effect;
export function call<T1, T2, T3>(fn: (arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]) => any,
arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]): Effect;
export interface Task<T> {
name:string;
isRunning():boolean;
result():T;
error():any;
}
export function fork(effect: Effect): Effect;
export function fork<T1, T2, T3>(fn: (arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]) =>
Promise<any>|Iterable<any>,
arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]): Effect;
export function join(task: Task<any>): Effect;
export function cancel(task: Task<any>): Effect;
export type Predicate = (action: any) => boolean;
export type Pattern = string | string[] | Predicate;
import {Middleware} from 'redux';
export default function (...sagas: Saga[]): Middleware;
interface SagaMiddleware extends Middleware {
run(saga: Saga, ...args: any[]): void;
}
export default function (...sagas: Saga[]): SagaMiddleware;
export {
CANCEL,
@@ -57,8 +33,59 @@ declare module 'redux-saga' {
export {runSaga, storeIO} from 'redux-saga/lib/runSaga'
export interface Task<T> {
name:string;
isRunning():boolean;
result():T;
error():any;
cancel(): void;
}
export function takeEvery(pattern: Pattern, saga: Saga, ...args: any[]): { [Symbol.iterator](): IterableIterator<any> };
export function takeLatest(pattern: Pattern, saga: Saga, ...args: any[]): { [Symbol.iterator](): IterableIterator<any> };
export function isCancelError(e: any): boolean;
}
declare module 'redux-saga/effects' {
import {Task} from 'redux-saga';
import {Predicate} from 'redux-saga';
import {Pattern} from 'redux-saga';
export type Effect = {};
type EffectFunction<T1, T2, T3> = (arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]) => Promise<any> | Iterable<any>;
interface EffectFunctionContext<T1, T2, T3> {
0: any;
1: EffectFunction<T1, T2, T3>;
}
export function take(pattern?: Pattern): Effect;
export function put(action: any): Effect;
export function race(effects: {[key:string]: any}): Effect;
export function call<T1, T2, T3>(fn: EffectFunction<T1, T2, T3>, arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]): Effect;
export function call<T1, T2, T3>(fn: EffectFunctionContext<T1, T2, T3>, arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]): Effect;
export function apply<T1, T2, T3>(context: any, fn: EffectFunction<T1, T2, T3>, arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]): Effect;
export function fork(effect: Effect): Effect;
export function fork<T1, T2, T3>(fn: EffectFunction<T1, T2, T3>, arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]): Effect;
export function fork<T1, T2, T3>(fn: EffectFunctionContext<T1, T2, T3>, arg1?: T1, arg2?: T2, arg3?: T3, ...rest: any[]): Effect;
export function join(task: Task<any>): Effect;
export function select(selector?: (state: any, ...args: any[]) => any, ...args: any[]): Effect;
export function cancel(task: Task<any>): Effect;
}
declare module 'redux-saga/lib/proc' {
import {Task} from 'redux-saga';
@@ -0,0 +1,13 @@
/// <reference path="sinon-stub-promise.d.ts"/>
function testResolve() {
var promise = sinon.stub().returnsPromise();
promise.resolves('test val');
}
function testReject() {
var promise = sinon.stub().returnsPromise();
promise.rejects('test val');
}
testResolve();
testReject();
+17
View File
@@ -0,0 +1,17 @@
// Type definitions for sinon-stub-promise v1.0.1
// Project: https://github.com/substantial/sinon-stub-promise
// Definitions by: Thiago Temple <https://github.com/vintem>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../sinon/sinon.d.ts"/>
declare module Sinon {
interface SinonPromise {
resolves(value?: any): void;
rejects(value?: any): void;
}
interface SinonStub {
returnsPromise(): SinonPromise;
}
}
+41 -26
View File
@@ -1,4 +1,4 @@
// Type definitions for SweetAlert 1.1.0
// Type definitions for SweetAlert 1.1.3
// Project: https://github.com/t4t5/sweetalert/
// Definitions by: Markus Peloso <https://github.com/ToastHawaii/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -11,6 +11,10 @@ declare module "sweetalert" {
}
declare module SweetAlert {
type AlertType = "warning" | "error" | "success" | "info";
type PromtType = "input" | "prompt";
interface SettingsBase {
/**
* A description for the modal.
@@ -18,12 +22,6 @@ declare module SweetAlert {
*/
text?: string;
/**
* The type of the modal. SweetAlert comes with 4 built-in types which will show a corresponding icon animation: "warning", "error", "success" and "info". You can also set it as "input" to get a prompt modal.
* Default: null
*/
type?: string;
/**
* If set to true, the user can dismiss the modal by pressing the Escape key.
* Default: true
@@ -112,7 +110,29 @@ declare module SweetAlert {
* If set to false, the modal's animation will be disabled. Possible animations: "slide-from-top", "slide-from-bottom", "pop" (use true instead) and "none" (use false instead).
* Default: true
*/
animation?: boolean | string;
animation?: boolean | "slide-from-top" | "slide-from-bottom" | "pop" | "none" | string;
/**
* Set to true to disable the buttons and show that something is loading.
* Default: false
*/
showLoaderOnConfirm?: boolean;
}
interface AlertModalSettings extends SettingsBase {
/**
* The type of the modal. SweetAlert comes with 4 built-in types which will show a corresponding icon animation: "warning", "error", "success" and "info". You can also set it as "input" to get a prompt modal.
* Default: null
*/
type?: AlertType;
}
interface PromtModalSettings extends SettingsBase {
/**
* The type of the modal. SweetAlert comes with 4 built-in types which will show a corresponding icon animation: "warning", "error", "success" and "info". You can also set it as "input" to get a prompt modal.
* Default: null
*/
type?: PromtType;
/**
* Change the type of the input field when using type: "input" (this can be useful if you want users to type in their password for example).
@@ -131,22 +151,16 @@ declare module SweetAlert {
* Default: null
*/
inputValue?: string;
/**
* Set to true to disable the buttons and show that something is loading.
* Default: false
*/
showLoaderOnConfirm?: boolean;
}
interface Settings extends SettingsBase {
interface Settings {
/**
* The title of the modal.
*/
title: string;
}
interface SetDefaultsSettings extends SettingsBase {
interface SetDefaultsSettings {
/**
* The title of the modal.
* Default: null
@@ -154,11 +168,6 @@ declare module SweetAlert {
title?: string;
}
/**
* Is true or false if the user confirms or cancels the alert. Except for the type "input", then when the user confirms the alert, this variable contains the value of the input element.
*/
type CallbackArgument = boolean | string;
interface SweetAlertStatic {
/**
* SweetAlert automatically centers itself on the page and looks great no matter if you're using a desktop computer, mobile or tablet. An awesome replacement for JavaScript's alert.
@@ -179,18 +188,24 @@ declare module SweetAlert {
* @param text A description for the modal.
* @param type The type of the modal. SweetAlert comes with 4 built-in types which will show a corresponding icon animation: "warning", "error", "success" and "info". You can also set it as "input" to get a prompt modal.
*/
(title: string, text: string, type: string): void;
(title: string, text: string, type: AlertType | PromtType): void;
/**
* SweetAlert automatically centers itself on the page and looks great no matter if you're using a desktop computer, mobile or tablet. An awesome replacement for JavaScript's alert.
* @param callback The callback from the users action. The value is true or false if the user confirms or cancels the alert. Except for the type "input", then when the user confirms the alert, the argument contains the value of the input element.
* @param callback The callback from the users action. The value is true or false if the user confirms or cancels the alert.
*/
(settings: Settings, callback?: (isConfirmOrInputValue: CallbackArgument) => any): void;
(settings: Settings & AlertModalSettings, callback?: (isConfirm: boolean) => any): void;
/**
* SweetAlert automatically centers itself on the page and looks great no matter if you're using a desktop computer, mobile or tablet. An awesome replacement for JavaScript's alert.
* @param callback The callback from the users action. When the user confirms the prompt, the argument contains the value of the input element. When the user cancels the prompt, the argument is false.
*/
(settings: Settings & PromtModalSettings, callback?: (isConfirmOrInputValue: boolean | string) => any): void;
/**
* If you end up using a lot of the same settings when calling SweetAlert, you can use setDefaults at the start of your program to set them once and for all!
*/
setDefaults(settings: SetDefaultsSettings): void;
setDefaults(settings: SetDefaultsSettings & AlertModalSettings & PromtModalSettings): void;
/**
* Close the currently open SweetAlert programmatically.
@@ -212,4 +227,4 @@ declare module SweetAlert {
*/
disableButtons(): void;
}
}
}
+1
View File
@@ -42,6 +42,7 @@ declare class Headers {
getAll(name: string): Array<string>;
has(name: string): boolean;
set(name: string, value: string): void;
forEach(callback: (value: string, name: string) => void): void;
}
declare class Body {
+1 -1
View File
@@ -17,7 +17,7 @@ wrench.copyDirSyncRecursive(str, str, {
});
wrench.chmodSyncRecursive(str, num);
wrench.chownSyncRecursive(str, num, num);
wrench.mkdirSyncRecursivefunction(str, num);
wrench.mkdirSyncRecursive(str, num);
wrench.readdirRecursive(str, (err: Error, files: string[]) => {
});
+1 -1
View File
@@ -11,7 +11,7 @@ declare module "wrench" {
export function copyDirSyncRecursive(sourceDir: string, newDirLocation: string, opts?: { preserve?: boolean; }): void;
export function chmodSyncRecursive(sourceDir: string, filemode: number): void;
export function chownSyncRecursive(sourceDir: string, uid: number, gid: number): void;
export function mkdirSyncRecursivefunction(path: string, mode: number): void;
export function mkdirSyncRecursive(path: string, mode: number): void;
export function readdirRecursive(baseDir: string, fn: (err: Error, files: string[]) => void): void;
export function rmdirRecursive(path: string, fn: (err: Error) => void): void;