mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 13:30:28 +00:00
Merge branch 'master' of https://github.com/DefinitelyTyped/DefinitelyTyped into jquery
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@
|
||||
"scripts": {
|
||||
"compile-scripts": "tsc -p scripts",
|
||||
"not-needed": "node scripts/not-needed.js",
|
||||
"test": "node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed --nProcesses 1",
|
||||
"test": "node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed --nProcesses 4",
|
||||
"lint": "dtslint types"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -627,11 +627,13 @@ function test_angular_forEach() {
|
||||
}
|
||||
|
||||
// angular.element() tests
|
||||
let element = angular.element('div.myApp');
|
||||
let element = angular.element('<div></div>');
|
||||
let scope: ng.IScope = element.scope();
|
||||
let isolateScope: ng.IScope = element.isolateScope();
|
||||
isolateScope = element.find('div.foo').isolateScope();
|
||||
isolateScope = element.find('div').isolateScope();
|
||||
isolateScope = element.children().isolateScope();
|
||||
let element2 = angular.element(element);
|
||||
let elementArray = angular.element(document.querySelectorAll('div'));
|
||||
|
||||
// $timeout signature tests
|
||||
namespace TestTimeout {
|
||||
|
||||
Vendored
+4
-1
@@ -1,6 +1,9 @@
|
||||
// Type definitions for Angular JS 1.6
|
||||
// Project: http://angularjs.org
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>, Georgii Dolzhykov <http://github.com/thorn0>, Caleb St-Denis <https://github.com/calebstdenis>
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>
|
||||
// Georgii Dolzhykov <http://github.com/thorn0>
|
||||
// Caleb St-Denis <https://github.com/calebstdenis>
|
||||
// Leonard Thieu <https://github.com/leonard-thieu>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
|
||||
Vendored
+10
-4
@@ -1,3 +1,4 @@
|
||||
// Project: http://jquery.com/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Christian Hoffmeister <https://github.com/choffmeister>
|
||||
// Steve Fenton <https://github.com/Steve-Fenton>
|
||||
@@ -19,6 +20,8 @@
|
||||
// Dick van den Brink <https://github.com/DickvdBrink>
|
||||
// Thomas Schulz <https://github.com/King2500>
|
||||
// Leonard Thieu <https://github.com/leonard-thieu>
|
||||
// Andre Wiggins <https://github.com/andrewiggins>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// Definitions copied from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0480c5ec87fab41aa23047a02b27f0ea71aaf975/types/jquery/v2/index.d.ts
|
||||
|
||||
@@ -169,7 +172,7 @@ interface JQuery {
|
||||
* @param properties An object of property-value pairs to set.
|
||||
* @see {@link https://api.jquery.com/css/#css-properties}
|
||||
*/
|
||||
css(properties: JQueryCssProperties): JQuery;
|
||||
css(properties: JQLiteCssProperties): JQuery;
|
||||
|
||||
/**
|
||||
* Store arbitrary data associated with the matched elements.
|
||||
@@ -664,7 +667,7 @@ interface JQuery {
|
||||
}
|
||||
|
||||
interface JQueryStatic {
|
||||
(element: string | Element): JQuery;
|
||||
(element: string | Element | Document | JQuery | ArrayLike<Element>): JQuery;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -796,7 +799,10 @@ interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObjec
|
||||
/**
|
||||
* The interface used to specify the properties parameter in css()
|
||||
*/
|
||||
type cssPropertySetter = (index: number, value?: string) => string | number;
|
||||
interface JQueryCssProperties {
|
||||
// tslint:disable-next-line:class-name
|
||||
interface cssPropertySetter {
|
||||
(index: number, value?: string): string | number;
|
||||
}
|
||||
interface JQLiteCssProperties {
|
||||
[propertyName: string]: string | number | cssPropertySetter;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import {nextTick} from 'async.nexttick';
|
||||
|
||||
function calledOnNextTick(a: string): number {
|
||||
return parseInt(a, 10);
|
||||
}
|
||||
|
||||
const aString = 'Hi!';
|
||||
|
||||
nextTick(() => {
|
||||
calledOnNextTick(aString);
|
||||
});
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// Type definitions for async.nexttick 0.5
|
||||
// Project: https://www.npmjs.com/package/async.nexttick
|
||||
// Definitions by: Damien "pyrho" Rajon <https://github.com/pyrho>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export function nextTick(callback: () => void, ...args: any[]): void;
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"async.nexttick-tests.ts"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@ import { Plugin, Transformer as PostcssTransformer } from 'postcss';
|
||||
|
||||
declare namespace autoprefixer {
|
||||
interface Options {
|
||||
browsers?: string[];
|
||||
browsers?: string[] | string;
|
||||
env?: string;
|
||||
cascade?: boolean;
|
||||
add?: boolean;
|
||||
|
||||
Vendored
+8
-8
@@ -1265,17 +1265,17 @@ declare namespace Marionette {
|
||||
*/
|
||||
start(options?: any): void;
|
||||
|
||||
/** Deprecated! nstead of using the Application as the root of your view tree, you should use a Layout View.*/
|
||||
addRegions(regions: any): any;
|
||||
/** Root region of the application*/
|
||||
region: string;
|
||||
|
||||
/** Deprecated! nstead of using the Application as the root of your view tree, you should use a Layout View.*/
|
||||
emptyRegions(): void;
|
||||
/** Get the root region */
|
||||
getRegion(): Region;
|
||||
|
||||
/** Deprecated! nstead of using the Application as the root of your view tree, you should use a Layout View.*/
|
||||
removeRegion(region: Region): void;
|
||||
/** Show a view in the root region */
|
||||
showView(view: Backbone.View<Backbone.Model>): void;
|
||||
|
||||
/** Deprecated! nstead of using the Application as the root of your view tree, you should use a Layout View.*/
|
||||
getRegion(regionName: string): Region;
|
||||
/** Get the view from the root region*/
|
||||
getView(): any;
|
||||
|
||||
module(moduleNames: any, moduleDefinition: any): Module;
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
import * as block from "bem-cn";
|
||||
|
||||
// expected 'block'
|
||||
block("block")();
|
||||
|
||||
// expected 'block__elem'
|
||||
block("block")("elem")();
|
||||
|
||||
// expected 'block__elem block__elem_disabled block__elem_size_small'
|
||||
block("block")("elem", { disabled: true, size: 'small' })();
|
||||
|
||||
// expected 'block block_disabled'
|
||||
block("block")({ disabled: true})();
|
||||
|
||||
// expected 'block mix'
|
||||
block("block").mix("mix");
|
||||
|
||||
// expected 'block mix mix2'
|
||||
block("block").mix(["mix", "mix2"]);
|
||||
|
||||
// expected 'block is-hidden'
|
||||
block("block").state({ hidden: true });
|
||||
|
||||
// expected 'block'
|
||||
block("block").state({ hidden: false });
|
||||
|
||||
// expected 'block is-hidden is-error'
|
||||
block("block").state({ hidden: true, error: true });
|
||||
|
||||
// expected 'block is-loading'
|
||||
block("block").is({ loading: true });
|
||||
|
||||
// expected 'block has-content'
|
||||
block("block").has({ content: true });
|
||||
|
||||
block.setup({
|
||||
el: '~~',
|
||||
mod: '--',
|
||||
modValue: '-'
|
||||
});
|
||||
|
||||
// expected 'block~~elem'
|
||||
block("block")("elem");
|
||||
|
||||
// expected 'block block--mod-value'
|
||||
block("block")({ mod: "value"});
|
||||
Vendored
+41
@@ -0,0 +1,41 @@
|
||||
// Type definitions for bem-cn 2.1
|
||||
// Project: https://github.com/albburtsev/bem-cn
|
||||
// Definitions by: Vitaly Selkin <https://github.com/selkinvitaly>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
type StateFn = (states: { [key: string]: boolean }) => Inner;
|
||||
|
||||
interface Modifications {
|
||||
[key: string]: (string | boolean);
|
||||
}
|
||||
|
||||
interface Block {
|
||||
(name: string): Inner;
|
||||
|
||||
reset(): void;
|
||||
setup(settings?: Settings): void;
|
||||
}
|
||||
|
||||
interface Inner {
|
||||
(elem: string | Modifications): Inner;
|
||||
(elem: string, mods: Modifications): Inner;
|
||||
(): string;
|
||||
|
||||
mix(mixes: string | string[]): Inner;
|
||||
has: StateFn;
|
||||
state: StateFn;
|
||||
is: StateFn;
|
||||
toString(): string;
|
||||
split(separator: string, limit?: number): string[];
|
||||
}
|
||||
|
||||
interface Settings {
|
||||
ns?: string;
|
||||
el?: string;
|
||||
mod?: string;
|
||||
modValue?: string;
|
||||
classMap?: { [className: string]: string } | null;
|
||||
}
|
||||
|
||||
declare const block: Block;
|
||||
export = block;
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"bem-cn-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import 'browser-report';
|
||||
|
||||
function test_sync() {
|
||||
var browserInfo = window.browserReportSync();
|
||||
console.log(browserInfo.browser.name);
|
||||
}
|
||||
|
||||
function test_async() {
|
||||
window.browserReport((error, result) => {
|
||||
console.log(result.ip + ' ' + result.browser.name);
|
||||
});
|
||||
}
|
||||
Vendored
+56
@@ -0,0 +1,56 @@
|
||||
// Type definitions for browser-report v2.2.9
|
||||
// Project: https://github.com/JTOne123/browser-report
|
||||
// Definitions by: Paul Datsiuk <https://github.com/JTOne123>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface Window {
|
||||
browserReport(result: (error: ErrorEvent, report: ReportResult) => any): void;
|
||||
browserReportSync(): ReportResult;
|
||||
}
|
||||
|
||||
interface ReportResult {
|
||||
"browser": {
|
||||
"name": string,
|
||||
"version": string
|
||||
},
|
||||
"cookies": boolean,
|
||||
"flash": {
|
||||
"version": string
|
||||
},
|
||||
"ip": string,
|
||||
"country": {
|
||||
"name": string,
|
||||
"code": string,
|
||||
"city": string,
|
||||
"latitude" : string,
|
||||
"longitude": string,
|
||||
"timezone": string
|
||||
},
|
||||
"java": {
|
||||
"version": string
|
||||
},
|
||||
"lang": Array<string>,
|
||||
"os": {
|
||||
"name": string,
|
||||
"version": string
|
||||
},
|
||||
"screen": {
|
||||
"colors": number,
|
||||
"dppx": number,
|
||||
"height": number,
|
||||
"width": number
|
||||
},
|
||||
"scripts": boolean,
|
||||
"timestamp": string,
|
||||
"userAgent": string,
|
||||
"viewport": {
|
||||
"height": number,
|
||||
"layout": {
|
||||
"height": number,
|
||||
"width": number
|
||||
}
|
||||
"width": number,
|
||||
"zoom": number
|
||||
}
|
||||
"websockets": boolean
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"browser-report-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,48 +1,41 @@
|
||||
|
||||
/// <reference types="validator" />
|
||||
|
||||
import convict = require('convict');
|
||||
import validator = require('validator');
|
||||
|
||||
// define a schema
|
||||
|
||||
// straight from the convict tests
|
||||
const format : convict.Format = {
|
||||
const format: convict.Format = {
|
||||
name: 'float-percent',
|
||||
validate: function(val) {
|
||||
validate(val) {
|
||||
if (val !== 0 && (!val || val > 1 || val < 0)) {
|
||||
throw new Error('must be a float between 0 and 1, inclusive');
|
||||
}
|
||||
},
|
||||
coerce: function(val) {
|
||||
return +(<string> val);
|
||||
coerce(val) {
|
||||
return parseFloat(val);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
convict.addFormat(format);
|
||||
convict.addFormats({
|
||||
prime: {
|
||||
validate: function(val) {
|
||||
function isPrime(n: number) {
|
||||
if (n <= 1) return false; // zero and one are not prime
|
||||
for (var i=2; i*i <= n; i++) {
|
||||
if (n % i === 0) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (!isPrime(val)) throw new Error('must be a prime number');
|
||||
},
|
||||
coerce: function(val) {
|
||||
return parseInt(val, 10);
|
||||
prime: {
|
||||
validate(val) {
|
||||
function isPrime(n: number) {
|
||||
if (n <= 1) return false; // zero and one are not prime
|
||||
for (let i = 2; i * i <= n; i++) {
|
||||
if (n % i === 0) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (!isPrime(val)) throw new Error('must be a prime number');
|
||||
},
|
||||
coerce(val) {
|
||||
return parseInt(val, 10);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var conf = convict({
|
||||
let conf = convict({
|
||||
env: {
|
||||
doc: 'The applicaton environment.',
|
||||
format: ['production', 'development', 'test'],
|
||||
@@ -65,7 +58,11 @@ var conf = convict({
|
||||
},
|
||||
key: {
|
||||
doc: "API key",
|
||||
format: (val: string) => validator.isUUID(val),
|
||||
format: (val: string) => {
|
||||
if (!validator.isUUID(val)) {
|
||||
throw new Error('must be a valid UUID');
|
||||
}
|
||||
},
|
||||
default: '01527E56-8431-11E4-AF91-47B661C210CA'
|
||||
},
|
||||
db: {
|
||||
@@ -81,7 +78,13 @@ var conf = convict({
|
||||
default: 0,
|
||||
env: 'PORT',
|
||||
arg: 'port',
|
||||
}
|
||||
},
|
||||
password: {
|
||||
doc: 'The database password.',
|
||||
default: 'secret',
|
||||
format: String,
|
||||
sensitive: true,
|
||||
},
|
||||
},
|
||||
primeNumber: {
|
||||
format: 'prime',
|
||||
@@ -91,14 +94,12 @@ var conf = convict({
|
||||
format: 'float-percent',
|
||||
default: 0.5
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
|
||||
// load environment dependent configuration
|
||||
|
||||
var env = conf.get('env');
|
||||
var dbip = conf.get('db.ip');
|
||||
let env = conf.get('env');
|
||||
let dbip = conf.get('db.ip');
|
||||
conf.loadFile('./config/' + env + '.json');
|
||||
conf.loadFile(['./configs/always.json', './configs/sometimes.json']);
|
||||
|
||||
@@ -118,7 +119,7 @@ conf
|
||||
.validate({ allowed: 'warn' })
|
||||
.toString();
|
||||
|
||||
var port: number = conf.default('port');
|
||||
let port: number = conf.default('port');
|
||||
|
||||
if (conf.has('key')) {
|
||||
conf.set('the.awesome', true);
|
||||
|
||||
Vendored
+14
-18
@@ -1,11 +1,11 @@
|
||||
// Type definitions for convict 3.0
|
||||
// Type definitions for convict 4.0
|
||||
// Project: https://github.com/mozilla/node-convict
|
||||
// Definitions by: Wim Looman <https://github.com/Nemo157>, Vesa Poikajärvi <https://github.com/vesse>
|
||||
// Definitions by: Wim Looman <https://github.com/Nemo157>
|
||||
// Vesa Poikajärvi <https://github.com/vesse>
|
||||
// Eli Young <https://github.com/elyscape>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
declare namespace convict {
|
||||
|
||||
type ValidationMethod = 'strict' | 'warn';
|
||||
|
||||
interface ValidateOptions {
|
||||
@@ -23,8 +23,8 @@ declare namespace convict {
|
||||
|
||||
interface Format {
|
||||
name?: string;
|
||||
validate?: (val: any) => void;
|
||||
coerce?: (val: any) => any;
|
||||
validate?(val: any): void;
|
||||
coerce?(val: any): any;
|
||||
}
|
||||
|
||||
interface Schema {
|
||||
@@ -35,16 +35,18 @@ declare namespace convict {
|
||||
* From the implementation:
|
||||
*
|
||||
* format can be a:
|
||||
* - predefine type, as seen below
|
||||
* - predefined type, as seen below
|
||||
* - an array of enumerated values, e.g. ["production", "development", "testing"]
|
||||
* - built-in JavaScript type, i.e. Object, Array, String, Number, Boolean
|
||||
* - or if omitted, the Object.prototype.toString.call of the default value
|
||||
* - function that performs validation and throws an Error on failure
|
||||
*
|
||||
* The docs also state that any function that validates is ok too
|
||||
* If omitted, format will be set to the value of Object.prototype.toString.call
|
||||
* for the default value
|
||||
*/
|
||||
format?: string | Array<any> | Function;
|
||||
format?: string | any[] | ((val: any) => void);
|
||||
env?: string;
|
||||
arg?: string;
|
||||
sensitive?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -78,17 +80,11 @@ declare namespace convict {
|
||||
*/
|
||||
load(conf: Object): Config;
|
||||
/**
|
||||
* Loads and merges one JSON configuration file into config
|
||||
* Loads and merges JSON configuration file(s) into config
|
||||
*
|
||||
* @return {Config} instance
|
||||
*/
|
||||
loadFile(file: string): Config;
|
||||
/**
|
||||
* Loads and merges multiple JSON configuration files into config
|
||||
*
|
||||
* @return {Config} instance
|
||||
*/
|
||||
loadFile(files: string[]): Config;
|
||||
loadFile(files: string | string[]): Config;
|
||||
/**
|
||||
* Validates config against the schema used to initialize it
|
||||
*
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// ban-types needs to be disabled to support TypeScript <2.2
|
||||
"ban-types": false
|
||||
}
|
||||
}
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@
|
||||
// missing:
|
||||
// - Static methods that are defined in JQueryStatic.fn are not typed.
|
||||
// - Plugin and extension definitions are not typed.
|
||||
// - Some return types are not fully wokring
|
||||
// - Some return types are not fully working
|
||||
|
||||
/// <reference types="jquery" />
|
||||
|
||||
|
||||
@@ -145,3 +145,36 @@ secret.remove((err, response) => {
|
||||
secret.update((err, response) => {
|
||||
// NOOP
|
||||
});
|
||||
|
||||
const node = docker.getNode('nodeName');
|
||||
node.inspect((err, reponse) => {
|
||||
// NOOP
|
||||
});
|
||||
|
||||
node.inspect().then(response => {
|
||||
// NOOP
|
||||
});
|
||||
|
||||
node.update({}, (err, response) => {
|
||||
// NOOP
|
||||
});
|
||||
|
||||
node.update((err, response) => {
|
||||
// NOOP
|
||||
});
|
||||
|
||||
node.update({}).then(response => {
|
||||
// NOOP;
|
||||
});
|
||||
|
||||
node.remove({}, (err, response) => {
|
||||
// NOOP
|
||||
});
|
||||
|
||||
node.remove((err, response) => {
|
||||
// NOOP
|
||||
});
|
||||
|
||||
node.remove({}).then(response => {
|
||||
// NOOP;
|
||||
});
|
||||
|
||||
Vendored
+10
-1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/apocas/dockerode
|
||||
// Definitions by: Carl Winkler <https://github.com/seikho>, Nicolas Laplante <https://github.com/nlaplante>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
@@ -169,6 +170,14 @@ declare namespace Dockerode {
|
||||
inspect(callback: Callback<any>): void;
|
||||
inspect(): Promise<any>;
|
||||
|
||||
update(options: {}, callback: Callback<any>): void;
|
||||
update(callback: Callback<any>): void;
|
||||
update(options?: {}): Promise<any>;
|
||||
|
||||
remove(options: {}, callback: Callback<any>): void;
|
||||
remove(callback: Callback<any>): void;
|
||||
remove(options?: {}): Promise<any>;
|
||||
|
||||
modem: any;
|
||||
id?: string;
|
||||
}
|
||||
@@ -637,7 +646,7 @@ declare namespace Dockerode {
|
||||
interface DockerOptions {
|
||||
socketPath?: string;
|
||||
host?: string;
|
||||
port?: number;
|
||||
port?: number | string;
|
||||
ca?: string;
|
||||
cert?: string;
|
||||
key?: string;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import toJson from 'enzyme-to-json';
|
||||
|
||||
const wrapper = shallow(<strong>Hello World!</strong>);
|
||||
const result: object = toJson(wrapper);
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// Type definitions for enzyme-to-json 1.5
|
||||
// Project: https://github.com/adriantoine/enzyme-to-json#readme
|
||||
// Definitions by: Joscha Feth <https://github.com/joscha>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { ReactWrapper, ShallowWrapper } from 'enzyme';
|
||||
|
||||
export default function toJson<P, S>(wrapper: ShallowWrapper<P, S> | ReactWrapper<P, S> | Cheerio): object;
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"dom",
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"jsx": "react",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"enzyme-to-json-tests.tsx"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+1
-1
@@ -3086,7 +3086,7 @@ interface ITextOptions extends IObjectOptions {
|
||||
textBackgroundColor?: string;
|
||||
|
||||
path?: string;
|
||||
useNative?: Boolean;
|
||||
useNative?: boolean;
|
||||
text?: string;
|
||||
}
|
||||
export interface Text extends ITextOptions {}
|
||||
|
||||
@@ -205,7 +205,7 @@ readStream = fs.createReadStream(path, {
|
||||
writeStream = fs.createWriteStream(path);
|
||||
writeStream = fs.createWriteStream(path, {
|
||||
flags: str,
|
||||
encoding: str
|
||||
defaultEncoding: str
|
||||
});
|
||||
|
||||
let isDirectoryCallback = (err: Error, isDirectory: boolean) => {
|
||||
|
||||
Vendored
+273
-237
@@ -6,8 +6,24 @@
|
||||
|
||||
/// <reference types="gapi" />
|
||||
|
||||
declare namespace gapi.client.drive {
|
||||
export namespace files {
|
||||
declare namespace gapi.client {
|
||||
export module drive {
|
||||
const files: {
|
||||
get: (parameters: GetParameters) => HttpRequest<FileResource>;
|
||||
patch: (parameters: PatchParameters) => HttpRequest<FileResource>;
|
||||
copy: (parameters: CopyParameters) => HttpRequest<FileResource>;
|
||||
delete: (parameters: DeleteParameters) => HttpRequest<any>;
|
||||
emptyTrash: () => HttpRequest<any>;
|
||||
export: (parameters: ExportParameters) => HttpRequest<FileResource>;
|
||||
generateIds: (parameters: GenerateIdsParameters) => HttpRequest<IdsResource>;
|
||||
insert: (parameters: InsertParameters) => HttpRequest<FileResource>;
|
||||
list: (parameters: ListParameters) => HttpRequest<FileListResource>;
|
||||
touch: (parameters: TouchParameters) => HttpRequest<FileResource>;
|
||||
trash: (parameters: TrashParameters) => HttpRequest<FileResource>;
|
||||
untrash: (parameters: UntrashParameters) => HttpRequest<FileResource>;
|
||||
watch: (parameters: WatchParameters) => HttpRequest<ChannelResource>;
|
||||
}
|
||||
|
||||
interface GetParameters {
|
||||
fileId: string;
|
||||
acknowledgeAbuse?: boolean;
|
||||
@@ -17,8 +33,6 @@ declare namespace gapi.client.drive {
|
||||
updateViewedDate?: boolean;
|
||||
}
|
||||
|
||||
export function get(parameters: GetParameters): HttpRequest<FileResource>;
|
||||
|
||||
interface PatchParameters {
|
||||
fileId: string;
|
||||
resource?: FileResource
|
||||
@@ -37,8 +51,6 @@ declare namespace gapi.client.drive {
|
||||
useContentAsIndexableText?: boolean;
|
||||
}
|
||||
|
||||
export function patch(parameters: PatchParameters): HttpRequest<FileResource>;
|
||||
|
||||
interface CopyParameters {
|
||||
fileId: string;
|
||||
resource?: FileResource;
|
||||
@@ -52,13 +64,39 @@ declare namespace gapi.client.drive {
|
||||
visibility?: string;
|
||||
}
|
||||
|
||||
export function copy(parameters: CopyParameters): HttpRequest<FileResource>;
|
||||
interface DeleteParameters {
|
||||
fileId: string;
|
||||
supportsTeamDrives?: boolean;
|
||||
}
|
||||
|
||||
interface ExportParameters {
|
||||
fileId: string;
|
||||
mimeType: string;
|
||||
}
|
||||
|
||||
interface GenerateIdsParameters {
|
||||
maxResults?: number;
|
||||
space?: string;
|
||||
}
|
||||
|
||||
interface InsertParameters {
|
||||
uploadType: string;
|
||||
convert?: boolean;
|
||||
ocr?: boolean;
|
||||
ocrLanguage?: string;
|
||||
pinned?: boolean;
|
||||
supportsTeamDrives?: boolean;
|
||||
timedTextLanguage?: string;
|
||||
timedTextTrackName?: string;
|
||||
usecontentAsIndexableText?: boolean;
|
||||
visibility?: string;
|
||||
}
|
||||
|
||||
interface ListParameters {
|
||||
corpora?: string;
|
||||
corpus?: string;
|
||||
includeTeamDriveItems?: boolean;
|
||||
maxResults: number;
|
||||
maxResults?: number;
|
||||
orderBy?: string;
|
||||
pageToken?: string;
|
||||
projection?: string;
|
||||
@@ -68,28 +106,22 @@ declare namespace gapi.client.drive {
|
||||
teamDriveId?: string;
|
||||
}
|
||||
|
||||
export function list(parameters: ListParameters): HttpRequest<FileListResource>;
|
||||
|
||||
interface TouchParameters {
|
||||
fileId: string;
|
||||
supportsTeamDrives?: boolean;
|
||||
}
|
||||
|
||||
export function touch(parameters: TouchParameters): HttpRequest<FileResource>;
|
||||
|
||||
interface TrashParameters {
|
||||
fileId: string;
|
||||
supportsTeamDrives?: boolean;
|
||||
}
|
||||
|
||||
export function trash(parameters: TrashParameters): HttpRequest<FileResource>;
|
||||
|
||||
interface UntrashParameters {
|
||||
fileId: string;
|
||||
supportsTeamDrives?: boolean;
|
||||
}
|
||||
|
||||
export function untrash(parameters: UntrashParameters): HttpRequest<FileResource>;
|
||||
|
||||
interface WatchParameters {
|
||||
fileId: string;
|
||||
@@ -98,239 +130,243 @@ declare namespace gapi.client.drive {
|
||||
supportsTeamDrives?: boolean;
|
||||
}
|
||||
|
||||
export function watch(parameters: WatchParameters): HttpRequest<ChannelResource>;
|
||||
}
|
||||
|
||||
export interface FileResource {
|
||||
kind: 'drive#file';
|
||||
id?: string;
|
||||
// etag
|
||||
selfLink?: string;
|
||||
webContentLink?: string;
|
||||
webViewLink?: string;
|
||||
alternateLink?: string;
|
||||
embedLink?: string;
|
||||
// openWithLinks
|
||||
defaultOpenWithLink?: string;
|
||||
iconLink?: string;
|
||||
hasThumbnail?: boolean;
|
||||
thumbnailLink?: string;
|
||||
thumbnail?: {
|
||||
image: Uint8Array;
|
||||
mimType: string;
|
||||
};
|
||||
title?: string;
|
||||
mimeType?: string;
|
||||
description?: string;
|
||||
labels?: {
|
||||
starred?: boolean;
|
||||
hidden?: boolean;
|
||||
trashed?: boolean;
|
||||
restricted?: boolean;
|
||||
viewed?: boolean;
|
||||
modified?: boolean;
|
||||
};
|
||||
createdDate?: Date;
|
||||
modifiedDate?: Date;
|
||||
modifiedByMeDate?: Date;
|
||||
lastViewedByMeDate?: Date;
|
||||
markedViewedByMeDate?: Date;
|
||||
sharedWithMeDate?: Date;
|
||||
version?: number;
|
||||
sharingUser?: {
|
||||
kind: 'drive#user';
|
||||
displayName?: string;
|
||||
picture?: {
|
||||
url: string;
|
||||
interface FileResource {
|
||||
kind: 'drive#file';
|
||||
id: string;
|
||||
etag: string;
|
||||
selfLink: string;
|
||||
webContentLink: string;
|
||||
webViewLink: string;
|
||||
alternateLink: string;
|
||||
embedLink: string;
|
||||
// openWithLinks
|
||||
defaultOpenWithLink: string;
|
||||
iconLink: string;
|
||||
hasThumbnail: boolean;
|
||||
thumbnailLink: string;
|
||||
thumbnail: {
|
||||
image: Uint8Array;
|
||||
mimType: string;
|
||||
};
|
||||
isAuthenticatedUser?: boolean;
|
||||
permissionId?: string;
|
||||
emailAddress?: string;
|
||||
};
|
||||
parents?: ParentResource[];
|
||||
downloadUrl?: string;
|
||||
// exportLinks
|
||||
indexableText?: {
|
||||
text: string;
|
||||
};
|
||||
userPermission?: PermissionResource;
|
||||
permissions?: PermissionResource[];
|
||||
hasAugmentedPermissions?: boolean;
|
||||
originalFilename?: string;
|
||||
fileExtension?: string;
|
||||
fullFileExtension?: string;
|
||||
md5Checksum?: string;
|
||||
fileSize?: number;
|
||||
quotaBytesUsed?: number;
|
||||
ownerNames?: string[];
|
||||
owners?: {
|
||||
kind: 'drive#user';
|
||||
displayName?: string;
|
||||
picture?: {
|
||||
url: string;
|
||||
title: string;
|
||||
mimeType: string;
|
||||
description: string;
|
||||
labels: {
|
||||
starred: boolean;
|
||||
hidden: boolean;
|
||||
trashed: boolean;
|
||||
restricted: boolean;
|
||||
viewed: boolean;
|
||||
modified: boolean;
|
||||
};
|
||||
isAuthenticatedUser?: boolean;
|
||||
permissionId?: string;
|
||||
emailAddress?: string;
|
||||
}[];
|
||||
teamDriveId?: string;
|
||||
lastModifyingUserName?: string;
|
||||
lastModifyingUser?: {
|
||||
kind: 'drive#user';
|
||||
displayName?: string;
|
||||
picture?: {
|
||||
url: string;
|
||||
createdDate: Date;
|
||||
modifiedDate: Date;
|
||||
modifiedByMeDate: Date;
|
||||
lastViewedByMeDate: Date;
|
||||
markedViewedByMeDate: Date;
|
||||
sharedWithMeDate: Date;
|
||||
version: number;
|
||||
sharingUser: {
|
||||
kind: 'drive#user';
|
||||
displayName: string;
|
||||
picture: {
|
||||
url: string;
|
||||
};
|
||||
isAuthenticatedUser: boolean;
|
||||
permissionId: string;
|
||||
emailAddress: string;
|
||||
};
|
||||
isAuthenticatedUser?: boolean;
|
||||
permissionId?: string;
|
||||
emailAddress?: string;
|
||||
};
|
||||
ownedByMe?: boolean;
|
||||
capabilities?: {
|
||||
canAddChildren?: boolean;
|
||||
canChangeRestrictedDownload?: boolean;
|
||||
canComment?: boolean;
|
||||
canCopy?: boolean;
|
||||
canDelete?: boolean;
|
||||
canDownload?: boolean;
|
||||
canEdit?: boolean;
|
||||
canListChildren?: boolean;
|
||||
canMoveItemIntoTeamDrive?: boolean;
|
||||
canMoveTeamDriveItem?: boolean;
|
||||
canReadRevisions?: boolean;
|
||||
canReadTeamDrive?: boolean;
|
||||
canRemoveChildren?: boolean;
|
||||
canRename?: boolean;
|
||||
canShare?: boolean;
|
||||
canTrash?: boolean;
|
||||
canUntrash?: boolean;
|
||||
};
|
||||
editable?: boolean;
|
||||
canComment?: boolean;
|
||||
canReadRevisions?: boolean;
|
||||
shareable?: boolean;
|
||||
copyable?: boolean;
|
||||
writersCanShare?: boolean;
|
||||
shared?: boolean;
|
||||
explicitlyTrashed?: boolean;
|
||||
trashingUser?: {
|
||||
kind: 'drive#user';
|
||||
displayName?: string;
|
||||
picture?: {
|
||||
url: string;
|
||||
parents: ParentResource[];
|
||||
downloadUrl: string;
|
||||
// exportLinks
|
||||
indexableText: {
|
||||
text: string;
|
||||
};
|
||||
isAuthenticatedUser?: boolean;
|
||||
permissionId?: string;
|
||||
emailAddress?: string;
|
||||
};
|
||||
trashedDate?: Date;
|
||||
appDataContents?: boolean;
|
||||
headRevisionId?: string;
|
||||
properties?: PropertiesResource[];
|
||||
folderColorRgb?: string;
|
||||
imageMediaMetadata?: {
|
||||
width?: number;
|
||||
height?: number;
|
||||
rotation?: number;
|
||||
location?: {
|
||||
latitude?: number;
|
||||
longitude?: number;
|
||||
altitude?: number;
|
||||
userPermission: PermissionResource;
|
||||
permissions: PermissionResource[];
|
||||
hasAugmentedPermissions: boolean;
|
||||
originalFilename: string;
|
||||
fileExtension: string;
|
||||
fullFileExtension: string;
|
||||
md5Checksum: string;
|
||||
fileSize: number;
|
||||
quotaBytesUsed: number;
|
||||
ownerNames: string[];
|
||||
owners: {
|
||||
kind: 'drive#user';
|
||||
displayName: string;
|
||||
picture: {
|
||||
url: string;
|
||||
};
|
||||
isAuthenticatedUser: boolean;
|
||||
permissionId: string;
|
||||
emailAddress: string;
|
||||
}[];
|
||||
teamDriveId: string;
|
||||
lastModifyingUserName: string;
|
||||
lastModifyingUser: {
|
||||
kind: 'drive#user';
|
||||
displayName: string;
|
||||
picture: {
|
||||
url: string;
|
||||
};
|
||||
isAuthenticatedUser: boolean;
|
||||
permissionId: string;
|
||||
emailAddress: string;
|
||||
};
|
||||
date?: string;
|
||||
cameraMake?: string;
|
||||
cameraModel?: string;
|
||||
exposureTime?: number;
|
||||
aperture?: number;
|
||||
flashUsed?: boolean;
|
||||
focalLength?: number;
|
||||
isoSpeed?: number;
|
||||
meteringMode?: string;
|
||||
sensor?: string;
|
||||
exposureMode?: string;
|
||||
colorSpace?: string;
|
||||
whiteBalance?: string;
|
||||
exposureBias?: number;
|
||||
maxApertureValue?: number;
|
||||
subjectDistance?: number;
|
||||
lens?: string;
|
||||
};
|
||||
videoMediaMetadata?: {
|
||||
width?: number;
|
||||
height?: number;
|
||||
durationMillis?: number;
|
||||
};
|
||||
spaces?: string[];
|
||||
isAppAuthorized?: boolean;
|
||||
}
|
||||
ownedByMe: boolean;
|
||||
capabilities: {
|
||||
canAddChildren: boolean;
|
||||
canChangeRestrictedDownload: boolean;
|
||||
canComment: boolean;
|
||||
canCopy: boolean;
|
||||
canDelete: boolean;
|
||||
canDownload: boolean;
|
||||
canEdit: boolean;
|
||||
canListChildren: boolean;
|
||||
canMoveItemIntoTeamDrive: boolean;
|
||||
canMoveTeamDriveItem: boolean;
|
||||
canReadRevisions: boolean;
|
||||
canReadTeamDrive: boolean;
|
||||
canRemoveChildren: boolean;
|
||||
canRename: boolean;
|
||||
canShare: boolean;
|
||||
canTrash: boolean;
|
||||
canUntrash: boolean;
|
||||
};
|
||||
editable: boolean;
|
||||
canComment: boolean;
|
||||
canReadRevisions: boolean;
|
||||
shareable: boolean;
|
||||
copyable: boolean;
|
||||
writersCanShare: boolean;
|
||||
shared: boolean;
|
||||
explicitlyTrashed: boolean;
|
||||
trashingUser: {
|
||||
kind: 'drive#user';
|
||||
displayName: string;
|
||||
picture: {
|
||||
url: string;
|
||||
};
|
||||
isAuthenticatedUser: boolean;
|
||||
permissionId: string;
|
||||
emailAddress: string;
|
||||
};
|
||||
trashedDate: Date;
|
||||
appDataContents: boolean;
|
||||
headRevisionId: string;
|
||||
properties: PropertiesResource[];
|
||||
folderColorRgb: string;
|
||||
imageMediaMetadata: {
|
||||
width: number;
|
||||
height: number;
|
||||
rotation: number;
|
||||
location: {
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
altitude: number;
|
||||
};
|
||||
date: string;
|
||||
cameraMake: string;
|
||||
cameraModel: string;
|
||||
exposureTime: number;
|
||||
aperture: number;
|
||||
flashUsed: boolean;
|
||||
focalLength: number;
|
||||
isoSpeed: number;
|
||||
meteringMode: string;
|
||||
sensor: string;
|
||||
exposureMode: string;
|
||||
colorSpace: string;
|
||||
whiteBalance: string;
|
||||
exposureBias: number;
|
||||
maxApertureValue: number;
|
||||
subjectDistance: number;
|
||||
lens: string;
|
||||
};
|
||||
videoMediaMetadata: {
|
||||
width: number;
|
||||
height: number;
|
||||
durationMillis: number;
|
||||
};
|
||||
spaces: string[];
|
||||
isAppAuthorized: boolean;
|
||||
}
|
||||
|
||||
export interface FileListResource {
|
||||
kind: 'drive#fileList';
|
||||
// etag
|
||||
selfLink?: string;
|
||||
nextPageToken?: string;
|
||||
nextLink?: string;
|
||||
incompleteSearch?: boolean;
|
||||
items: FileResource[];
|
||||
}
|
||||
interface FileListResource {
|
||||
kind: 'drive#fileList';
|
||||
etag: string;
|
||||
selfLink: string;
|
||||
nextPageToken: string;
|
||||
nextLink: string;
|
||||
incompleteSearch: boolean;
|
||||
items: FileResource[];
|
||||
}
|
||||
|
||||
export interface ParentResource {
|
||||
kind: 'drive#parentReference';
|
||||
id?: string;
|
||||
selfLink?: string;
|
||||
parentLink?: string;
|
||||
isRoot?: boolean;
|
||||
}
|
||||
interface ParentResource {
|
||||
kind: 'drive#parentReference';
|
||||
id: string;
|
||||
selfLink: string;
|
||||
parentLink: string;
|
||||
isRoot: boolean;
|
||||
}
|
||||
|
||||
export interface PermissionResource {
|
||||
kind: 'drive#permission';
|
||||
// etag
|
||||
id?: string;
|
||||
selfLink?: string;
|
||||
name?: string;
|
||||
emailAddress?: string;
|
||||
domain?: string;
|
||||
role?: string;
|
||||
additionalRoles?: string[];
|
||||
type?: string;
|
||||
value?: string;
|
||||
authKey?: string;
|
||||
withLink?: boolean;
|
||||
photoLink?: string;
|
||||
expirationDate?: Date;
|
||||
teamDrivePermissionDetails?: {
|
||||
teamDrivePermissionType?: string;
|
||||
role?: string;
|
||||
additionalRoles?: string[];
|
||||
inheritedFrom?: string;
|
||||
inherited?: boolean;
|
||||
}[];
|
||||
deleted?: boolean;
|
||||
}
|
||||
interface PermissionResource {
|
||||
kind: 'drive#permission';
|
||||
etag: string;
|
||||
id: string;
|
||||
selfLink: string;
|
||||
name: string;
|
||||
emailAddress: string;
|
||||
domain: string;
|
||||
role: string;
|
||||
additionalRoles: string[];
|
||||
type: string;
|
||||
value: string;
|
||||
authKey: string;
|
||||
withLink: boolean;
|
||||
photoLink: string;
|
||||
expirationDate: Date;
|
||||
teamDrivePermissionDetails: {
|
||||
teamDrivePermissionType: string;
|
||||
role: string;
|
||||
additionalRoles: string[];
|
||||
inheritedFrom: string;
|
||||
inherited: boolean;
|
||||
}[];
|
||||
deleted: boolean;
|
||||
}
|
||||
|
||||
export interface PropertiesResource {
|
||||
kind: 'drive$property';
|
||||
// etag
|
||||
selfLink?: string;
|
||||
key?: string;
|
||||
visibility?: string;
|
||||
value?: string;
|
||||
}
|
||||
interface PropertiesResource {
|
||||
kind: 'drive$property';
|
||||
etag: string;
|
||||
selfLink: string;
|
||||
key: string;
|
||||
visibility: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface WatchResource {
|
||||
id?: string;
|
||||
expiration?: number;
|
||||
token?: string;
|
||||
type?: string;
|
||||
address?: string;
|
||||
}
|
||||
interface WatchResource {
|
||||
id: string;
|
||||
expiration: number;
|
||||
token: string;
|
||||
type: string;
|
||||
address: string;
|
||||
}
|
||||
|
||||
export interface ChannelResource {
|
||||
kind: 'api#channel';
|
||||
id?: string;
|
||||
resourceId?: string;
|
||||
resourceUri?: string;
|
||||
token?: string;
|
||||
expiration?: number;
|
||||
interface ChannelResource {
|
||||
kind: 'api#channel';
|
||||
id: string;
|
||||
resourceId: string;
|
||||
resourceUri: string;
|
||||
token: string;
|
||||
expiration: number;
|
||||
}
|
||||
|
||||
interface IdsResource {
|
||||
kind: 'drive#generatedIds';
|
||||
space: string;
|
||||
ids: string[];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import { IOptions } from 'glob';
|
||||
|
||||
import * as globby from "globby";
|
||||
|
||||
(async () => {
|
||||
let result: string[];
|
||||
result = await globby('*.tmp');
|
||||
result = await globby(['a.tmp', '*.tmp', '!{c,d,e}.tmp']);
|
||||
|
||||
result = globby.sync('*.tmp');
|
||||
result = globby.sync(['a.tmp', '*.tmp', '!{c,d,e}.tmp']);
|
||||
|
||||
result = await globby('*.tmp', Object.freeze({ignore: Object.freeze([])}));
|
||||
result = globby.sync('*.tmp', Object.freeze({ignore: Object.freeze([])}));
|
||||
})();
|
||||
|
||||
const tasks: Array<{
|
||||
pattern: string,
|
||||
options: IOptions
|
||||
}> = globby.generateGlobTasks(['*.tmp', '!b.tmp'], {ignore: ['c.tmp']});
|
||||
|
||||
console.log(globby.hasMagic('**') === true);
|
||||
console.log(globby.hasMagic(['**', 'path1', 'path2']) === true);
|
||||
console.log(globby.hasMagic(['path1', 'path2']) === false);
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// Type definitions for globby 0.6
|
||||
// Project: https://github.com/sindresorhus/globby#readme
|
||||
// Definitions by: Douglas Duteil <https://github.com/douglasduteil>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { IOptions } from 'glob';
|
||||
|
||||
declare function globby(patterns: string | string[], options?: IOptions): Promise<string[]>;
|
||||
|
||||
declare namespace globby {
|
||||
function sync(patterns: string | string[], options?: IOptions): string[];
|
||||
function generateGlobTasks(patterns: string | string[], options?: IOptions): Array<{pattern: string, options: IOptions}>;
|
||||
function hasMagic(patterns: string | string[], options?: IOptions): boolean;
|
||||
}
|
||||
|
||||
export = globby;
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"globby-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+3
-3
@@ -8,11 +8,11 @@ export function formatError(error: GraphQLError): GraphQLFormattedError;
|
||||
|
||||
export type GraphQLFormattedError = {
|
||||
message: string,
|
||||
locations: Array<GraphQLErrorLocation>,
|
||||
path: Array<string | number>
|
||||
locations?: Array<GraphQLErrorLocation>,
|
||||
path?: Array<string | number>
|
||||
};
|
||||
|
||||
export type GraphQLErrorLocation = {
|
||||
line: number,
|
||||
column: number
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
import {IFrameComponent, IFrameOptions, iframeResizer} from "iframe-resizer";
|
||||
|
||||
function testOne(): void {
|
||||
let iframe: HTMLIFrameElement = document.createElement('iframe');
|
||||
let options: IFrameOptions = {log: true};
|
||||
let components: IFrameComponent[] = iframeResizer(options, iframe);
|
||||
if (components) {
|
||||
components.forEach(component => console.log(component.iFrameResizer));
|
||||
} else {
|
||||
console.log("No components");
|
||||
}
|
||||
}
|
||||
|
||||
function testTwo(): void {
|
||||
let iframe: HTMLIFrameElement = document.createElement('iframe');
|
||||
let components: IFrameComponent[] = iframeResizer({
|
||||
initCallback: () => {
|
||||
console.log('Init');
|
||||
},
|
||||
closedCallback: () => {
|
||||
console.log('Closed');
|
||||
}
|
||||
}, iframe);
|
||||
if (components) {
|
||||
components.forEach(component => console.log(component.iFrameResizer));
|
||||
} else {
|
||||
console.log("No components");
|
||||
}
|
||||
}
|
||||
|
||||
testOne();
|
||||
testTwo();
|
||||
Vendored
+196
@@ -0,0 +1,196 @@
|
||||
// Type definitions for iframe-resizer 3.5
|
||||
// Project: https://github.com/davidjbradshaw/iframe-resizer
|
||||
// Definitions by: Armin Baljic <https://github.com/arminbaljic>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// tslint:disable:prefer-method-signature
|
||||
// tslint:disable-next-line:no-single-declare-module
|
||||
declare module 'iframe-resizer' {
|
||||
// tslint:disable-next-line:interface-name
|
||||
interface IFrameObject {
|
||||
close(): void;
|
||||
moveToAnchor(anchor: string): void;
|
||||
resize(): void;
|
||||
sendMessage(message: any): void;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:interface-name
|
||||
interface IFrameComponent extends HTMLIFrameElement {
|
||||
iFrameResizer: IFrameObject;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:interface-name
|
||||
interface IFrameOptions {
|
||||
/**
|
||||
* When enabled changes to the Window size or the DOM will cause the iFrame to resize to the new content size.
|
||||
* Disable if using size method with custom dimensions.
|
||||
*/
|
||||
autoResize?: boolean;
|
||||
/**
|
||||
* Override the body background style in the iFrame.
|
||||
*/
|
||||
bodyBackground?: string;
|
||||
/**
|
||||
* Override the default body margin style in the iFrame. A string can be any valid value for the
|
||||
* CSS margin attribute, for example '8px 3em'. A number value is converted into px.
|
||||
*/
|
||||
bodyMargin?: number;
|
||||
/**
|
||||
* When set to true, only allow incoming messages from the domain listed in the src property of the iFrame tag.
|
||||
* If your iFrame navigates between different domains, ports or protocols; then you will need to
|
||||
* provide an array of URLs or disable this option.
|
||||
*/
|
||||
checkOrigin?: boolean;
|
||||
/**
|
||||
* When enabled in page linking inside the iFrame and from the iFrame to the parent page will be enabled.
|
||||
*/
|
||||
inPageLinks?: boolean;
|
||||
/**
|
||||
* Height calculation method.
|
||||
*/
|
||||
heightCalculationMethod?: string;
|
||||
/**
|
||||
* Set iFrame Id
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* In browsers that don't support mutationObserver, such as IE10, the library falls back to using
|
||||
* setInterval, to check for changes to the page size.
|
||||
*/
|
||||
interval?: number;
|
||||
/**
|
||||
* Setting the log option to true will make the scripts in both the host page and the iFrame output
|
||||
* everything they do to the JavaScript console so you can see the communication between the two scripts.
|
||||
*/
|
||||
log?: boolean;
|
||||
/**
|
||||
* Set maximum height of iFrame.
|
||||
*/
|
||||
maxHeight?: number;
|
||||
/**
|
||||
* Set maximum width of iFrame.
|
||||
*/
|
||||
maxWidth?: number;
|
||||
/**
|
||||
* Set minimum height of iFrame.
|
||||
*/
|
||||
minHeight?: number;
|
||||
/**
|
||||
* Set minimum width of iFrame.
|
||||
*/
|
||||
minWidth?: number;
|
||||
/**
|
||||
* Listen for resize events from the parent page, or the iFrame. Select the 'child' value if the iFrame
|
||||
* can be resized independently of the browser window. Selecting this value can cause issues with some
|
||||
* height calculation methods on mobile devices.
|
||||
*/
|
||||
resizeFrom?: string;
|
||||
/**
|
||||
* Enable scroll bars in iFrame.
|
||||
*/
|
||||
scrolling?: boolean;
|
||||
/**
|
||||
* Resize iFrame to content height.
|
||||
*/
|
||||
sizeHeight?: boolean;
|
||||
/**
|
||||
* Resize iFrame to content width.
|
||||
*/
|
||||
sizeWidth?: boolean;
|
||||
/**
|
||||
* Set the number of pixels the iFrame content size has to change by, before triggering a resize of the iFrame.
|
||||
*/
|
||||
tolerance?: number;
|
||||
/**
|
||||
* Width calculation method.
|
||||
*/
|
||||
widthCalculationMethod?: string;
|
||||
/**
|
||||
* Called when iFrame is closed via parentIFrame.close() or iframe.iframeResizer.close() methods.
|
||||
*/
|
||||
closedCallback?: (iframeId?: string) => void;
|
||||
/**
|
||||
* Initial setup callback function.
|
||||
*/
|
||||
initCallback?: (iframe?: IFrameComponent) => void;
|
||||
/**
|
||||
* Receive message posted from iFrame with the parentIFrame.sendMessage() method.
|
||||
*/
|
||||
messageCallback?: (data: IFrameMessageData) => void;
|
||||
/**
|
||||
* Function called after iFrame resized. Passes in messageData object containing the iFrame, height, width
|
||||
* and the type of event that triggered the iFrame to resize.
|
||||
*/
|
||||
resizedCallback?: (data: IFrameResizedData) => void;
|
||||
/**
|
||||
* Called before the page is repositioned after a request from the iFrame, due to either an in page link,
|
||||
* or a direct request from either parentIFrame.scrollTo() or parentIFrame.scrollToOffset().
|
||||
* If this callback function returns false, it will stop the library from repositioning the page, so that
|
||||
* you can implement your own animated page scrolling instead.
|
||||
*/
|
||||
scrollCallback?: (data: IFrameScrollData) => boolean;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:interface-name
|
||||
interface IFramePageOptions {
|
||||
/**
|
||||
* This option allows you to restrict the domain of the parent page,
|
||||
* to prevent other sites mimicking your parent page.
|
||||
*/
|
||||
targetOrigin?: string;
|
||||
/**
|
||||
* Receive message posted from the parent page with the iframe.iFrameResizer.sendMessage() method.
|
||||
*/
|
||||
messageCallback?: (message: any) => void;
|
||||
/**
|
||||
* This function is called once iFrame-Resizer has been initialized after receiving a call from the parent page.
|
||||
*/
|
||||
readyCallback?: () => void;
|
||||
/**
|
||||
* These option can be used to override the option set in the parent page
|
||||
*/
|
||||
heightCalculationMethod?: string;
|
||||
/**
|
||||
* These option can be used to override the option set in the parent page
|
||||
*/
|
||||
widthCalculationMethod?: string;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:interface-name
|
||||
interface IFramePage {
|
||||
autoResize(resize?: boolean): boolean;
|
||||
close(): void;
|
||||
getId(): string;
|
||||
getPageInfo(callback: (data: any) => void | false): void;
|
||||
scrollTo(x: number, y: number): void;
|
||||
scrollToOffset(x: number, y: number): void;
|
||||
sendMessage(message: any, targetOrigin: string): void;
|
||||
setHeightCalculationMethod(method: string): void;
|
||||
setWidthCalculationMethod(method: string): void;
|
||||
setTargetOrigin(targetOrigin: string): void;
|
||||
size(customHeight: string, customWidth: string): void;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:interface-name
|
||||
interface IFrameResizedData {
|
||||
iframe: IFrameComponent;
|
||||
height: number;
|
||||
width: number;
|
||||
type: string;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:interface-name
|
||||
interface IFrameMessageData {
|
||||
iframe: IFrameComponent;
|
||||
message: string;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:interface-name
|
||||
interface IFrameScrollData {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
function iframeResizer(options: IFrameOptions, target: HTMLElement): IFrameComponent[];
|
||||
}
|
||||
// tslint:enable:prefer-method-signature
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
],
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"iframe-resizer-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/mde/jake
|
||||
// Definitions by: Kon <http://phyzkit.net/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
|
||||
Vendored
+3
@@ -1,6 +1,7 @@
|
||||
// Type definitions for jquery.fancytree 2.7.0
|
||||
// Project: https://github.com/mar10/fancytree
|
||||
// Definitions by: Peter Palotas <https://github.com/alphaleonis>
|
||||
// Mahdi Abedi <https://github.com/abedi-ir>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -721,6 +722,8 @@ declare namespace Fancytree {
|
||||
restore?(event: JQueryEventObject, data: EventData): void;
|
||||
/** `data.node` was selected */
|
||||
select?(event: JQueryEventObject, data: EventData): void;
|
||||
/** Enable RTL version, default is false */
|
||||
rtl?: boolean;
|
||||
}
|
||||
|
||||
interface FancytreeOptions extends FancytreeEvents {
|
||||
|
||||
Vendored
+3
-1
@@ -702,7 +702,9 @@ interface JQueryCoordinates {
|
||||
/**
|
||||
* The interface used to specify the properties parameter in css()
|
||||
*/
|
||||
type cssPropertySetter = (index: number, value?: string) => string | number;
|
||||
interface cssPropertySetter {
|
||||
(index: number, value?: string): string | number;
|
||||
}
|
||||
interface JQueryCssProperties {
|
||||
[propertyName: string]: string | number | cssPropertySetter;
|
||||
}
|
||||
|
||||
Vendored
+3
-1
@@ -702,7 +702,9 @@ interface JQueryCoordinates {
|
||||
/**
|
||||
* The interface used to specify the properties parameter in css()
|
||||
*/
|
||||
type cssPropertySetter = (index: number, value?: string) => string | number;
|
||||
interface cssPropertySetter {
|
||||
(index: number, value?: string): string | number;
|
||||
}
|
||||
interface JQueryCssProperties {
|
||||
[propertyName: string]: string | number | cssPropertySetter;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -16,8 +16,8 @@ declare namespace kendo {
|
||||
names: string[];
|
||||
namesAbbr: string[];
|
||||
namesShort: string[];
|
||||
firstDay: number;
|
||||
};
|
||||
firstDay: number;
|
||||
months: {
|
||||
names: string[];
|
||||
namesAbbr: string[];
|
||||
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/brianc/node-libpq#readme
|
||||
// Definitions by: Vlad Rindevich <https://github.com/Lodin>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { divide } from "../index";
|
||||
export = divide;
|
||||
Vendored
+79
-1
@@ -187,7 +187,7 @@ Misc:
|
||||
- [ ] _.extendWith as an alias of _.assignInWith
|
||||
- [ ] Added clear method to _.memoize.Cache
|
||||
- [ ] Added support for ES6 maps, sets, & symbols to _.clone, _.isEqual, & _.toArray
|
||||
- [ ] Enabled _.flow & _.flowRight to accept an array of functions
|
||||
- [x] Enabled _.flow & _.flowRight to accept an array of functions
|
||||
- [ ] Ensured “Collection” methods treat functions as objects
|
||||
- [ ] Ensured _.assign, _.defaults, & _.merge coerce object values to objects
|
||||
- [ ] Ensured _.bindKey bound functions call object[key] when called with the new operator
|
||||
@@ -10799,6 +10799,7 @@ declare namespace _ {
|
||||
flow<A1, A2, A3, A4, R1, R2, R3, R4, R5, R6, R7>(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3, a4: A4) => R7;
|
||||
// generic function
|
||||
flow<TResult extends Function>(...funcs: Function[]): TResult;
|
||||
flow<TResult extends Function>(funcs: Function[]): TResult;
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
@@ -10806,6 +10807,10 @@ declare namespace _ {
|
||||
* @see _.flow
|
||||
*/
|
||||
flow<TResult extends Function>(...funcs: Function[]): LoDashImplicitObjectWrapper<TResult>;
|
||||
/**
|
||||
* @see _.flow
|
||||
*/
|
||||
flow<TResult extends Function>(funcs: Function[]): LoDashImplicitObjectWrapper<TResult>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
@@ -10813,6 +10818,10 @@ declare namespace _ {
|
||||
* @see _.flow
|
||||
*/
|
||||
flow<TResult extends Function>(...funcs: Function[]): LoDashExplicitObjectWrapper<TResult>;
|
||||
/**
|
||||
* @see _.flow
|
||||
*/
|
||||
flow<TResult extends Function>(funcs: Function[]): LoDashExplicitObjectWrapper<TResult>;
|
||||
}
|
||||
|
||||
//_.flowRight
|
||||
@@ -10825,6 +10834,10 @@ declare namespace _ {
|
||||
* @return Returns the new function.
|
||||
*/
|
||||
flowRight<TResult extends Function>(...funcs: Function[]): TResult;
|
||||
/**
|
||||
* @see _.flowRight
|
||||
*/
|
||||
flowRight<TResult extends Function>(funcs: Function[]): TResult;
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
@@ -10832,6 +10845,10 @@ declare namespace _ {
|
||||
* @see _.flowRight
|
||||
*/
|
||||
flowRight<TResult extends Function>(...funcs: Function[]): LoDashImplicitObjectWrapper<TResult>;
|
||||
/**
|
||||
* @see _.flowRight
|
||||
*/
|
||||
flowRight<TResult extends Function>(funcs: Function[]): LoDashImplicitObjectWrapper<TResult>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
@@ -10839,6 +10856,10 @@ declare namespace _ {
|
||||
* @see _.flowRight
|
||||
*/
|
||||
flowRight<TResult extends Function>(...funcs: Function[]): LoDashExplicitObjectWrapper<TResult>;
|
||||
/**
|
||||
* @see _.flowRight
|
||||
*/
|
||||
flowRight<TResult extends Function>(funcs: Function[]): LoDashExplicitObjectWrapper<TResult>;
|
||||
}
|
||||
|
||||
//_.memoize
|
||||
@@ -13519,6 +13540,35 @@ declare namespace _ {
|
||||
ceil(precision?: number): LoDashExplicitWrapper<number>;
|
||||
}
|
||||
|
||||
//_.divide
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Divide two numbers.
|
||||
*
|
||||
* @param dividend The first number in a division.
|
||||
* @param divisor The second number in a division.
|
||||
* @returns Returns the quotient.
|
||||
*/
|
||||
divide(
|
||||
dividend: number,
|
||||
divisor: number
|
||||
): number;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.divide
|
||||
*/
|
||||
divide(divisor: number): number;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.divide
|
||||
*/
|
||||
divide(divisor: number): LoDashExplicitWrapper<number>;
|
||||
}
|
||||
|
||||
//_.floor
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -13864,6 +13914,34 @@ declare namespace _ {
|
||||
): T | undefined;
|
||||
}
|
||||
|
||||
//_.multiply
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Multiply two numbers.
|
||||
* @param multiplier The first number in a multiplication.
|
||||
* @param multiplicand The second number in a multiplication.
|
||||
* @returns Returns the product.
|
||||
*/
|
||||
multiply(
|
||||
multiplier: number,
|
||||
multiplicand: number
|
||||
): number;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.multiply
|
||||
*/
|
||||
multiply(multiplicand: number): number;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.multiply
|
||||
*/
|
||||
multiply(multiplicand: number): LoDashExplicitWrapper<number>;
|
||||
}
|
||||
|
||||
//_.round
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
@@ -6090,6 +6090,7 @@ namespace TestFlow {
|
||||
result = _.flow(Fn2, Fn1, Fn1, Fn1, Fn1, Fn1);
|
||||
result = _.flow(Fn2, Fn1, Fn1, Fn1, Fn1, Fn1, Fn1);
|
||||
result = _.flow(Fn2, Fn1, Fn3, Fn4);
|
||||
result = _.flow<(m: number, n: number) => number>([Fn2, Fn1, Fn3, Fn4]);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -6098,6 +6099,7 @@ namespace TestFlow {
|
||||
result = _.flow<(m: number, n: number) => number>(Fn1, Fn2);
|
||||
result = _.flow<(m: number, n: number) => number>(Fn1, Fn1, Fn2);
|
||||
result = _.flow<(m: number, n: number) => number>(Fn1, Fn1, Fn1, Fn2);
|
||||
result = _.flow<(m: number, n: number) => number>([Fn1, Fn1, Fn1, Fn2]);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -6106,6 +6108,7 @@ namespace TestFlow {
|
||||
result = _(Fn1).flow<(m: number, n: number) => number>(Fn2);
|
||||
result = _(Fn1).flow<(m: number, n: number) => number>(Fn1, Fn2);
|
||||
result = _(Fn1).flow<(m: number, n: number) => number>(Fn1, Fn1, Fn2);
|
||||
result = _(Fn1).flow<(m: number, n: number) => number>([Fn1, Fn1, Fn2]);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -6114,6 +6117,7 @@ namespace TestFlow {
|
||||
result = _(Fn1).chain().flow<(m: number, n: number) => number>(Fn2);
|
||||
result = _(Fn1).chain().flow<(m: number, n: number) => number>(Fn1, Fn2);
|
||||
result = _(Fn1).chain().flow<(m: number, n: number) => number>(Fn1, Fn1, Fn2);
|
||||
result = _(Fn1).chain().flow<(m: number, n: number) => number>([Fn1, Fn1, Fn2]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6128,6 +6132,7 @@ namespace TestFlowRight {
|
||||
result = _.flowRight<(m: number, n: number) => number>(Fn1, Fn2);
|
||||
result = _.flowRight<(m: number, n: number) => number>(Fn1, Fn1, Fn2);
|
||||
result = _.flowRight<(m: number, n: number) => number>(Fn1, Fn1, Fn1, Fn2);
|
||||
result = _.flowRight<(m: number, n: number) => number>([Fn1, Fn1, Fn1, Fn2]);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -6136,6 +6141,7 @@ namespace TestFlowRight {
|
||||
result = _(Fn1).flowRight<(m: number, n: number) => number>(Fn2);
|
||||
result = _(Fn1).flowRight<(m: number, n: number) => number>(Fn1, Fn2);
|
||||
result = _(Fn1).flowRight<(m: number, n: number) => number>(Fn1, Fn1, Fn2);
|
||||
result = _(Fn1).flowRight<(m: number, n: number) => number>([Fn1, Fn1, Fn2]);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -6144,6 +6150,7 @@ namespace TestFlowRight {
|
||||
result = _(Fn1).chain().flowRight<(m: number, n: number) => number>(Fn2);
|
||||
result = _(Fn1).chain().flowRight<(m: number, n: number) => number>(Fn1, Fn2);
|
||||
result = _(Fn1).chain().flowRight<(m: number, n: number) => number>(Fn1, Fn1, Fn2);
|
||||
result = _(Fn1).chain().flowRight<(m: number, n: number) => number>([Fn1, Fn1, Fn2]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8058,6 +8065,23 @@ namespace TestCeil {
|
||||
}
|
||||
}
|
||||
|
||||
// _.divide
|
||||
namespace TestDivide {
|
||||
{
|
||||
let result: number;
|
||||
|
||||
result = _.divide(6, 4);
|
||||
|
||||
result = _(6).divide(4);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<number>;
|
||||
|
||||
result = _(6).chain().floor(4);
|
||||
}
|
||||
}
|
||||
|
||||
// _.floor
|
||||
namespace TestFloor {
|
||||
{
|
||||
@@ -8204,6 +8228,23 @@ namespace TestMinBy {
|
||||
result = _(dictionary).minBy<{a: number}, number>({a: 42});
|
||||
}
|
||||
|
||||
// _.multiply
|
||||
namespace TestMultiply {
|
||||
{
|
||||
let result: number;
|
||||
|
||||
result = _.multiply(6, 4);
|
||||
|
||||
result = _(6).multiply(4);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<number>;
|
||||
|
||||
result = _(6).chain().multiply(4);
|
||||
}
|
||||
}
|
||||
|
||||
// _.round
|
||||
namespace TestRound {
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
"capitalize/index.d.ts",
|
||||
"castArray/index.d.ts",
|
||||
"ceil/index.d.ts",
|
||||
"divide/index.d.ts",
|
||||
"chain/index.d.ts",
|
||||
"chunk/index.d.ts",
|
||||
"clamp/index.d.ts",
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/ck86/main-bower-files
|
||||
// Definitions by: Keita Kagurazaka <https://github.com/k-kagurazaka>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
|
||||
Vendored
+5
-2
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Mapbox GL JS v0.38.0
|
||||
// Type definitions for Mapbox GL JS v0.39.0
|
||||
// Project: https://github.com/mapbox/mapbox-gl-js
|
||||
// Definitions by: Dominik Bruderer <https://github.com/dobrud>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -173,7 +173,7 @@ declare namespace mapboxgl {
|
||||
|
||||
keyboard: KeyboardHandler;
|
||||
|
||||
doublClickZoom: DoubleClickZoomHandler;
|
||||
doubleClickZoom: DoubleClickZoomHandler;
|
||||
|
||||
touchZoomRotate: TouchZoomRotateHandler;
|
||||
}
|
||||
@@ -254,6 +254,9 @@ declare namespace mapboxgl {
|
||||
|
||||
/** Initial zoom level */
|
||||
zoom?: number;
|
||||
|
||||
/** Maximum tile cache size for each layer. */
|
||||
maxTileCacheSize?: number;
|
||||
}
|
||||
|
||||
export interface PaddingOptions {
|
||||
|
||||
Vendored
+59
@@ -0,0 +1,59 @@
|
||||
// Type definitions for @mapbox/shelf-pack 3.0
|
||||
// Project: https://github.com/mapbox/shelf-pack
|
||||
// Definitions by: Gyusun Yeom <https://github.com/Perlmint>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// tslint:disable-next-line no-single-declare-module
|
||||
declare module "@mapbox/shelf-pack" {
|
||||
export = ShelfPack;
|
||||
|
||||
class ShelfPack {
|
||||
constructor(width?: number, height?: number, options?: ShelfPack.CreateOption);
|
||||
|
||||
pack(bins: Array<ShelfPack.RequestShort | ShelfPack.RequestLong>, options?: ShelfPack.PackOption): ShelfPack.Bin[];
|
||||
packOne(w: number, h: number, id?: ShelfPack.ID): ShelfPack.Bin;
|
||||
getBin(id: ShelfPack.ID): ShelfPack.Bin;
|
||||
ref(bin: ShelfPack.Bin): number;
|
||||
unref(bin: ShelfPack.Bin): number;
|
||||
clear(): void;
|
||||
resize(w: number, h: number): boolean;
|
||||
|
||||
w: number;
|
||||
h: number;
|
||||
}
|
||||
|
||||
namespace ShelfPack {
|
||||
class Bin {
|
||||
constructor(id: ID, x: number, y: number, w: number, h: number, maxw?: number, maxh?: number);
|
||||
|
||||
id: ID;
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
}
|
||||
|
||||
type ID = number | string;
|
||||
interface Request {
|
||||
id?: ID;
|
||||
}
|
||||
interface RequestShort extends Request {
|
||||
w: number;
|
||||
h: number;
|
||||
}
|
||||
interface RequestLong extends Request {
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
interface PackOption {
|
||||
/// If true , the supplied bin objects will be updated inplace with x and y properties
|
||||
inPlace?: boolean;
|
||||
}
|
||||
|
||||
interface CreateOption {
|
||||
/// If true , the sprite will automatically grow
|
||||
autoResize?: boolean;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import * as ShelfPack from '@mapbox/shelf-pack';
|
||||
|
||||
let sprite = new ShelfPack(64, 64);
|
||||
|
||||
for (let i = 0; i < 5; i++) {
|
||||
const bin = sprite.packOne(32, 32);
|
||||
}
|
||||
|
||||
sprite.clear();
|
||||
|
||||
sprite.resize(128, 128);
|
||||
|
||||
sprite = new ShelfPack(64, 64);
|
||||
|
||||
[100, 101, 102].forEach(id => {
|
||||
const bin = sprite.packOne(16, 16, id);
|
||||
});
|
||||
|
||||
const bin102 = sprite.packOne(16, 16, 102);
|
||||
|
||||
const bin101 = sprite.getBin(101);
|
||||
sprite.ref(bin101);
|
||||
|
||||
const bin100 = sprite.getBin(100);
|
||||
sprite.unref(bin100);
|
||||
|
||||
const bin103 = sprite.packOne(16, 15, 103);
|
||||
sprite.unref(bin103);
|
||||
|
||||
const bin104 = sprite.packOne(16, 16, 104);
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"mapbox__shelf-pack-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+3
-3
@@ -50,9 +50,9 @@ declare namespace massive {
|
||||
count(criteria: object): Promise<string>;
|
||||
where(query: string, params: any[] | object): Promise<T[]>;
|
||||
search(criteria: SearchCriteria, queryOptions?: QueryOptions): Promise<any>;
|
||||
save(data: object): Promise<T[]>;
|
||||
insert(data: object): Promise<T[]>;
|
||||
update(dataOrCriteria: object, changesMap?: object): Promise<T[]>;
|
||||
save(data: object | object[]): Promise<T> | Promise<T[]>;
|
||||
insert(data: object | object[]): Promise<T> | Promise<T[]>;
|
||||
update(dataOrCriteria: object | object[], changesMap?: object): Promise<T> | Promise<T[]>;
|
||||
destroy(criteria: object): Promise<T[]>;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+2
@@ -942,6 +942,8 @@ declare namespace __MaterialUI {
|
||||
utils?: propTypes.utils;
|
||||
}
|
||||
export class DatePicker extends React.Component<DatePickerProps> {
|
||||
focus(): void;
|
||||
openDialog(): void;
|
||||
}
|
||||
|
||||
interface DatePickerDialogProps {
|
||||
|
||||
Vendored
+2
-1
@@ -68,6 +68,7 @@ declare module "mongoose" {
|
||||
pass?: string;
|
||||
/** Options for authentication */
|
||||
auth?: any;
|
||||
useMongoClient?: boolean;
|
||||
}
|
||||
|
||||
export interface ConnectionOptions extends ConnectOpenOptionsBase {
|
||||
@@ -656,4 +657,4 @@ declare module "mongoose" {
|
||||
error(err: any): Promise<T>;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
@@ -58,6 +58,8 @@ interface IConnection {
|
||||
end(callback: (err: IError, ...args: any[]) => void): void;
|
||||
end(options: any, callback: (err: IError, ...args: any[]) => void): void;
|
||||
|
||||
ping(callback: (err: IError) => void): void;
|
||||
|
||||
destroy(): void;
|
||||
|
||||
pause(): void;
|
||||
|
||||
@@ -148,6 +148,11 @@ connection.connect(function (err) {
|
||||
console.log('connected as id ' + connection.threadId);
|
||||
});
|
||||
|
||||
connection.ping(function (err) {
|
||||
if (err) throw err;
|
||||
console.log('Ping was successful');
|
||||
})
|
||||
|
||||
/// Pools
|
||||
|
||||
var poolConfig = {
|
||||
|
||||
Vendored
+7
-4
@@ -1,17 +1,20 @@
|
||||
// Type definitions for node-hid 0.5
|
||||
// Project: https://github.com/node-hid/node-hid#readme
|
||||
// Definitions by: Mohamed Hegazy <https://github.com/mhegazy>
|
||||
// Robert Kiss <https://github.com/ert78gb>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface Device {
|
||||
vendorId: number;
|
||||
productId: number;
|
||||
path: string;
|
||||
serialNumber: string;
|
||||
manufacturer: string;
|
||||
product: string;
|
||||
path?: string;
|
||||
serialNumber?: string;
|
||||
manufacturer?: string;
|
||||
product?: string;
|
||||
release: number;
|
||||
interface: number;
|
||||
usagePage?: number;
|
||||
usage?: number;
|
||||
}
|
||||
|
||||
export class HID {
|
||||
|
||||
Vendored
+42
-10
@@ -6,6 +6,8 @@
|
||||
// Roberto Desideri <https://github.com/RobDesideri>
|
||||
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
||||
// Wilco Bakker <https://github.com/WilcoBakker>
|
||||
// Nicolas Voigt <https://github.com/octo-sniffle>
|
||||
// Chigozirim C. <https://github.com/smac89>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@@ -307,7 +309,7 @@ declare namespace NodeJS {
|
||||
export interface ReadableStream extends EventEmitter {
|
||||
readable: boolean;
|
||||
read(size?: number): string | Buffer;
|
||||
setEncoding(encoding: string | null): this;
|
||||
setEncoding(encoding: string): this;
|
||||
pause(): this;
|
||||
resume(): this;
|
||||
isPaused(): boolean;
|
||||
@@ -400,6 +402,10 @@ declare namespace NodeJS {
|
||||
isTTY?: true;
|
||||
}
|
||||
|
||||
export interface ProcessEnv {
|
||||
[key: string]: string | undefined
|
||||
}
|
||||
|
||||
export interface Process extends EventEmitter {
|
||||
stdout: Socket;
|
||||
stderr: Socket;
|
||||
@@ -413,7 +419,7 @@ declare namespace NodeJS {
|
||||
chdir(directory: string): void;
|
||||
cwd(): string;
|
||||
emitWarning(warning: string | Error, name?: string, ctor?: Function): void;
|
||||
env: any;
|
||||
env: ProcessEnv;
|
||||
exit(code?: number): never;
|
||||
exitCode: number;
|
||||
getgid(): number;
|
||||
@@ -2439,6 +2445,8 @@ declare module "dgram" {
|
||||
send(msg: Buffer | String | any[], port: number, address: string, callback?: (error: Error, bytes: number) => void): void;
|
||||
send(msg: Buffer | String | any[], offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void;
|
||||
bind(port?: number, address?: string, callback?: () => void): void;
|
||||
bind(port?: number, callback?: () => void): void;
|
||||
bind(callback?: () => void): void;
|
||||
bind(options: BindOptions, callback?: Function): void;
|
||||
close(callback?: () => void): void;
|
||||
address(): AddressInfo;
|
||||
@@ -2499,6 +2507,7 @@ declare module "dgram" {
|
||||
declare module "fs" {
|
||||
import * as stream from "stream";
|
||||
import * as events from "events";
|
||||
import * as url from "url";
|
||||
|
||||
interface Stats {
|
||||
isFile(): boolean;
|
||||
@@ -2827,13 +2836,17 @@ declare module "fs" {
|
||||
*/
|
||||
export function readFileSync(filename: string, options?: { flag?: string; }): Buffer;
|
||||
export function writeFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFile(filename: string, data: any, encoding: string, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFileSync(filename: string, data: any, encoding: string): void;
|
||||
export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
|
||||
export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
|
||||
export function appendFile(filename: string, data: any, encoding: string, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFileSync(filename: string, data: any, encoding: string): void;
|
||||
export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
|
||||
export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
|
||||
export function watchFile(filename: string, listener: (curr: Stats, prev: Stats) => void): void;
|
||||
@@ -2977,7 +2990,7 @@ declare module "fs" {
|
||||
export function access(path: string | Buffer, mode: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||
/** Synchronous version of fs.access. This throws if any accessibility checks fail, and does nothing otherwise. */
|
||||
export function accessSync(path: string | Buffer, mode?: number): void;
|
||||
export function createReadStream(path: string | Buffer, options?: {
|
||||
export function createReadStream(path: string | Buffer | url.URL, options?: string | {
|
||||
flags?: string;
|
||||
encoding?: string;
|
||||
fd?: number;
|
||||
@@ -2986,9 +2999,9 @@ declare module "fs" {
|
||||
start?: number;
|
||||
end?: number;
|
||||
}): ReadStream;
|
||||
export function createWriteStream(path: string | Buffer, options?: {
|
||||
export function createWriteStream(path: string | Buffer | url.URL, options?: string | {
|
||||
flags?: string;
|
||||
encoding?: string;
|
||||
defaultEncoding?: string;
|
||||
fd?: number;
|
||||
mode?: number;
|
||||
autoClose?: boolean;
|
||||
@@ -3634,8 +3647,10 @@ declare module "crypto" {
|
||||
export interface Verify extends NodeJS.WritableStream {
|
||||
update(data: string | Buffer): Verify;
|
||||
update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Verify;
|
||||
verify(object: string, signature: Buffer): boolean;
|
||||
verify(object: string, signature: string, signature_format: HexBase64Latin1Encoding): boolean;
|
||||
verify(object: string | Object, signature: Buffer | DataView): boolean;
|
||||
verify(object: string | Object, signature: string, signature_format: HexBase64Latin1Encoding): boolean;
|
||||
// https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
|
||||
// The signature field accepts a TypedArray type, but it is only available starting ES2017
|
||||
}
|
||||
export function createDiffieHellman(prime_length: number, generator?: number): DiffieHellman;
|
||||
export function createDiffieHellman(prime: Buffer): DiffieHellman;
|
||||
@@ -3823,6 +3838,8 @@ declare module "stream" {
|
||||
end(): void;
|
||||
end(chunk: any, cb?: Function): void;
|
||||
end(chunk: any, encoding?: string, cb?: Function): void;
|
||||
cork(): void;
|
||||
uncork(): void;
|
||||
|
||||
/**
|
||||
* Event emitter
|
||||
@@ -3908,6 +3925,8 @@ declare module "stream" {
|
||||
end(): void;
|
||||
end(chunk: any, cb?: Function): void;
|
||||
end(chunk: any, encoding?: string, cb?: Function): void;
|
||||
cork(): void;
|
||||
uncork(): void;
|
||||
}
|
||||
|
||||
export interface TransformOptions extends DuplexOptions {
|
||||
@@ -3934,8 +3953,18 @@ declare module "util" {
|
||||
export function puts(...param: any[]): void;
|
||||
export function print(...param: any[]): void;
|
||||
export function log(string: string): void;
|
||||
export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
|
||||
export function inspect(object: any, options: InspectOptions): string;
|
||||
export var inspect: {
|
||||
(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
|
||||
(object: any, options: InspectOptions): string;
|
||||
colors: {
|
||||
[color: string]: [number, number]
|
||||
}
|
||||
styles: {
|
||||
[style: string]: string
|
||||
}
|
||||
defaultOptions: InspectOptions;
|
||||
custom: symbol;
|
||||
}
|
||||
export function isArray(object: any): object is any[];
|
||||
export function isRegExp(object: any): object is RegExp;
|
||||
export function isDate(object: any): object is Date;
|
||||
@@ -3954,7 +3983,10 @@ declare module "util" {
|
||||
export function isSymbol(object: any): object is symbol;
|
||||
export function isUndefined(object: any): object is undefined;
|
||||
export function deprecate(fn: Function, message: string): Function;
|
||||
export function promisify(fn: Function): Function;
|
||||
export var promisify: {
|
||||
(fn: Function): Function;
|
||||
custom: symbol
|
||||
}
|
||||
}
|
||||
|
||||
declare module "assert" {
|
||||
|
||||
@@ -169,6 +169,18 @@ namespace fs_tests {
|
||||
encoding: "ascii"
|
||||
},
|
||||
assert.ifError);
|
||||
|
||||
fs.writeFile("testfile", "content", "utf8", assert.ifError);
|
||||
|
||||
fs.writeFileSync("testfile", "content", "utf8");
|
||||
fs.writeFileSync("testfile", "content", { encoding: "utf8" });
|
||||
}
|
||||
|
||||
{
|
||||
fs.appendFile("testfile", "foobar", "utf8", assert.ifError);
|
||||
fs.appendFile("testfile", "foobar", { encoding: "utf8" }, assert.ifError);
|
||||
fs.appendFileSync("testfile", "foobar", "utf8");
|
||||
fs.appendFileSync("testfile", "foobar", { encoding: "utf8" });
|
||||
}
|
||||
|
||||
{
|
||||
@@ -544,6 +556,11 @@ namespace util_tests {
|
||||
maxArrayLength: null,
|
||||
breakLength: Infinity
|
||||
})
|
||||
assert(typeof util.inspect.custom === 'symbol')
|
||||
// util.promisify
|
||||
var readPromised = util.promisify(fs.readFile)
|
||||
var sampleRead: Promise<any> = readPromised(__filename).then((data: string): void => {}).catch((error: Error): void => {})
|
||||
assert(typeof util.promisify.custom === 'symbol')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1045,6 +1062,10 @@ namespace dgram_tests {
|
||||
});
|
||||
ds.bind();
|
||||
ds.bind(41234);
|
||||
ds.bind(4123, 'localhost');
|
||||
ds.bind(4123, 'localhost', () => {});
|
||||
ds.bind(4123, () => {});
|
||||
ds.bind(() => {});
|
||||
var ai: dgram.AddressInfo = ds.address();
|
||||
ds.send(new Buffer("hello"), 0, 5, 5000, "127.0.0.1", (error: Error, bytes: number): void => {
|
||||
});
|
||||
|
||||
@@ -47,6 +47,11 @@ fs.writeFile("Harry Potter",
|
||||
},
|
||||
assert.ifError);
|
||||
|
||||
fs.writeFileSync("testfile", "content", { encoding: "utf8" });
|
||||
|
||||
fs.appendFile("testfile", "foobar", { encoding: "utf8" }, assert.ifError);
|
||||
fs.appendFileSync("testfile", "foobar", { encoding: "utf8" });
|
||||
|
||||
var content: string,
|
||||
buffer: Buffer;
|
||||
|
||||
|
||||
Vendored
+4
@@ -1773,13 +1773,17 @@ declare module "fs" {
|
||||
*/
|
||||
export function readFileSync(filename: string, options?: { flag?: string; }): Buffer;
|
||||
export function writeFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFile(filename: string, data: any, encoding: string, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFileSync(filename: string, data: any, encoding: string): void;
|
||||
export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
|
||||
export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
|
||||
export function appendFile(filename: string, data: any, encoding: string, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFileSync(filename: string, data: any, encoding: string): void;
|
||||
export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
|
||||
export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
|
||||
export function watchFile(filename: string, listener: (curr: Stats, prev: Stats) => void): void;
|
||||
|
||||
@@ -151,6 +151,18 @@ namespace fs_tests {
|
||||
encoding: "ascii"
|
||||
},
|
||||
assert.ifError);
|
||||
|
||||
fs.writeFile("testfile", "content", "utf8", assert.ifError);
|
||||
|
||||
fs.writeFileSync("testfile", "content", "utf8");
|
||||
fs.writeFileSync("testfile", "content", { encoding: "utf8" });
|
||||
}
|
||||
|
||||
{
|
||||
fs.appendFile("testfile", "foobar", "utf8", assert.ifError);
|
||||
fs.appendFile("testfile", "foobar", { encoding: "utf8" }, assert.ifError);
|
||||
fs.appendFileSync("testfile", "foobar", "utf8");
|
||||
fs.appendFileSync("testfile", "foobar", { encoding: "utf8" });
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Vendored
+4
@@ -2562,13 +2562,17 @@ declare module "fs" {
|
||||
*/
|
||||
export function readFileSync(filename: string, options?: { flag?: string; }): Buffer;
|
||||
export function writeFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFile(filename: string, data: any, encoding: string, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFileSync(filename: string, data: any, encoding: string): void;
|
||||
export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
|
||||
export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
|
||||
export function appendFile(filename: string, data: any, encoding: string, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFileSync(filename: string, data: any, encoding: string): void;
|
||||
export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
|
||||
export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
|
||||
export function watchFile(filename: string, listener: (curr: Stats, prev: Stats) => void): void;
|
||||
|
||||
@@ -168,6 +168,18 @@ namespace fs_tests {
|
||||
encoding: "ascii"
|
||||
},
|
||||
assert.ifError);
|
||||
|
||||
fs.writeFile("testfile", "content", "utf8", assert.ifError);
|
||||
|
||||
fs.writeFileSync("testfile", "content", "utf8");
|
||||
fs.writeFileSync("testfile", "content", { encoding: "utf8" });
|
||||
}
|
||||
|
||||
{
|
||||
fs.appendFile("testfile", "foobar", "utf8", assert.ifError);
|
||||
fs.appendFile("testfile", "foobar", { encoding: "utf8" }, assert.ifError);
|
||||
fs.appendFileSync("testfile", "foobar", "utf8");
|
||||
fs.appendFileSync("testfile", "foobar", { encoding: "utf8" });
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Vendored
+4
@@ -2691,13 +2691,17 @@ declare module "fs" {
|
||||
*/
|
||||
export function readFileSync(filename: string, options?: { flag?: string; }): Buffer;
|
||||
export function writeFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFile(filename: string, data: any, encoding: string, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function writeFileSync(filename: string, data: any, encoding: string): void;
|
||||
export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
|
||||
export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
|
||||
export function appendFile(filename: string, data: any, encoding: string, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
|
||||
export function appendFileSync(filename: string, data: any, encoding: string): void;
|
||||
export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
|
||||
export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
|
||||
export function watchFile(filename: string, listener: (curr: Stats, prev: Stats) => void): void;
|
||||
|
||||
@@ -169,6 +169,18 @@ namespace fs_tests {
|
||||
encoding: "ascii"
|
||||
},
|
||||
assert.ifError);
|
||||
|
||||
fs.writeFile("testfile", "content", "utf8", assert.ifError);
|
||||
|
||||
fs.writeFileSync("testfile", "content", "utf8");
|
||||
fs.writeFileSync("testfile", "content", { encoding: "utf8" });
|
||||
}
|
||||
|
||||
{
|
||||
fs.appendFile("testfile", "foobar", "utf8", assert.ifError);
|
||||
fs.appendFile("testfile", "foobar", { encoding: "utf8" }, assert.ifError);
|
||||
fs.appendFileSync("testfile", "foobar", "utf8");
|
||||
fs.appendFileSync("testfile", "foobar", { encoding: "utf8" });
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Vendored
+2
-1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/alfw/passport-beam
|
||||
// Definitions by: AtlasDev <https://github.com/AtlasDev>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
///<reference types="passport"/>
|
||||
///<reference types="express"/>
|
||||
@@ -31,4 +32,4 @@ export namespace Strategy {
|
||||
_raw: any;
|
||||
_json: any;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/drudge/passport-facebook-token
|
||||
// Definitions by: Ray Martone <https://github.com/rmartone>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="passport"/>
|
||||
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/jaredhanson/passport-facebook
|
||||
// Definitions by: James Roland Cabresos <https://github.com/staticfunction>, Lucas Acosta <https://github.com/lucasmacosta>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="passport"/>
|
||||
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/jaredhanson/passport-github
|
||||
// Definitions by: Yasunori Ohoka <https://github.com/yasupeke>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
import passport = require('passport');
|
||||
import express = require('express');
|
||||
|
||||
@@ -11,11 +11,27 @@ const User = {
|
||||
}
|
||||
};
|
||||
|
||||
const callbackURL = process.env.PASSPORT_GITHUB_CALLBACK_URL;
|
||||
const clientID = process.env.PASSPORT_GITHUB_CONSUMER_KEY;
|
||||
const clientSecret = process.env.PASSPORT_GITHUB_CONSUMER_SECRET;
|
||||
|
||||
if (typeof callbackURL === "undefined") {
|
||||
throw new Error("callbackURL is undefined");
|
||||
}
|
||||
|
||||
if (typeof clientID === "undefined") {
|
||||
throw new Error("clientID is undefined");
|
||||
}
|
||||
|
||||
if (typeof clientSecret === "undefined") {
|
||||
throw new Error("clientSecret is undefined");
|
||||
}
|
||||
|
||||
passport.use(new github.Strategy(
|
||||
{
|
||||
clientID: process.env.PASSPORT_GITHUB_CONSUMER_KEY,
|
||||
clientSecret: process.env.PASSPORT_GITHUB_CONSUMER_SECRET,
|
||||
callbackURL: process.env.PASSPORT_GITHUB_CALLBACK_URL
|
||||
callbackURL,
|
||||
clientID,
|
||||
clientSecret
|
||||
},
|
||||
(accessToken: string, refreshToken: string, profile: github.Profile, done: (error: any, user?: any) => void) => {
|
||||
User.findOrCreate(profile.id, profile.provider, (err, user) => {
|
||||
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/jaredhanson/passport-facebook
|
||||
// Definitions by: James Roland Cabresos <https://github.com/staticfunction>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="passport"/>
|
||||
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/jaredhanson/passport-twitter
|
||||
// Definitions by: James Roland Cabresos <https://github.com/staticfunction>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="passport"/>
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
"dependencies": {
|
||||
"moment": ">=2.14.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/chjj/pty.js
|
||||
// Definitions by: Vadim Macagon <https://github.com/enlight/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
|
||||
+1
-1
@@ -157,7 +157,7 @@ export interface SelectRow {
|
||||
Give an array data to perform which rows you want to be selected when table loading.
|
||||
The content of array should be the rowkey which you want to be selected.
|
||||
*/
|
||||
selected?: string[];
|
||||
selected?: string[] | number[];
|
||||
/**
|
||||
if true, the radio/checkbox column will be hide.
|
||||
You can enable this attribute if you enable clickToSelect and you don't want to show the selection column.
|
||||
|
||||
Vendored
+2
@@ -847,6 +847,7 @@ declare namespace ReactBootstrap {
|
||||
|
||||
// <Badge />
|
||||
interface BadgeProps extends React.HTMLProps<Badge> {
|
||||
bsClass?: string;
|
||||
pullRight?: boolean;
|
||||
}
|
||||
type Badge = React.ClassicComponent<BadgeProps>;
|
||||
@@ -908,6 +909,7 @@ declare namespace ReactBootstrap {
|
||||
responsive?: boolean;
|
||||
striped?: boolean;
|
||||
fill?: boolean;
|
||||
bsClass?: string;
|
||||
}
|
||||
type Table = React.ClassicComponent<TableProps>;
|
||||
var Table: React.ClassicComponentClass<TableProps>;
|
||||
|
||||
Vendored
+1
-1
@@ -9,7 +9,7 @@
|
||||
import * as React from "react";
|
||||
import * as moment from "moment";
|
||||
|
||||
interface ReactDatePickerProps {
|
||||
export interface ReactDatePickerProps {
|
||||
autoComplete?: string;
|
||||
autoFocus?: boolean;
|
||||
calendarClassName?: string;
|
||||
|
||||
Vendored
+25
-22
@@ -1,6 +1,6 @@
|
||||
// Type definitions for react-dropzone
|
||||
// Project: https://github.com/okonet/react-dropzone
|
||||
// Definitions by: Mathieu Larouche Dube <https://github.com/matdube>, Ivo Jesus <https://github.com/LynxEyes>, Luís Rodrigues <https://github.com/goblindegook>
|
||||
// Definitions by: Mathieu Larouche Dube <https://github.com/matdube>, Ivo Jesus <https://github.com/LynxEyes>, Luís Rodrigues <https://github.com/goblindegook>, Ben Bayard <https://github.com/benbayard>
|
||||
// Definitions: https://github.com/Vooban/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -9,35 +9,38 @@
|
||||
declare module "react-dropzone" {
|
||||
interface DropzoneProps {
|
||||
// Drop behavior
|
||||
onDrop?: Function,
|
||||
onDropAccepted?: Function,
|
||||
onDropRejected?: Function,
|
||||
onDrop?: (accepted: File[], rejected: File[]) => any;
|
||||
onDropAccepted?: (accepted: File[]) => any;
|
||||
onDropRejected?: (rejected: File[]) => any;
|
||||
|
||||
// Drag behavior
|
||||
onDragStart?: Function,
|
||||
onDragEnter?: Function,
|
||||
onDragLeave?: Function,
|
||||
onDragStart?: Function;
|
||||
onDragEnter?: Function;
|
||||
onDragLeave?: Function;
|
||||
|
||||
style?: Object, // CSS styles to apply
|
||||
activeStyle?: Object, // CSS styles to apply when drop will be accepted
|
||||
rejectStyle?: Object, // CSS styles to apply when drop will be rejected
|
||||
className?: string, // Optional className
|
||||
activeClassName?: string, // className for accepted state
|
||||
rejectClassName?: string, // className for rejected state
|
||||
style?: React.CSSProperties; // CSS styles to apply
|
||||
activeStyle?: React.CSSProperties; // CSS styles to apply when drop will be accepted
|
||||
rejectStyle?: React.CSSProperties; // CSS styles to apply when drop will be rejected
|
||||
className?: string; // Optional className
|
||||
activeClassName?: string; // className for accepted state
|
||||
rejectClassName?: string; // className for rejected state
|
||||
|
||||
disablePreview?: boolean, // Enable/disable preview generation
|
||||
disableClick?: boolean, // Disallow clicking on the dropzone container to open file dialog
|
||||
disablePreview?: boolean; // Enable/disable preview generation
|
||||
disableClick?: boolean; // Disallow clicking on the dropzone container to open file dialog
|
||||
|
||||
inputProps?: Object, // Pass additional attributes to the <input type="file"/> tag
|
||||
multiple?: boolean, // Allow dropping multiple files
|
||||
accept?: string, // Allow specific types of files. See https://github.com/okonet/attr-accept for more information
|
||||
name?: string, // name attribute for the input tag
|
||||
maxSize?: number,
|
||||
minSize?: number
|
||||
inputProps?: React.ChangeTargetHTMLProps<HTMLInputElement>; // Pass additional attributes to the <input type="file"/> tag
|
||||
multiple?: boolean; // Allow dropping multiple files
|
||||
accept?: string; // Allow specific types of files. See https://github.com/okonet/attr-accept for more information
|
||||
name?: string; // name attribute for the input tag
|
||||
maxSize?: number;
|
||||
minSize?: number;
|
||||
|
||||
onFileDialogCancel?: () => void;
|
||||
}
|
||||
|
||||
let Dropzone: React.ClassicComponentClass<DropzoneProps>;
|
||||
class Dropzone extends React.Component<DropzoneProps, never> {
|
||||
open(): void;
|
||||
}
|
||||
|
||||
export = Dropzone;
|
||||
}
|
||||
|
||||
@@ -1,36 +1,45 @@
|
||||
import * as React from 'react';
|
||||
import * as Dropzone from 'react-dropzone';
|
||||
import Dropzone = require('react-dropzone');
|
||||
|
||||
class Test extends React.Component {
|
||||
constructor(props: any) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
dz: Dropzone;
|
||||
|
||||
open() {
|
||||
this.dz.open();
|
||||
}
|
||||
|
||||
render() {
|
||||
return (<div>
|
||||
<Dropzone
|
||||
onDrop={(e: any) => { e.preventDefault(); } }
|
||||
onDropAccepted={(e: any) => { e.preventDefault(); } }
|
||||
onDropRejected={(e: any) => { e.preventDefault(); } }
|
||||
onDragStart={(e: any) => { e.preventDefault(); } }
|
||||
onDragEnter={(e: any) => { e.preventDefault(); } }
|
||||
onDragLeave={(e: any) => { e.preventDefault(); } }
|
||||
style={{ borderStyle: "dashed" }}
|
||||
activeStyle={{ borderStyle: "dotted" }}
|
||||
rejectStyle={{ borderStyle: "dotted" }}
|
||||
className="regular"
|
||||
activeClassName="active"
|
||||
rejectClassName="reject"
|
||||
minSize={2000}
|
||||
maxSize={Infinity}
|
||||
disablePreview={true}
|
||||
disableClick={true}
|
||||
multiple={false}
|
||||
accept="*.png"
|
||||
name="dropzone"
|
||||
inputProps={{ id: "dropzone" }}
|
||||
return (
|
||||
<div>
|
||||
<Dropzone
|
||||
ref={(node) => { this.dz = node } }
|
||||
onDrop={(e: any) => { e.preventDefault(); } }
|
||||
onDropAccepted={(e: any) => { e.preventDefault(); } }
|
||||
onDropRejected={(e: any) => { e.preventDefault(); } }
|
||||
onDragStart={(e: any) => { e.preventDefault(); } }
|
||||
onDragEnter={(e: any) => { e.preventDefault(); } }
|
||||
onDragLeave={(e: any) => { e.preventDefault(); } }
|
||||
style={{ borderStyle: "dashed" }}
|
||||
activeStyle={{ borderStyle: "dotted" }}
|
||||
rejectStyle={{ borderStyle: "dotted" }}
|
||||
className="regular"
|
||||
activeClassName="active"
|
||||
rejectClassName="reject"
|
||||
minSize={2000}
|
||||
maxSize={Infinity}
|
||||
disablePreview={true}
|
||||
disableClick={true}
|
||||
multiple={false}
|
||||
accept="*.png"
|
||||
name="dropzone"
|
||||
inputProps={{ id: "dropzone" }}
|
||||
/>
|
||||
</div>);
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Icon } from './Icon';
|
||||
export default Icon;
|
||||
@@ -0,0 +1,2 @@
|
||||
import { Icon } from './Icon';
|
||||
export default Icon;
|
||||
@@ -0,0 +1,2 @@
|
||||
import { Icon } from './Icon';
|
||||
export default Icon;
|
||||
@@ -0,0 +1,2 @@
|
||||
import { Icon } from './Icon';
|
||||
export default Icon;
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
import * as React from 'react';
|
||||
import {
|
||||
TextStyle,
|
||||
ViewStyle,
|
||||
TextProperties,
|
||||
TouchableHighlightProperties,
|
||||
TouchableNativeFeedbackProperties,
|
||||
TabBarIOSProperties,
|
||||
ToolbarAndroidProperties
|
||||
} from 'react-native';
|
||||
|
||||
export interface IconProps extends TextProperties {
|
||||
/**
|
||||
* Size of the icon, can also be passed as fontSize in the style object.
|
||||
*
|
||||
* @default 12
|
||||
* @type {string}
|
||||
* @memberof IconProps
|
||||
*/
|
||||
size?: number;
|
||||
|
||||
/**
|
||||
* Name of the icon to show
|
||||
*
|
||||
* See Icon Explorer app
|
||||
* {@link https://github.com/oblador/react-native-vector-icons/tree/master/Examples/IconExplorer}
|
||||
* @type {string}
|
||||
* @memberof IconProps
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* Color of the icon
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof IconProps
|
||||
*/
|
||||
color?: string;
|
||||
}
|
||||
|
||||
export interface IconButtonProps extends IconProps, TouchableHighlightProperties, TouchableNativeFeedbackProperties {
|
||||
/**
|
||||
* Text and icon color
|
||||
* Use iconStyle or nest a Text component if you need different colors.
|
||||
*
|
||||
* @default 'white'
|
||||
* @type {string}
|
||||
* @memberof IconButtonProps
|
||||
*/
|
||||
color?: string;
|
||||
|
||||
/**
|
||||
* Border radius of the button
|
||||
* Set to 0 to disable.
|
||||
*
|
||||
* @default 5
|
||||
* @type {number}
|
||||
* @memberof IconButtonProps
|
||||
*/
|
||||
borderRadius?: number;
|
||||
|
||||
/**
|
||||
* Styles applied to the icon only
|
||||
* Good for setting margins or a different color.
|
||||
*
|
||||
* @default {marginRight: 10}
|
||||
* @type {ViewStyle}
|
||||
* @memberof IconButtonProps
|
||||
*/
|
||||
iconStyle?: ViewStyle;
|
||||
|
||||
/**
|
||||
* Style prop inherited from TextProperties and TouchableWithoutFeedbackProperties
|
||||
* Only exist here so we can have ViewStyle or TextStyle
|
||||
*
|
||||
* @type {(ViewStyle | TextStyle)}
|
||||
* @memberof IconButtonProps
|
||||
*/
|
||||
style?: ViewStyle | TextStyle;
|
||||
|
||||
/**
|
||||
* Background color of the button
|
||||
*
|
||||
* @default '#007AFF'
|
||||
* @type {string}
|
||||
* @memberof IconButtonProps
|
||||
*/
|
||||
backgroundColor?: string;
|
||||
}
|
||||
|
||||
export type ImageSource = any;
|
||||
|
||||
export interface TabBarIOSProps extends TabBarIOSProperties {
|
||||
/**
|
||||
* Name of the default icon (similar to TabBarIOS.Item icon)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TabBarIOSProps
|
||||
*/
|
||||
iconName: string;
|
||||
|
||||
/**
|
||||
* Name of the selected icon (similar to TabBarIOS.Item selectedIcon).
|
||||
*
|
||||
* @default iconName
|
||||
* @type {string}
|
||||
* @memberof TabBarIOSProps
|
||||
*/
|
||||
selectedIconName: string;
|
||||
|
||||
/**
|
||||
* Size of the icon.
|
||||
*
|
||||
* @default 30
|
||||
* @type {number}
|
||||
* @memberof TabBarIOSProps
|
||||
*/
|
||||
iconSize: number;
|
||||
|
||||
/**
|
||||
* Color of the icon
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TabBarIOSProps
|
||||
*/
|
||||
iconColor: string;
|
||||
|
||||
/**
|
||||
* Color of the selected icon.
|
||||
*
|
||||
* @default iconColor
|
||||
* @type {string}
|
||||
* @memberof TabBarIOSProps
|
||||
*/
|
||||
selectedIconColor: string;
|
||||
}
|
||||
|
||||
export interface ToolbarAndroidProps extends ToolbarAndroidProperties {
|
||||
/**
|
||||
* Name of the navigation logo icon
|
||||
* (similar to ToolbarAndroid logo)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ToolbarAndroidProps
|
||||
*/
|
||||
logoName: string;
|
||||
|
||||
/**
|
||||
* Name of the navigation icon
|
||||
* (similar to ToolbarAndroid navIcon)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ToolbarAndroidProps
|
||||
*/
|
||||
navIconName: string;
|
||||
|
||||
/**
|
||||
* Name of the overflow icon
|
||||
* (similar to ToolbarAndroid overflowIcon)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ToolbarAndroidProps
|
||||
*/
|
||||
overflowIconName: string;
|
||||
|
||||
/**
|
||||
* Size of the icons
|
||||
*
|
||||
* @default 24
|
||||
* @type {number}
|
||||
* @memberof ToolbarAndroidProps
|
||||
*/
|
||||
iconSize: number;
|
||||
|
||||
/**
|
||||
* Color of the icons
|
||||
*
|
||||
* @default 'black'
|
||||
* @type {string}
|
||||
* @memberof ToolbarAndroidProps
|
||||
*/
|
||||
iconColor: string;
|
||||
}
|
||||
|
||||
export class Icon extends React.Component<IconProps, any> {
|
||||
static getImageSource(
|
||||
name: string,
|
||||
color: string,
|
||||
size?: number
|
||||
): Promise<ImageSource>;
|
||||
}
|
||||
|
||||
export namespace Icon {
|
||||
class ToolbarAndroid extends React.Component<ToolbarAndroidProps, any> {}
|
||||
class TabBarIOS extends React.Component<TabBarIOSProps, any> {}
|
||||
class Button extends React.Component<IconButtonProps, any> {}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
import { Icon } from './Icon';
|
||||
export default Icon;
|
||||
@@ -0,0 +1,2 @@
|
||||
import { Icon } from './Icon';
|
||||
export default Icon;
|
||||
@@ -0,0 +1,2 @@
|
||||
import { Icon } from './Icon';
|
||||
export default Icon;
|
||||
@@ -0,0 +1,2 @@
|
||||
import { Icon } from './Icon';
|
||||
export default Icon;
|
||||
@@ -0,0 +1,2 @@
|
||||
import { Icon } from './Icon';
|
||||
export default Icon;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Icon } from './Icon';
|
||||
export default Icon;
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
// Type definitions for react-native-vector-icons 4.2
|
||||
// Project: https://github.com/oblador/react-native-vector-icons
|
||||
// Definitions by: Kyle Roach <https://github.com/iRoachie>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import * as React from 'react';
|
||||
import { Icon } from './Icon';
|
||||
import { TextProperties } from 'react-native';
|
||||
|
||||
/**
|
||||
* Returns your own custom font based on the glyphMap where the key is the icon name
|
||||
* and the value is either a UTF-8 character or it's character code. fontFamily is the name
|
||||
* of the font NOT the filename. Open the font in Font Book.app or similar to learn the name.
|
||||
* Optionally pass the third fontFile argument for android support, it should be a path
|
||||
* to the font file in you asset folder.
|
||||
*
|
||||
* @param glyphMap
|
||||
* @param fontFamily
|
||||
* @param fontFile
|
||||
*/
|
||||
export function createIconSet(
|
||||
glyphMap: {},
|
||||
fontFamily: string,
|
||||
fontFile?: string
|
||||
): Icon;
|
||||
|
||||
/**
|
||||
* Convenience method to create a custom font based on a fontello config file.
|
||||
* Don't forget to import the font as described above and drop the config.json
|
||||
* somewhere convenient in your project.
|
||||
*
|
||||
* Example usage
|
||||
* import { createIconSetFromFontello } from 'react-native-vector-icons';
|
||||
* import fontelloConfig from './config.json';
|
||||
* const Icon = createIconSetFromFontello(fontelloConfig);
|
||||
*
|
||||
* @see http://fontello.com
|
||||
* @export
|
||||
* @param {{}} config
|
||||
* @returns {Icon}
|
||||
*/
|
||||
export function createIconSetFromFontello(config: {}): Icon;
|
||||
|
||||
/**
|
||||
* Convenience method to create a custom font from IcoMoon
|
||||
* Make sure you're using the Download option in IcoMoon, and use the .json file that's
|
||||
* included in the .zip you've downloaded. You'll also need to import the .ttf font
|
||||
* file into your project
|
||||
*
|
||||
* Example usage
|
||||
* import { createIconSetFromIcoMoon } from 'react-native-vector-icons';
|
||||
* import icoMoonConfig from './config.json';
|
||||
* const Icon = createIconSetFromIcoMoon(icoMoonConfig);
|
||||
*
|
||||
* @see https://icomoon.io/app
|
||||
* @export
|
||||
* @param {{}} config
|
||||
* @returns {Icon}
|
||||
*/
|
||||
export function createIconSetFromIcoMoon(config: {}): Icon;
|
||||
@@ -0,0 +1,30 @@
|
||||
import * as React from 'react';
|
||||
import { View, Text } from 'react-native';
|
||||
import MaterialIcon from 'react-native-vector-icons/MaterialIcons';
|
||||
import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome';
|
||||
|
||||
class Example extends React.Component<{}, {}> {
|
||||
handleButton() {
|
||||
console.log('You pressed me');
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
{/* Normal Icon */}
|
||||
<MaterialIcon size={30} color="red" name="exit" />
|
||||
|
||||
{/* Icon button */}
|
||||
<FontAwesomeIcon.Button
|
||||
backgroundColor="#3b5998"
|
||||
name="facebook"
|
||||
onPress={() => this.handleButton()}
|
||||
>
|
||||
<Text style={{ fontFamily: 'Arial', fontSize: 15 }}>
|
||||
Login with Facebook
|
||||
</Text>
|
||||
</FontAwesomeIcon.Button>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"dom",
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "react"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"Icon.d.ts",
|
||||
"Entypo.d.ts",
|
||||
"EvilIcons.d.ts",
|
||||
"FontAwesome.d.ts",
|
||||
"Foundation.d.ts",
|
||||
"Ionicons.d.ts",
|
||||
"MaterialCommunityIcons.d.ts",
|
||||
"MaterialIcons.d.ts",
|
||||
"Octicons.d.ts",
|
||||
"SimpleLineIcons.d.ts",
|
||||
"Zocial.d.ts",
|
||||
"react-native-vector-icons-tests.tsx"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+5
-3
@@ -1,8 +1,10 @@
|
||||
// Type definitions for react-native 0.44
|
||||
// Project: https://github.com/facebook/react-native
|
||||
// Definitions by: Eloy Durán <https://github.com/alloy>, Fedor Nezhivoi <https://github.com/gyzerok>,
|
||||
// HuHuanming <https://github.com/huhuanming>, Jeremi Stadler <https://github.com/jeremistadler>,
|
||||
// Kyle Roach <https://github.com/iRoachie>
|
||||
// Definitions by: Eloy Durán <https://github.com/alloy>
|
||||
// Fedor Nezhivoi <https://github.com/gyzerok>
|
||||
// HuHuanming <https://github.com/huhuanming>
|
||||
// Jeremi Stadler <https://github.com/jeremistadler>
|
||||
// Kyle Roach <https://github.com/iRoachie>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user