mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-29 09:41:45 +00:00
Merge branch 'master' into react-navigation-fallback
This commit is contained in:
@@ -678,6 +678,12 @@
|
||||
"sourceRepoURL": "https://github.com/facebook/immutable-js",
|
||||
"asOfVersion": "3.8.7"
|
||||
},
|
||||
{
|
||||
"libraryName": "interactjs",
|
||||
"typingsPackageName": "interact.js",
|
||||
"sourceRepoURL": "https://github.com/taye/interact.js",
|
||||
"asOfVersion": "1.3.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "inversify",
|
||||
"typingsPackageName": "inversify",
|
||||
|
||||
@@ -24,6 +24,8 @@ angular.module("myApp").controller("helloController", function (gettextCatalog:
|
||||
|
||||
angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) {
|
||||
var myString2: string = gettextCatalog.getPlural(3, "Bird", "Birds");
|
||||
var myStringWithScope: string = gettextCatalog.getPlural(4, "{{color}} Bird", "{{color}} Birds", {color: 'Blue'});
|
||||
var myStringWithContext: string = gettextCatalog.getPlural(5, "pick", "picks", null, 'noun');
|
||||
});
|
||||
|
||||
angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) {
|
||||
|
||||
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Type definitions for angular-gettext v2.1.0
|
||||
// Type definitions for angular-gettext v2.1.1
|
||||
// Project: https://angular-gettext.rocketeer.be/
|
||||
// Definitions by: Ákos Lukács <https://github.com/AkosLukacs>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -66,7 +66,7 @@ declare module 'angular' {
|
||||
getString(string: string, scope?: any, context?: string): string;
|
||||
|
||||
/** Translate a plural string with the given context. */
|
||||
getPlural(n: number, string: string, stringPlural: string, context?: any): string;
|
||||
getPlural(n: number, string: string, stringPlural: string, scope?: any, context?: string): string;
|
||||
|
||||
/** Load a set of translation strings from a given URL.This should be a JSON catalog generated with grunt-angular-gettext. More details https://angular-gettext.rocketeer.be/dev-guide/lazy-loading/ */
|
||||
loadRemote(url: string): ng.IHttpPromise<any>;
|
||||
|
||||
@@ -10,7 +10,8 @@ webAuth.authorize({
|
||||
scope: 'read:order write:order',
|
||||
responseType: 'token',
|
||||
redirectUri: 'https://example.com/auth/callback',
|
||||
language: 'en'
|
||||
language: 'en',
|
||||
prompt: 'login',
|
||||
});
|
||||
|
||||
webAuth.parseHash((err, authResult) => {
|
||||
|
||||
Vendored
+1
@@ -761,6 +761,7 @@ export interface AuthorizeOptions {
|
||||
scope?: string;
|
||||
audience?: string;
|
||||
language?: string;
|
||||
prompt?: string;
|
||||
}
|
||||
|
||||
export interface CheckSessionOptions extends AuthorizeOptions {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Bricks from 'bricks.js';
|
||||
|
||||
const bricks = Bricks({
|
||||
container: document.body!.firstChild!,
|
||||
container: document.body.firstChild!,
|
||||
packed: 'packed',
|
||||
sizes: [
|
||||
{ columns: 2, gutter: 10 },
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
import * as captureconsole from "capture-console";
|
||||
|
||||
captureconsole.capture(process.stdout, () => { }); // $ExpectType string[]
|
||||
captureconsole.capture(process.stdout, {}, () => { }); // $ExpectType string[]
|
||||
captureconsole.capture(process.stdout, { quiet: true }, () => { }); // $ExpectType string[]
|
||||
|
||||
captureconsole.capture([process.stdout, process.stdin], () => { }); // $ExpectType string[]
|
||||
captureconsole.capture([process.stdout, process.stdin], {}, () => { }); // $ExpectType string[]
|
||||
captureconsole.capture([process.stdout, process.stdin], { quiet: true }, () => { }); // $ExpectType string[]
|
||||
|
||||
captureconsole.captureStderr(() => { }); // $ExpectType string
|
||||
captureconsole.captureStderr({}, () => { }); // $ExpectType string
|
||||
captureconsole.captureStderr({ quiet: true }, () => { }); // $ExpectType string
|
||||
|
||||
captureconsole.captureStdio(() => { }); // $ExpectType { stdout: string; stderr: string; }
|
||||
captureconsole.captureStdio({}, () => { }); // $ExpectType { stdout: string; stderr: string; }
|
||||
captureconsole.captureStdio({ quiet: true }, () => { }); // $ExpectType { stdout: string; stderr: string; }
|
||||
|
||||
captureconsole.captureStdout(() => { }); // $ExpectType string
|
||||
captureconsole.captureStdout({}, () => { }); // $ExpectType string
|
||||
captureconsole.captureStdout({ quiet: true }, () => { }); // $ExpectType string
|
||||
|
||||
captureconsole.hook(process.stdout, (string: string, encoding?: string, fd?: (error?: any) => void) => { }); // $ExpectType () => boolean
|
||||
captureconsole.hook(process.stdout, {}, (string: string, encoding?: string, fd?: (error?: any) => void) => { }); // $ExpectType () => boolean
|
||||
captureconsole.hook(process.stdout, { quiet: true }, (string: string, encoding?: string, fd?: (error?: any) => void) => { }); // $ExpectType () => boolean
|
||||
|
||||
captureconsole.intercept(process.stdout, () => { }); // $ExpectType string[]
|
||||
captureconsole.intercept(process.stdout, {}, () => { }); // $ExpectType string[]
|
||||
captureconsole.intercept(process.stdout, { quiet: true }, () => { }); // $ExpectType string[]
|
||||
|
||||
captureconsole.interceptStderr(() => { }); // $ExpectType string
|
||||
captureconsole.interceptStderr({}, () => { }); // $ExpectType string
|
||||
captureconsole.interceptStderr({ quiet: true }, () => { }); // $ExpectType string
|
||||
|
||||
captureconsole.interceptStdio(() => { }); // $ExpectType { stdout: string; stderr: string; }
|
||||
captureconsole.interceptStdio({}, () => { }); // $ExpectType { stdout: string; stderr: string; }
|
||||
captureconsole.interceptStdio({ quiet: true }, () => { }); // $ExpectType { stdout: string; stderr: string; }
|
||||
|
||||
captureconsole.interceptStdout(() => { }); // $ExpectType string
|
||||
captureconsole.interceptStdout({}, () => { }); // $ExpectType string
|
||||
captureconsole.interceptStdout({ quiet: true }, () => { }); // $ExpectType string
|
||||
|
||||
captureconsole.startCapture(process.stdout, (string: string, encoding?: string, fd?: (error?: any) => void) => { }); // $ExpectType boolean
|
||||
captureconsole.startCapture(process.stdout, {}, (string: string, encoding?: string, fd?: (error?: any) => void) => { }); // $ExpectType boolean
|
||||
captureconsole.startCapture(process.stdout, { quiet: true }, (string: string, encoding?: string, fd?: (error?: any) => void) => { }); // $ExpectType boolean
|
||||
|
||||
captureconsole.startIntercept(process.stdout, () => { }); // $ExpectType boolean
|
||||
captureconsole.startIntercept(process.stdout, {}, () => { }); // $ExpectType boolean
|
||||
captureconsole.startIntercept(process.stdout, { quiet: true }, () => { }); // $ExpectType boolean
|
||||
|
||||
captureconsole.stopCapture(process.stdout); // $ExpectType boolean
|
||||
|
||||
captureconsole.stopIntercept(process.stdout); // $ExpectType boolean
|
||||
Vendored
+190
@@ -0,0 +1,190 @@
|
||||
// Type definitions for capture-console 1.0
|
||||
// Project: https://github.com/zackehh/capture-console
|
||||
// Definitions by: Auston Zahrt <https://github.com/AustonZ>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node"/>
|
||||
|
||||
/**
|
||||
* Options controlling behavior when capturing
|
||||
*/
|
||||
export interface CaptureOptions {
|
||||
/**
|
||||
* Option to silence the output going to the console
|
||||
*/
|
||||
quiet?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the provided function with the output
|
||||
* on the provided streams.
|
||||
*/
|
||||
export function capture(
|
||||
streams: ReadonlyArray<NodeJS.WritableStream> | NodeJS.WritableStream,
|
||||
exec: () => void
|
||||
): string[];
|
||||
|
||||
/**
|
||||
* Executes the provided function with the output
|
||||
* on the provided streams. Accepts options to silence
|
||||
* the output going to the console.
|
||||
*/
|
||||
export function capture(
|
||||
streams: ReadonlyArray<NodeJS.WritableStream> | NodeJS.WritableStream,
|
||||
opts: CaptureOptions,
|
||||
exec: () => void
|
||||
): string[];
|
||||
|
||||
/**
|
||||
* Captures stderr for the provided execution scope.
|
||||
*/
|
||||
export function captureStderr(exec: () => void): string;
|
||||
|
||||
/**
|
||||
* Captures stderr for the provided execution scope.
|
||||
*/
|
||||
export function captureStderr(opts: CaptureOptions, exec: () => void): string;
|
||||
|
||||
/**
|
||||
* Captures stdout and stderr into an object for
|
||||
* the provided execution scope.
|
||||
*/
|
||||
export function captureStdio(exec: () => void): { stdout: string; stderr: string; };
|
||||
|
||||
/**
|
||||
* Captures stdout and stderr into an object for
|
||||
* the provided execution scope.
|
||||
*/
|
||||
export function captureStdio(opts: CaptureOptions, exec: () => void): { stdout: string; stderr: string; };
|
||||
|
||||
/**
|
||||
* Captures stdout for the provided execution scope.
|
||||
*/
|
||||
export function captureStdout(exec: () => void): string;
|
||||
|
||||
/**
|
||||
* Captures stdout for the provided execution scope.
|
||||
*/
|
||||
export function captureStdout(opts: CaptureOptions, exec: () => void): string;
|
||||
|
||||
/**
|
||||
* Listens to a provided stream, and executes the provided
|
||||
* function for every write call. Accepts options to silence
|
||||
* the output going to the console.
|
||||
*
|
||||
* Returns a function to call when you wish to stop listening
|
||||
* to the call.
|
||||
*/
|
||||
export function hook(
|
||||
stream: NodeJS.WritableStream,
|
||||
exec: (
|
||||
string: string,
|
||||
encoding?: string,
|
||||
fd?: (error?: any) => void
|
||||
) => void
|
||||
): () => boolean;
|
||||
|
||||
/**
|
||||
* Listens to a provided stream, and executes the provided
|
||||
* function for every write call. Accepts options to silence
|
||||
* the output going to the console.
|
||||
*
|
||||
* Returns a function to call when you wish to stop listening
|
||||
* to the call.
|
||||
*/
|
||||
export function hook(
|
||||
stream: NodeJS.WritableStream,
|
||||
opts: CaptureOptions,
|
||||
exec: (
|
||||
string: string,
|
||||
encoding?: string,
|
||||
fd?: (error?: any) => void
|
||||
) => void
|
||||
): () => boolean;
|
||||
|
||||
/**
|
||||
* Delegate to #capture with a quiet passthrough.
|
||||
*/
|
||||
export function intercept(stream: NodeJS.WritableStream, exec: () => void): string[];
|
||||
|
||||
/**
|
||||
* Delegate to #capture with a quiet passthrough.
|
||||
*/
|
||||
export function intercept(stream: NodeJS.WritableStream, opts: CaptureOptions, exec: () => void): string[];
|
||||
|
||||
/**
|
||||
* Delegate to #captureStderr with a quiet passthrough.
|
||||
*/
|
||||
export function interceptStderr(exec: () => void): string;
|
||||
|
||||
/**
|
||||
* Delegate to #captureStderr with a quiet passthrough.
|
||||
*/
|
||||
export function interceptStderr(opts: CaptureOptions, exec: () => void): string;
|
||||
|
||||
/**
|
||||
* Delegate to #captureStdio with a quiet passthrough.
|
||||
*/
|
||||
export function interceptStdio(exec: () => void): { stdout: string; stderr: string; };
|
||||
|
||||
/**
|
||||
* Delegate to #captureStdio with a quiet passthrough.
|
||||
*/
|
||||
export function interceptStdio(opts: CaptureOptions, exec: () => void): { stdout: string; stderr: string; };
|
||||
|
||||
/**
|
||||
* Delegate to #captureStdout with a quiet passthrough.
|
||||
*/
|
||||
export function interceptStdout(exec: () => void): string;
|
||||
|
||||
/**
|
||||
* Delegate to #captureStdout with a quiet passthrough.
|
||||
*/
|
||||
export function interceptStdout(opts: CaptureOptions, exec: () => void): string;
|
||||
|
||||
/**
|
||||
* Starts a capture on the provided stream using the
|
||||
* provided options and stream execution.
|
||||
*/
|
||||
export function startCapture(
|
||||
stream: NodeJS.WritableStream,
|
||||
exec: (
|
||||
string: string,
|
||||
encoding?: string,
|
||||
fd?: (error?: any) => void
|
||||
) => void
|
||||
): boolean;
|
||||
|
||||
/**
|
||||
* Starts a capture on the provided stream using the
|
||||
* provided options and stream execution.
|
||||
*/
|
||||
export function startCapture(
|
||||
stream: NodeJS.WritableStream,
|
||||
opts: CaptureOptions,
|
||||
exec: (
|
||||
string: string,
|
||||
encoding?: string,
|
||||
fd?: (error?: any) => void
|
||||
) => void
|
||||
): boolean;
|
||||
|
||||
/**
|
||||
* Delegate to #startCapture with a quiet passthrough.
|
||||
*/
|
||||
export function startIntercept(stream: NodeJS.WritableStream, exec: () => void): boolean;
|
||||
|
||||
/**
|
||||
* Delegate to #startCapture with a quiet passthrough.
|
||||
*/
|
||||
export function startIntercept(stream: NodeJS.WritableStream, opts: CaptureOptions, exec: () => void): boolean;
|
||||
|
||||
/**
|
||||
* Stops a capture on the provided stream.
|
||||
*/
|
||||
export function stopCapture(stream: NodeJS.WritableStream): boolean;
|
||||
|
||||
/**
|
||||
* Delegate to #stopCapture with a quiet passthrough.
|
||||
*/
|
||||
export function stopIntercept(stream: NodeJS.WritableStream): boolean;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strictFunctionTypes": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"capture-console-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -0,0 +1,12 @@
|
||||
import * as CatbotRedis from 'catbox-redis';
|
||||
|
||||
const cache = new CatbotRedis({
|
||||
host: 'localhost',
|
||||
partition: 'test',
|
||||
port: 2018,
|
||||
});
|
||||
|
||||
cache.get({
|
||||
segment: 'test',
|
||||
id: 'test',
|
||||
});
|
||||
Vendored
+60
@@ -0,0 +1,60 @@
|
||||
// Type definitions for catbox-redis 4.1
|
||||
// Project: https://github.com/hapijs/catbox-redis#readme
|
||||
// Definitions by: Simon Schick <https://github.com/SimonSchick>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
// tslint:disable-next-line
|
||||
declare module 'catbox-redis' {
|
||||
import { Redis } from 'ioredis';
|
||||
import { EnginePrototype, ClientOptions, Client } from 'catbox';
|
||||
namespace CatboxRedis {
|
||||
interface CatboxRedisOptions extends ClientOptions {
|
||||
/**
|
||||
* Raw client.
|
||||
*/
|
||||
client?: Redis;
|
||||
/**
|
||||
* the Redis server URL (if url is provided, host, port, and socket are ignored)
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* the Redis server hostname.
|
||||
* Defaults to '127.0.0.1'.
|
||||
*/
|
||||
host?: string;
|
||||
/**
|
||||
* the Redis server port or unix domain socket path.
|
||||
* Defaults to 6379.
|
||||
*/
|
||||
port?: number;
|
||||
/**
|
||||
* the unix socket string to connect to (if socket is provided, host and port are ignored)
|
||||
*/
|
||||
socket?: string;
|
||||
/**
|
||||
* the Redis authentication password when required.
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* the Redis database.
|
||||
*/
|
||||
database?: string;
|
||||
/**
|
||||
* an array of redis sentinel addresses to connect to.
|
||||
*/
|
||||
sentinels?: Array<{
|
||||
host: string;
|
||||
}>;
|
||||
/**
|
||||
* the name of the sentinel master.
|
||||
* (Only needed when sentinels is specified)
|
||||
*/
|
||||
sentinelName?: string;
|
||||
}
|
||||
}
|
||||
class CatboxRedis extends Client {
|
||||
constructor(options: CatboxRedis.CatboxRedisOptions);
|
||||
}
|
||||
export = CatboxRedis;
|
||||
}
|
||||
@@ -2,12 +2,11 @@
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
@@ -19,6 +18,6 @@
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"interact.js-tests.ts"
|
||||
"catbox-redis-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
+3
@@ -112,6 +112,9 @@ export interface CachedObject {
|
||||
export type CacheItem = any;
|
||||
|
||||
export interface ClientOptions {
|
||||
/**
|
||||
* this will store items under keys that start with this value.
|
||||
*/
|
||||
partition: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
clipboard.copy("Hello World");
|
||||
clipboard.copy(document.body!).then(() => console.log("success"));
|
||||
clipboard.copy(document.body).then(() => console.log("success"));
|
||||
|
||||
clipboard.paste().then(val => console.log(val));
|
||||
|
||||
Vendored
+3
-3
@@ -2819,13 +2819,13 @@ declare namespace cytoscape {
|
||||
|
||||
/**
|
||||
* The handler returns true when it finds the desired node, and it returns false to cancel the search.
|
||||
* i - The index indicating this node is the ith visited node.
|
||||
* depth - How many edge hops away this node is from the root nodes.
|
||||
* v - The current node.
|
||||
* e - The edge connecting the previous node to the current node.
|
||||
* u - The previous node.
|
||||
* i - The index indicating this node is the ith visited node.
|
||||
* depth - How many edge hops away this node is from the root nodes.
|
||||
*/
|
||||
type SearchVisitFunction = (i: number, depth: number, v: NodeCollection, e: EdgeCollection, u: NodeCollection) => boolean;
|
||||
type SearchVisitFunction = (v: NodeCollection, e: EdgeCollection, u: NodeCollection, i: number, depth: number) => boolean | void;
|
||||
interface SearchFirstOptions {
|
||||
/**
|
||||
* The root nodes (selector or collection) to start the search from.
|
||||
|
||||
@@ -47,12 +47,12 @@ undef = dispatch.on('unknown') as undefined;
|
||||
dispatch.on('bar', dispatch.on('bar')!);
|
||||
|
||||
dispatch.call('foo');
|
||||
dispatch.call('foo', document.body!);
|
||||
dispatch.call('foo', document.body!, { a: 3, b: 'test' }, 1);
|
||||
dispatch.call('foo', document.body);
|
||||
dispatch.call('foo', document.body, { a: 3, b: 'test' }, 1);
|
||||
|
||||
dispatch.apply('bar');
|
||||
dispatch.apply('bar', document.body!);
|
||||
dispatch.apply('bar', document.body!, [{ a: 3, b: 'test' }, 1]);
|
||||
dispatch.apply('bar', document.body);
|
||||
dispatch.apply('bar', document.body, [{ a: 3, b: 'test' }, 1]);
|
||||
|
||||
dispatch.on('bar', null);
|
||||
|
||||
|
||||
@@ -796,7 +796,7 @@ newDiv2 = body.append(function(d, i, g) {
|
||||
const index: number = i;
|
||||
const group: HTMLBodyElement[] | d3Selection.ArrayLike<HTMLBodyElement> = g;
|
||||
console.log('Body element foo property: ', d.foo); // data of type BodyDatum
|
||||
return this.ownerDocument.createElement('div'); // this-type HTMLBodyElement
|
||||
return this.ownerDocument!.createElement('div'); // this-type HTMLBodyElement
|
||||
});
|
||||
|
||||
// newDiv2 = body.append<HTMLDivElement>(function(d) {
|
||||
@@ -828,7 +828,7 @@ const typeValueFunction = function(
|
||||
i: number,
|
||||
g: HTMLBodyElement[] | d3Selection.ArrayLike<HTMLBodyElement>
|
||||
) {
|
||||
return this.ownerDocument.createElement('p'); // this-type HTMLParagraphElement
|
||||
return this.ownerDocument!.createElement('p'); // this-type HTMLParagraphElement
|
||||
};
|
||||
|
||||
const beforeValueFunction = function(
|
||||
|
||||
Vendored
+1
-1
@@ -22,7 +22,7 @@ export type BaseType = Element | EnterElement | Document | Window | null;
|
||||
*/
|
||||
export interface ArrayLike<T> {
|
||||
length: number;
|
||||
item(index: number): T;
|
||||
item(index: number): T | null;
|
||||
[index: number]: T;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
let render = createApp(document.body!)
|
||||
let render = createApp(document.body)
|
||||
|
||||
function main(state: any){
|
||||
let vnode = view(state, (action: any) => main({ count: 0 }))
|
||||
@@ -43,7 +43,7 @@
|
||||
return element('div', { class: `size-${ props.size }` })
|
||||
}
|
||||
|
||||
const render = createApp(document.body!)
|
||||
const render = createApp(document.body)
|
||||
|
||||
render(element(App, { size: 'small' }))
|
||||
|
||||
@@ -82,11 +82,11 @@
|
||||
(function (){
|
||||
const { createApp, element } = deku
|
||||
|
||||
let render: Function = createApp(document.body!)
|
||||
let render: Function = createApp(document.body)
|
||||
|
||||
render(element('div'))
|
||||
|
||||
render = createApp(document.body!, (action: any) => {
|
||||
render = createApp(document.body, (action: any) => {
|
||||
render(element('div'))
|
||||
})
|
||||
|
||||
|
||||
Vendored
+15
-14
@@ -3,13 +3,14 @@
|
||||
// Definitions by: Angel Merino <https://github.com/angelmerino>
|
||||
// Max Rumpf <https://github.com/Maxr1998>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="node" />
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
/** Declaration file generated by dts-gen */
|
||||
|
||||
export class Advertisement {
|
||||
export class Advertisement extends EventEmitter {
|
||||
constructor(type: string | string[] | ServiceType, port: number, ...args: any[]);
|
||||
|
||||
start(): Advertisement;
|
||||
@@ -43,7 +44,7 @@ export class Service {
|
||||
}
|
||||
|
||||
export class ServiceType {
|
||||
constructor(...args: string[])
|
||||
constructor(...args: Array<string | string[]>)
|
||||
constructor(args: ServiceType);
|
||||
|
||||
name: string;
|
||||
@@ -60,29 +61,29 @@ export class ServiceType {
|
||||
}
|
||||
|
||||
export class Browser extends EventEmitter {
|
||||
constructor(type: any, ...args: any[]);
|
||||
constructor(type: string | string[] | ServiceType, ...args: any[]);
|
||||
|
||||
list(): any;
|
||||
start(): Browser;
|
||||
|
||||
start(): any;
|
||||
stop(): void;
|
||||
|
||||
stop(): any;
|
||||
list(): any[];
|
||||
}
|
||||
|
||||
export const resolveA: any;
|
||||
export function resolve(name: string, type: string, args: object): Promise<any>;
|
||||
|
||||
export const resolveAAAA: any;
|
||||
export function resolve4(name: string, type: string, args: object): Promise<string>;
|
||||
|
||||
export function all(): ServiceType;
|
||||
export function resolve6(name: string, type: string, args: object): Promise<string>;
|
||||
|
||||
export function resolve(name: any, type: any, ...args: any[]): any;
|
||||
export function resolveSRV(name: string, args: object): Promise<any>;
|
||||
|
||||
export function resolveSRV(name: any, opts: any): any;
|
||||
export function resolveTXT(name: string, args: object): Promise<any>;
|
||||
|
||||
export function resolveService(name: any, ...args: any[]): any;
|
||||
|
||||
export function resolveTXT(name: any, opts: any): any;
|
||||
export function resolveService(name: string, args: object): Promise<any>;
|
||||
|
||||
export function tcp(...args: string[]): ServiceType;
|
||||
|
||||
export function udp(...args: string[]): ServiceType;
|
||||
|
||||
export function all(): ServiceType;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import { sprintf, fprintf, printf } from "extsprintf";
|
||||
|
||||
fprintf({write: (s: string) => {}}, '');
|
||||
fprintf({write: (s: string) => {}}, '', {}, [], null, 0, '');
|
||||
printf('');
|
||||
printf('', {}, [], null, 0, '');
|
||||
sprintf(''); // $ExpectType string
|
||||
sprintf('', {}, [], null, 0, ''); // $ExpectType string
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for extsprintf 1.4
|
||||
// Project: https://github.com/joyent/node-extsprintf#readme
|
||||
// Definitions by: Alex Hankins <https://github.com/AlexHankins>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface Stream {
|
||||
write(str: string): void;
|
||||
}
|
||||
|
||||
export function fprintf(stream: Stream, format: string, ...args: any[]): any;
|
||||
export function printf(format: string, ...args: any[]): any;
|
||||
export function sprintf(format: string, ...args: any[]): string;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"extsprintf-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -21,4 +21,16 @@ config = {
|
||||
]
|
||||
};
|
||||
|
||||
config = {
|
||||
plugins: [
|
||||
new ForkTsCheckerWebpackPlugin({
|
||||
logger: {
|
||||
error: message => console.error(message),
|
||||
warn: message => console.warn(message),
|
||||
info: message => console.info(message),
|
||||
}
|
||||
})
|
||||
]
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
+7
-1
@@ -73,6 +73,12 @@ declare namespace ForkTsCheckerWebpackPlugin {
|
||||
|
||||
type Formatter = (message: NormalizedMessage, useColors: boolean) => string;
|
||||
|
||||
interface Logger {
|
||||
error(message?: any): void;
|
||||
warn(message?: any): void;
|
||||
info(message?: any): void;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
tsconfig?: string;
|
||||
tslint?: string | true;
|
||||
@@ -81,7 +87,7 @@ declare namespace ForkTsCheckerWebpackPlugin {
|
||||
ignoreDiagnostics?: number[];
|
||||
ignoreLints?: string[];
|
||||
colors?: boolean;
|
||||
logger?: Console;
|
||||
logger?: Logger;
|
||||
formatter?: 'default' | 'codeframe' | Formatter;
|
||||
formatterOptions?: {
|
||||
highlightCode?: boolean
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"tslint": "*"
|
||||
"tslint": "*",
|
||||
"typescript": "*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ const complexQuery = ds.createQuery('special_namespace', kind)
|
||||
.offset(10);
|
||||
|
||||
// Running queries:
|
||||
const queryCallback: QueryCallback = (err: Error, entities: TestEntity[]) => entities[0][Datastore.KEY];
|
||||
const queryCallback: QueryCallback = (err: Error, entities: TestEntity[]) => entities[0][ds.KEY];
|
||||
|
||||
ds.runQuery(query, queryCallback);
|
||||
ds.runQuery(query, options, queryCallback);
|
||||
|
||||
+10
-11
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/googleapis/nodejs-datastore
|
||||
// Definitions by: Antoine Beauvais-Lacasse <https://github.com/beaulac>
|
||||
// Futa Ogawa <https://github.com/ogawa0071>
|
||||
// Thomas den Hollander <https://github.com/ThomasdenH>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.7
|
||||
|
||||
@@ -35,6 +36,15 @@ declare module '@google-cloud/datastore' {
|
||||
import { DatastoreTransaction } from '@google-cloud/datastore/transaction';
|
||||
|
||||
class Datastore extends DatastoreRequest_ {
|
||||
static readonly KEY: unique symbol;
|
||||
static readonly MORE_RESULTS_AFTER_CURSOR: MoreResultsAfterCursor;
|
||||
static readonly MORE_RESULTS_AFTER_LIMIT: MoreResultsAfterLimit;
|
||||
static readonly NO_MORE_RESULTS: NoMoreResults;
|
||||
|
||||
static readonly Query: typeof DatastoreQuery;
|
||||
static readonly DatastoreRequest: typeof DatastoreRequest_;
|
||||
static readonly Transaction: typeof DatastoreTransaction;
|
||||
|
||||
constructor(options?: InitOptions);
|
||||
|
||||
readonly KEY: typeof Datastore.KEY;
|
||||
@@ -80,17 +90,6 @@ declare module '@google-cloud/datastore' {
|
||||
keyFilename?: string;
|
||||
credentials?: object;
|
||||
}
|
||||
|
||||
namespace Datastore {
|
||||
const KEY: unique symbol;
|
||||
const MORE_RESULTS_AFTER_CURSOR: MoreResultsAfterCursor;
|
||||
const MORE_RESULTS_AFTER_LIMIT: MoreResultsAfterLimit;
|
||||
const NO_MORE_RESULTS: NoMoreResults;
|
||||
|
||||
const Query: typeof DatastoreQuery;
|
||||
const DatastoreRequest: typeof DatastoreRequest_;
|
||||
const Transaction: typeof DatastoreTransaction;
|
||||
}
|
||||
}
|
||||
|
||||
declare module '@google-cloud/datastore/entity' {
|
||||
|
||||
Vendored
+1
-1
@@ -83,7 +83,7 @@ declare namespace google {
|
||||
*/
|
||||
export interface Picker {
|
||||
isVisible(): boolean;
|
||||
setCallback():Picker;
|
||||
setCallback(method:Function):Picker;
|
||||
setRelayUrl(url:string):Picker;
|
||||
setVisible(visible:boolean):Picker;
|
||||
}
|
||||
|
||||
Vendored
-259
@@ -1,259 +0,0 @@
|
||||
// Type definitions for Interacting for interact.js v1.0.25
|
||||
// Project: https://github.com/taye/interact.js
|
||||
// Definitions by: Douglas Eichelberger <https://github.com/dduugg>, Adi Dahiya <https://github.com/adidahiya>, Tom Hasner <https://github.com/thasner>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// API documentation: http://interactjs.io/docs
|
||||
|
||||
declare namespace Interact {
|
||||
interface Interactable {
|
||||
// returns Element or string
|
||||
accept(): any;
|
||||
accept(newValue: Element): Interactable;
|
||||
accept(newValue: string): Interactable;
|
||||
actionChecker(): Function;
|
||||
actionChecker(checker: Function): Interactable;
|
||||
// returns boolean or {[key: string]: any}
|
||||
autoScroll(): any;
|
||||
autoScroll(options: boolean): Interactable;
|
||||
autoScroll(options: {[key: string]: any}): Interactable;
|
||||
context(): Node;
|
||||
defaultActionChecker(event: any): string;
|
||||
deltaSource(): string;
|
||||
// returns Interactable if newValue is "page" or "client", otherwise returns string
|
||||
deltaSource(newValue: String): Interactable;
|
||||
draggable(): boolean;
|
||||
draggable(options: boolean): Interactable;
|
||||
draggable(options: {[key: string]: any}): Interactable;
|
||||
dropCheck(event: MouseEvent): boolean;
|
||||
dropCheck(event: TouchEvent): boolean;
|
||||
dropChecker(): Function;
|
||||
dropChecker(checker: Function): Interactable;
|
||||
// returns boolean or {[key: string]: any}
|
||||
dropzone(): any;
|
||||
dropzone(options: boolean): Interactable;
|
||||
dropzone(options: {[key: string]: any}): Interactable;
|
||||
// return HTMLElement or SVGElement
|
||||
element(): Element;
|
||||
fire(iEvent: InteractEvent): Interactable;
|
||||
// returns boolean or {[key: string]: any}
|
||||
gesturable(): any;
|
||||
gesturable(options: boolean): Interactable;
|
||||
gesturable(options: {[key: string]: any}): Interactable;
|
||||
getRect(): ClientRect;
|
||||
// returns Element or string
|
||||
ignoreFrom(): any;
|
||||
ignoreFrom(newValue: string): Interactable;
|
||||
ignoreFrom(newValue: Element): Interactable;
|
||||
// returns boolean or {[key: string]: any}
|
||||
inertia(): any;
|
||||
inertia(options: boolean): Interactable;
|
||||
inertia(options: {[key: string]: any}): Interactable;
|
||||
off(eventType: string, listener: Function, useCapture?: boolean): Interactable;
|
||||
on(eventType: string, listener: Function, useCapture?: boolean): Interactable;
|
||||
origin(): Point;
|
||||
origin(newValue: HTMLElement): Interactable;
|
||||
origin(newValue: SVGElement): Interactable;
|
||||
origin(newValue: Point): Interactable;
|
||||
preventDefault(newValue: boolean | string): Interactable;
|
||||
rectChecker(): Function;
|
||||
rectChecker(newValue: Function): Interactable;
|
||||
resizable(): Interactable;
|
||||
resizable(options: boolean): Interactable;
|
||||
resizable(options: {[key: string]: any}): Interactable;
|
||||
restrict(): Restrict;
|
||||
restrict(newValue: Restrict): Interactable;
|
||||
set(options: {[key: string]: any}): Interactable;
|
||||
// returns boolean or {[key: string]: any}
|
||||
snap(): any;
|
||||
snap(options: boolean): Interactable;
|
||||
snap(options: {[key: string]: any}): Interactable;
|
||||
squareResize(): boolean;
|
||||
squareResize(newValue: boolean): Interactable;
|
||||
styleCursor(): boolean;
|
||||
styleCursor(newValue: boolean): Interactable;
|
||||
unset(): InteractStatic;
|
||||
validateSetting(context: string, option: string, value: any): any;
|
||||
}
|
||||
|
||||
interface Coordinates {
|
||||
clientX: number;
|
||||
clientY: number;
|
||||
pageX: number;
|
||||
pageY: number;
|
||||
timeStamp: number;
|
||||
}
|
||||
|
||||
interface Debug {
|
||||
target: any;
|
||||
dragging: any;
|
||||
resizing: any;
|
||||
gesturing: any;
|
||||
prepared: any;
|
||||
|
||||
prevCoords: Coordinates;
|
||||
downCoords: Coordinates;
|
||||
|
||||
pointerIds: any[];
|
||||
pointerMoves: any[];
|
||||
addPointer: any;
|
||||
removePointer: any;
|
||||
recordPointers: any;
|
||||
|
||||
inertia: InertiaStatus;
|
||||
|
||||
downTime: any;
|
||||
downEvent: any;
|
||||
prevEvent: any;
|
||||
|
||||
Interactable: any;
|
||||
IOptions: any;
|
||||
interactables: any;
|
||||
dropzones: any;
|
||||
pointerIsDown: any;
|
||||
defaultOptions: any;
|
||||
defaultActionChecker: any;
|
||||
|
||||
actions: any;
|
||||
dragMove: any;
|
||||
resizeMove: any;
|
||||
gestureMove: any;
|
||||
pointerUp: any;
|
||||
pointerDown: any;
|
||||
pointerMove: any;
|
||||
pointerHover: any;
|
||||
|
||||
events: any;
|
||||
globalEvents: any;
|
||||
delegatedEvents: any;
|
||||
}
|
||||
|
||||
interface InertiaStatus {
|
||||
active: boolean;
|
||||
target: any;
|
||||
targetElement: any;
|
||||
|
||||
startEvent: any;
|
||||
pointerUp: any
|
||||
|
||||
xe: number;
|
||||
ye: number;
|
||||
duration: number;
|
||||
|
||||
t0: number;
|
||||
vx0: number;
|
||||
vys: number;
|
||||
|
||||
lambda_v0: number;
|
||||
one_ve_v0: number;
|
||||
i: any;
|
||||
}
|
||||
|
||||
interface Point {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
// value types are either ClientRect or Element
|
||||
interface Restrict {
|
||||
drag?: any;
|
||||
gesture?: any;
|
||||
resize?: any;
|
||||
elementRect?: {[direction: string]: number};
|
||||
}
|
||||
|
||||
interface InteractEvent {
|
||||
altKey: boolean;
|
||||
axes: string;
|
||||
button: number
|
||||
clientX0: number;
|
||||
clientX: number
|
||||
clientY0: number;
|
||||
clientY: number
|
||||
ctrlKey: boolean
|
||||
dt: number;
|
||||
duration: number;
|
||||
dx: number;
|
||||
dy: number;
|
||||
metaKey: boolean;
|
||||
pageX: number;
|
||||
pageY: number;
|
||||
shiftKey: boolean;
|
||||
speed: number;
|
||||
t0: number;
|
||||
target: any;
|
||||
timeStamp: number;
|
||||
type: string;
|
||||
velocityX: number;
|
||||
velocityY: number;
|
||||
x0: number;
|
||||
y0: number;
|
||||
}
|
||||
|
||||
interface TouchEvent {
|
||||
pageX: number;
|
||||
pageY: number;
|
||||
type: string;
|
||||
}
|
||||
|
||||
interface InteractStatic {
|
||||
(element: HTMLElement): Interactable;
|
||||
(element: SVGElement): Interactable;
|
||||
(element: string): Interactable;
|
||||
(element: string, options: {context: Element}): Interactable;
|
||||
// returns boolean or {[key: string]: any}
|
||||
autoScroll(): any;
|
||||
autoScroll(options: boolean): InteractStatic;
|
||||
autoScroll(options: {[key: string]: any}): InteractStatic;
|
||||
currentAction(): string
|
||||
debug(): Debug;
|
||||
deltaSource(): string;
|
||||
// "page" and "client" are the valid parameters
|
||||
deltaSource(newValue: string): InteractStatic;
|
||||
dynamicDrop(): boolean;
|
||||
dynamicDrop(newValue: boolean): InteractStatic;
|
||||
enableDragging(): boolean;
|
||||
enableDragging(newValue: boolean): InteractStatic;
|
||||
enableGesturing(): boolean;
|
||||
enableGesturing(newValue: boolean): InteractStatic;
|
||||
enableResizing(): boolean;
|
||||
enableResizing(newValue: boolean): InteractStatic;
|
||||
// returns boolean or {[key: string]: any}
|
||||
inertia(): any;
|
||||
inertia(options: boolean): InteractStatic;
|
||||
inertia(options: {[key: string]: any}): InteractStatic;
|
||||
isSet(element: Element): boolean;
|
||||
margin(): number;
|
||||
margin(newvalue: number): InteractStatic;
|
||||
off(type: string, listener: Function, useCapture?: boolean): InteractStatic;
|
||||
on(type: string, listener: Function, useCapture?: boolean): InteractStatic;
|
||||
restrict(): Restrict;
|
||||
restrict(newValue: Restrict): InteractStatic;
|
||||
simulate(action: string, element: Element, pointerEvent?: any): InteractStatic;
|
||||
// returns boolean or {[key: string]: any}
|
||||
snap(): any;
|
||||
snap(options: boolean): InteractStatic;
|
||||
snap(options: {[key: string]: any}): InteractStatic;
|
||||
stop(event: Event): InteractStatic;
|
||||
styleCursor(): boolean;
|
||||
styleCursor(newValue: boolean): InteractStatic;
|
||||
supportsTouch(): boolean
|
||||
}
|
||||
}
|
||||
|
||||
declare var interact: Interact.InteractStatic;
|
||||
|
||||
// CommonJS module name until version 1.2.6 is "interact.js"
|
||||
declare module "interact.js" {
|
||||
export = interact;
|
||||
}
|
||||
|
||||
// CommonJS module name from version 1.2.7 onward is "interactjs"
|
||||
declare module "interactjs" {
|
||||
export = interact;
|
||||
}
|
||||
|
||||
// AMD module name is "interact"
|
||||
declare module "interact" {
|
||||
export = interact;
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
|
||||
|
||||
import interact = require("interact.js");
|
||||
|
||||
var button: HTMLElement = document.createElement("BUTTON");
|
||||
var rectangle: ClientRect = {
|
||||
left: 100,
|
||||
width: 100,
|
||||
right: 100,
|
||||
top: 100,
|
||||
bottom: 100,
|
||||
height: 100
|
||||
};
|
||||
let context = document.createElement("a");
|
||||
let interactable = interact(".foo", {context: context});
|
||||
interactable = interact(button);
|
||||
|
||||
interactable.draggable();
|
||||
interactable.draggable(true);
|
||||
interactable.draggable({
|
||||
onstart: (event: Interact.InteractEvent) => {},
|
||||
onmove : (event: Interact.InteractEvent) => {},
|
||||
onend : (event: Interact.InteractEvent) => {}
|
||||
});
|
||||
interactable.dropzone();
|
||||
interactable.dropzone(true);
|
||||
interactable.dropChecker(() => {});
|
||||
interactable.accept();
|
||||
interactable.accept("button");
|
||||
interactable.accept(button);
|
||||
interactable.resizable();
|
||||
interactable.resizable(true);
|
||||
interactable.squareResize();
|
||||
interactable.squareResize(true);
|
||||
interactable.gesturable();
|
||||
interactable.gesturable(true);
|
||||
interactable.gesturable({
|
||||
onmove: () => {}
|
||||
});
|
||||
interactable.autoScroll();
|
||||
interactable.autoScroll(true);
|
||||
interactable.snap();
|
||||
interactable.snap(true);
|
||||
interactable.inertia();
|
||||
interactable.inertia({
|
||||
resistance: 1
|
||||
});
|
||||
interactable.inertia(true);
|
||||
interactable.actionChecker();
|
||||
interactable.actionChecker((event: MouseEvent, defaultAction: string, interactable2: Interact.Interactable) => defaultAction);
|
||||
var rect: ClientRect = interactable.getRect();
|
||||
interactable.rectChecker();
|
||||
interactable.styleCursor();
|
||||
interactable.origin();
|
||||
interactable.origin({x: 0, y: 0});
|
||||
interactable.origin(button);
|
||||
interactable.deltaSource();
|
||||
interactable.deltaSource("client");
|
||||
interactable.restrict();
|
||||
interactable.restrict({
|
||||
"drag": button,
|
||||
"resize": button,
|
||||
"gesture": button
|
||||
});
|
||||
interactable.context();
|
||||
interactable.ignoreFrom();
|
||||
interactable.ignoreFrom("button");
|
||||
interactable.ignoreFrom(button);
|
||||
interactable.validateSetting("restrict", "drag", button);
|
||||
interactable.element();
|
||||
interactable.on("click", () => {}, true);
|
||||
interactable.off("click", () => {}, true);
|
||||
interactable.unset();
|
||||
|
||||
interact.isSet(button);
|
||||
interact.on("click", () => {}, true);
|
||||
interact.off("click", () => {}, true);
|
||||
interact.enableDragging();
|
||||
interact.enableDragging(true);
|
||||
interact.enableResizing();
|
||||
interact.enableResizing(true);
|
||||
interact.enableGesturing();
|
||||
interact.enableGesturing(true);
|
||||
interact.debug();
|
||||
interact.margin();
|
||||
interact.margin(10);
|
||||
interact.styleCursor();
|
||||
interact.styleCursor(true);
|
||||
interact.autoScroll(true);
|
||||
interact.autoScroll();
|
||||
interact.snap();
|
||||
interact.snap(true);
|
||||
interact.snap({
|
||||
mode: "grid"
|
||||
});
|
||||
interact.inertia();
|
||||
interact.inertia(true);
|
||||
interact.supportsTouch();
|
||||
interact.currentAction();
|
||||
interact.dynamicDrop();
|
||||
interact.dynamicDrop(true);
|
||||
interact.deltaSource();
|
||||
interact.deltaSource("page");
|
||||
|
||||
interact.restrict({
|
||||
"drag": rectangle,
|
||||
"resize": rectangle,
|
||||
"gesture": rectangle,
|
||||
"elementRect": { top: 0, left: 0, bottom: 1, right: 1 }
|
||||
});
|
||||
@@ -1,79 +0,0 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"adjacent-overload-signatures": false,
|
||||
"array-type": false,
|
||||
"arrow-return-shorthand": false,
|
||||
"ban-types": false,
|
||||
"callable-types": false,
|
||||
"comment-format": false,
|
||||
"dt-header": false,
|
||||
"eofline": false,
|
||||
"export-just-namespace": false,
|
||||
"import-spacing": false,
|
||||
"interface-name": false,
|
||||
"interface-over-type-literal": false,
|
||||
"jsdoc-format": false,
|
||||
"max-line-length": false,
|
||||
"member-access": false,
|
||||
"new-parens": false,
|
||||
"no-any-union": false,
|
||||
"no-boolean-literal-compare": false,
|
||||
"no-conditional-assignment": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-construct": false,
|
||||
"no-declare-current-package": false,
|
||||
"no-duplicate-imports": false,
|
||||
"no-duplicate-variable": false,
|
||||
"no-empty-interface": false,
|
||||
"no-for-in-array": false,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": false,
|
||||
"no-irregular-whitespace": false,
|
||||
"no-mergeable-namespace": false,
|
||||
"no-misused-new": false,
|
||||
"no-namespace": false,
|
||||
"no-object-literal-type-assertion": false,
|
||||
"no-padding": false,
|
||||
"no-redundant-jsdoc": false,
|
||||
"no-redundant-jsdoc-2": false,
|
||||
"no-redundant-undefined": false,
|
||||
"no-reference-import": false,
|
||||
"no-relative-import-in-test": false,
|
||||
"no-self-import": false,
|
||||
"no-single-declare-module": false,
|
||||
"no-string-throw": false,
|
||||
"no-unnecessary-callback-wrapper": false,
|
||||
"no-unnecessary-class": false,
|
||||
"no-unnecessary-generics": false,
|
||||
"no-unnecessary-qualifier": false,
|
||||
"no-unnecessary-type-assertion": false,
|
||||
"no-useless-files": false,
|
||||
"no-var-keyword": false,
|
||||
"no-var-requires": false,
|
||||
"no-void-expression": false,
|
||||
"no-trailing-whitespace": false,
|
||||
"object-literal-key-quotes": false,
|
||||
"object-literal-shorthand": false,
|
||||
"one-line": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"only-arrow-functions": false,
|
||||
"prefer-conditional-expression": false,
|
||||
"prefer-const": false,
|
||||
"prefer-declare-function": false,
|
||||
"prefer-for-of": false,
|
||||
"prefer-method-signature": false,
|
||||
"prefer-template": false,
|
||||
"radix": false,
|
||||
"semicolon": false,
|
||||
"space-before-function-paren": false,
|
||||
"space-within-parens": false,
|
||||
"strict-export-declare-modifiers": false,
|
||||
"trim-file": false,
|
||||
"triple-equals": false,
|
||||
"typedef-whitespace": false,
|
||||
"unified-signatures": false,
|
||||
"void-return": false,
|
||||
"whitespace": false
|
||||
}
|
||||
}
|
||||
Vendored
+30
-2
@@ -6,6 +6,7 @@
|
||||
// Ebrahim <https://github.com/br8h>
|
||||
// Shahar Mor <https://github.com/shaharmor>
|
||||
// Whemoon Jang <https://github.com/palindrom615>
|
||||
// Francis Gulotta <https://github.com/reconbot>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@@ -65,10 +66,23 @@ declare namespace IORedis {
|
||||
|
||||
get(key: string, callback: (err: Error, res: string) => void): void;
|
||||
get(key: string): Promise<string>;
|
||||
|
||||
getBuffer(key: string, callback: (err: Error, res: Buffer) => void): void;
|
||||
getBuffer(key: string): Promise<Buffer>;
|
||||
|
||||
set(key: string, value: any, ...args: any[]): any;
|
||||
set(key: string, value: any, expiryMode?: string | any[], time?: number | string, setMode?: number | string): Promise<string>;
|
||||
|
||||
set(key: string, value: any, callback: (err: Error, res: string) => void): void;
|
||||
set(key: string, value: any, setMode: string | any[], callback: (err: Error, res: string) => void): void;
|
||||
set(key: string, value: any, expiryMode: string, time: number | string, callback: (err: Error, res: string) => void): void;
|
||||
set(key: string, value: any, expiryMode: string, time: number | string, setMode: number | string, callback: (err: Error, res: string) => void): void;
|
||||
|
||||
setBuffer(key: string, value: any, expiryMode?: string | any[], time?: number | string, setMode?: number | string): Promise<Buffer>;
|
||||
|
||||
setBuffer(key: string, value: any, callback: (err: Error, res: Buffer) => void): void;
|
||||
setBuffer(key: string, value: any, setMode: string, callback: (err: Error, res: Buffer) => void): void;
|
||||
setBuffer(key: string, value: any, expiryMode: string, time: number, callback: (err: Error, res: Buffer) => void): void;
|
||||
setBuffer(key: string, value: any, expiryMode: string, time: number | string, setMode: number | string, callback: (err: Error, res: Buffer) => void): void;
|
||||
|
||||
setnx(key: string, value: any, callback: (err: Error, res: any) => void): void;
|
||||
setnx(key: string, value: any): Promise<any>;
|
||||
@@ -241,12 +255,16 @@ declare namespace IORedis {
|
||||
|
||||
hset(key: string, field: string, value: any, callback: (err: Error, res: 0 | 1) => void): void;
|
||||
hset(key: string, field: string, value: any): Promise<0 | 1>;
|
||||
hsetBuffer(key: string, field: string, value: any, callback: (err: Error, res: 0 | 1) => void): void;
|
||||
hsetBuffer(key: string, field: string, value: any): Promise<Buffer>;
|
||||
|
||||
hsetnx(key: string, field: string, value: any, callback: (err: Error, res: 0 | 1) => void): void;
|
||||
hsetnx(key: string, field: string, value: any): Promise<0 | 1>;
|
||||
|
||||
hget(key: string, field: string, callback: (err: Error, res: string) => void): void;
|
||||
hget(key: string, field: string): Promise<string>;
|
||||
hgetBuffer(key: string, field: string, callback: (err: Error, res: Buffer) => void): void;
|
||||
hgetBuffer(key: string, field: string): Promise<Buffer>;
|
||||
|
||||
hmset(key: string, field: string, value: any, ...args: string[]): Promise<0 | 1>;
|
||||
hmset(key: string, data: any, callback: (err: Error, res: 0 | 1) => void): void;
|
||||
@@ -471,7 +489,15 @@ declare namespace IORedis {
|
||||
get(key: string, callback?: (err: Error, res: string) => void): Pipeline;
|
||||
getBuffer(key: string, callback?: (err: Error, res: Buffer) => void): Pipeline;
|
||||
|
||||
set(key: string, value: any, ...args: any[]): Pipeline;
|
||||
set(key: string, value: any, callback?: (err: Error, res: string) => void): Pipeline;
|
||||
set(key: string, value: any, setMode: string, callback?: (err: Error, res: string) => void): Pipeline;
|
||||
set(key: string, value: any, expiryMode: string, time: number, callback?: (err: Error, res: string) => void): Pipeline;
|
||||
set(key: string, value: any, expiryMode: string, time: number, setMode: string, callback?: (err: Error, res: string) => void): Pipeline;
|
||||
|
||||
setBuffer(key: string, value: any, callback?: (err: Error, res: Buffer) => void): Pipeline;
|
||||
setBuffer(key: string, value: any, setMode: string, callback?: (err: Error, res: Buffer) => void): Pipeline;
|
||||
setBuffer(key: string, value: any, expiryMode: string, time: number, callback?: (err: Error, res: Buffer) => void): Pipeline;
|
||||
setBuffer(key: string, value: any, expiryMode: string, time: number, setMode: string, callback?: (err: Error, res: Buffer) => void): Pipeline;
|
||||
|
||||
setnx(key: string, value: any, callback?: (err: Error, res: any) => void): Pipeline;
|
||||
|
||||
@@ -602,10 +628,12 @@ declare namespace IORedis {
|
||||
zrevrank(key: string, member: string, callback?: (err: Error, res: number) => void): Pipeline;
|
||||
|
||||
hset(key: string, field: string, value: any, callback?: (err: Error, res: 0 | 1) => void): Pipeline;
|
||||
hsetBuffer(key: string, field: string, value: any, callback?: (err: Error, res: Buffer) => void): Pipeline;
|
||||
|
||||
hsetnx(key: string, field: string, value: any, callback?: (err: Error, res: 0 | 1) => void): Pipeline;
|
||||
|
||||
hget(key: string, field: string, callback?: (err: Error, res: string) => void): Pipeline;
|
||||
hgetBuffer(key: string, field: string, callback?: (err: Error, res: Buffer) => void): Pipeline;
|
||||
|
||||
hmset(key: string, field: string, value: any, ...args: string[]): Pipeline;
|
||||
hmset(key: string, data: any, callback?: (err: Error, res: 0 | 1) => void): Pipeline;
|
||||
|
||||
@@ -16,7 +16,20 @@ redis.sadd('set', 1, 3, 5, 7);
|
||||
redis.sadd('set', [1, 3, 5, 7]);
|
||||
|
||||
// All arguments are passed directly to the redis server:
|
||||
redis.set('key', '100', 'EX', 10);
|
||||
redis.set('key', '100');
|
||||
redis.set('key', '100', 'XX');
|
||||
redis.set('key', '100', 'PX', 10);
|
||||
redis.set('key', '100', 'EX', 10, 'NX');
|
||||
redis.set('key', '100', 'NX', 'EX', 10);
|
||||
redis.set('key', '100', ['EX', 10, 'NX']);
|
||||
redis.setBuffer('key', '100', 'NX', 'EX', 10);
|
||||
|
||||
redis.set('key', '100', (err, data) => {});
|
||||
redis.set('key', '100', 'XX', (err, data) => {});
|
||||
redis.set('key', '100', 'PX', 10, (err, data) => {});
|
||||
redis.set('key', '100', 'EX', 10, 'NX', (err, data) => {});
|
||||
redis.set('key', '100', ['EX', 10, 'NX'], (err, data) => {});
|
||||
redis.setBuffer('key', '100', 'NX', 'EX', 10, (err, data) => {});
|
||||
|
||||
new Redis(); // Connect to 127.0.0.1:6379
|
||||
new Redis(6380); // 127.0.0.1:6380
|
||||
@@ -59,6 +72,10 @@ redis.on('messageBuffer', (channel: any, message: any) => {
|
||||
const pipeline = redis.pipeline();
|
||||
pipeline.set('foo', 'bar');
|
||||
pipeline.del('cc');
|
||||
pipeline.hset('hash', 'foo', 4);
|
||||
pipeline.hget('hash', 'foo');
|
||||
pipeline.hsetBuffer('hash', 'fooBuffer', 4);
|
||||
pipeline.hgetBuffer('hash', 'fooBuffer');
|
||||
pipeline.exec((err, results) => {
|
||||
// `err` is always null, and `results` is an array of responses
|
||||
// corresponding to the sequence of queued commands.
|
||||
|
||||
Vendored
+6
-1
@@ -1122,7 +1122,7 @@ export function ref(key: string, options?: ReferenceOptions): Reference;
|
||||
export function isRef(ref: any): ref is Reference;
|
||||
|
||||
/**
|
||||
* Get a sub-schema of an existing schema based on a `path` that can be either a string or an array
|
||||
* Get a sub-schema of an existing schema based on a `path` that can be either a string or an array
|
||||
* of strings For string values path separator is a dot (`.`)
|
||||
*/
|
||||
export function reach(schema: ObjectSchema, path: string): Schema;
|
||||
@@ -1189,6 +1189,11 @@ export function not(values: any[]): Schema;
|
||||
*/
|
||||
export function required(): Schema;
|
||||
|
||||
/**
|
||||
* Alias of `required`.
|
||||
*/
|
||||
export function exist(): Schema;
|
||||
|
||||
/**
|
||||
* Marks a key as optional which will allow undefined as values. Used to annotate the schema for readability as all keys are optional by default.
|
||||
*/
|
||||
|
||||
@@ -1110,6 +1110,7 @@ schema = Joi.not(x, x);
|
||||
schema = Joi.not([x, x, x]);
|
||||
|
||||
schema = Joi.required();
|
||||
schema = Joi.exist();
|
||||
schema = Joi.optional();
|
||||
schema = Joi.forbidden();
|
||||
schema = Joi.strip();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
let $container: JQueryNotifyWidget = $("<div style='display:none' class='noprint'><div></div></div>").appendTo(document.body!).notify();
|
||||
let $container: JQueryNotifyWidget = $("<div style='display:none' class='noprint'><div></div></div>").appendTo(document.body).notify();
|
||||
|
||||
let notification: JQueryNotifyInstance = $container.notify(
|
||||
"create",
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
// tslint:disable:no-arg
|
||||
// tslint:disable:no-var-keyword
|
||||
// tslint:disable:object-literal-key-quotes
|
||||
// tslint:disable:object-literal-shorthand
|
||||
// tslint:disable:one-variable-per-declaration
|
||||
// tslint:disable:only-arrow-functions
|
||||
// tslint:disable:prefer-conditional-expression
|
||||
// tslint:disable:prefer-const
|
||||
// tslint:disable:prefer-for-of
|
||||
// tslint:disable:prefer-switch
|
||||
// tslint:disable:prefer-template
|
||||
// tslint:disable:space-within-parens
|
||||
// tslint:disable:triple-equals
|
||||
|
||||
function examples() {
|
||||
function add_0() {
|
||||
$('div').css('border', '2px solid red')
|
||||
@@ -816,7 +830,7 @@ function examples() {
|
||||
var len = kids.addClass('hilite').length;
|
||||
|
||||
$('#results span:first').text(len);
|
||||
$('#results span:last').text((<HTMLElement> event.target).tagName);
|
||||
$('#results span:last').text(event.target.tagName);
|
||||
|
||||
event.preventDefault();
|
||||
});
|
||||
@@ -1600,7 +1614,7 @@ function examples() {
|
||||
|
||||
function event_target_0() {
|
||||
$('body').click(function(event) {
|
||||
$('#log').html('clicked: ' + (<HTMLElement> event.target).nodeName);
|
||||
$('#log').html('clicked: ' + event.target.nodeName);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2320,8 +2334,8 @@ function examples() {
|
||||
}
|
||||
|
||||
function jQuery_contains_0() {
|
||||
$.contains(document.documentElement, document.body); // true
|
||||
$.contains(document.body, document.documentElement); // false
|
||||
$.contains(document.documentElement!, document.body); // true
|
||||
$.contains(document.body, document.documentElement!); // false
|
||||
}
|
||||
|
||||
function jQuery_data_0() {
|
||||
|
||||
@@ -11,7 +11,7 @@ interface GreenifyPlugin {
|
||||
}
|
||||
|
||||
jQuery.fn.greenify = function() {
|
||||
this.css( "color", "green" );
|
||||
this.css("color", "green");
|
||||
};
|
||||
|
||||
jQuery( "a" ).greenify(); // Makes all the links green.
|
||||
jQuery("a").greenify(); // Makes all the links green.
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
// tslint:disable:no-var-keyword
|
||||
// tslint:disable:object-literal-key-quotes
|
||||
// tslint:disable:object-literal-shorthand
|
||||
// tslint:disable:one-variable-per-declaration
|
||||
// tslint:disable:only-arrow-functions
|
||||
// tslint:disable:prefer-const
|
||||
// tslint:disable:prefer-for-of
|
||||
// tslint:disable:prefer-template
|
||||
// tslint:disable:space-within-parens
|
||||
// tslint:disable:triple-equals
|
||||
|
||||
function longdesc() {
|
||||
function add_0() {
|
||||
$('p').add('div').addClass('widget');
|
||||
@@ -2358,9 +2369,9 @@ function longdesc() {
|
||||
}
|
||||
|
||||
function toggle_3(display: boolean) {
|
||||
if (display === true) {
|
||||
if (display) {
|
||||
$('#foo').show();
|
||||
} else if (display === false) {
|
||||
} else {
|
||||
$('#foo').hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,21 +7,6 @@
|
||||
"no-declare-current-package": false,
|
||||
|
||||
"ban-types": false,
|
||||
"no-arg": false,
|
||||
"no-boolean-literal-compare": false,
|
||||
"no-object-literal-type-assertion": false,
|
||||
"no-unnecessary-type-assertion": false,
|
||||
"no-var-keyword": false,
|
||||
"object-literal-key-quotes": false,
|
||||
"object-literal-shorthand": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"only-arrow-functions": false,
|
||||
"prefer-conditional-expression": false,
|
||||
"prefer-const": false,
|
||||
"prefer-for-of": false,
|
||||
"prefer-switch": false,
|
||||
"prefer-template": false,
|
||||
"space-within-parens": false,
|
||||
"triple-equals": false
|
||||
"no-object-literal-type-assertion": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ function test_executing_scripts1() {
|
||||
</body>`);
|
||||
|
||||
// The script will not be executed, by default:
|
||||
dom.window.document.body!.children.length === 1;
|
||||
dom.window.document.body.children.length === 1;
|
||||
}
|
||||
|
||||
function test_executing_scripts2() {
|
||||
@@ -26,14 +26,14 @@ function test_executing_scripts2() {
|
||||
</body>`, { runScripts: 'dangerously' });
|
||||
|
||||
// The script will be executed and modify the DOM:
|
||||
dom.window.document.body!.children.length === 2;
|
||||
dom.window.document.body.children.length === 2;
|
||||
}
|
||||
|
||||
function test_executing_scripts3() {
|
||||
const window = (new JSDOM(``, { runScripts: 'outside-only' })).window;
|
||||
|
||||
window.eval(`document.body.innerHTML = "<p>Hello, world!</p>";`);
|
||||
window.document.body!.children.length === 1;
|
||||
window.document.body.children.length === 1;
|
||||
}
|
||||
|
||||
function test_virtualConsole() {
|
||||
@@ -86,7 +86,7 @@ function test_nodeLocation() {
|
||||
);
|
||||
|
||||
const document = dom.window.document;
|
||||
const bodyEl = document.body!; // implicitly created
|
||||
const bodyEl = document.body; // implicitly created
|
||||
const pEl = document.querySelector('p')!;
|
||||
const textNode = pEl.firstChild!;
|
||||
const imgEl = document.querySelector('img')!;
|
||||
|
||||
Vendored
+4
-4
@@ -5,7 +5,7 @@
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import * as fs from "fs";
|
||||
import { Stats } from "fs";
|
||||
import { Readable, ReadableOptions } from 'stream';
|
||||
|
||||
declare function K(root: string, options?: K.Options): K.Walker;
|
||||
@@ -13,16 +13,16 @@ declare function K(root: string, options?: K.Options): K.Walker;
|
||||
declare namespace K {
|
||||
interface Item {
|
||||
path: string;
|
||||
stats: fs.Stats;
|
||||
stats: Stats;
|
||||
}
|
||||
|
||||
type QueueMethod = "shift" | "pop";
|
||||
|
||||
interface Options extends ReadableOptions {
|
||||
queueMethod?: QueueMethod;
|
||||
pathSorter?: (pathA: string, pathB: string) => number;
|
||||
pathSorter?(pathA: string, pathB: string): number;
|
||||
fs?: any; // fs or mock-fs
|
||||
filter?: (path: string) => boolean;
|
||||
filter?(path: string): boolean;
|
||||
}
|
||||
|
||||
type Event = "close" | "data" | "end" | "readable" | "error";
|
||||
|
||||
Vendored
+3
-3
@@ -312,9 +312,9 @@ declare namespace Knex {
|
||||
}
|
||||
|
||||
interface Union {
|
||||
(callback: QueryCallback, wrap?: boolean): QueryBuilder;
|
||||
(callbacks: QueryCallback[], wrap?: boolean): QueryBuilder;
|
||||
(...callbacks: QueryCallback[]): QueryBuilder;
|
||||
(callback: QueryCallback | QueryBuilder | Raw, wrap?: boolean): QueryBuilder;
|
||||
(callbacks: (QueryCallback | QueryBuilder | Raw)[], wrap?: boolean): QueryBuilder;
|
||||
(...callbacks: (QueryCallback | QueryBuilder | Raw)[]): QueryBuilder;
|
||||
// (...callbacks: QueryCallback[], wrap?: boolean): QueryInterface;
|
||||
}
|
||||
|
||||
|
||||
@@ -1145,3 +1145,19 @@ knex('characters')
|
||||
.whereIn(['name', 'class'], function() {
|
||||
this.select('name', 'class').from('characters');
|
||||
});
|
||||
|
||||
knex('characters')
|
||||
.select()
|
||||
.where({ name: 'Bar', class: 'Fighter' })
|
||||
.union(knex('characters').select().where({ name: 'Foo', class: 'Druid' }));
|
||||
knex('characters')
|
||||
.select()
|
||||
.where({ name: 'Bar', class: 'Fighter' })
|
||||
.union([knex('characters').select().where({ name: 'Foo', class: 'Druid' })]);
|
||||
knex('characters')
|
||||
.select()
|
||||
.where({ name: 'Bar', class: 'Fighter' })
|
||||
.union(
|
||||
knex('characters').select().where({ name: 'Foo', class: 'Druid' }),
|
||||
knex('characters').select().where({ name: 'Baz', class: 'Paladin' })
|
||||
);
|
||||
|
||||
+2
@@ -111,6 +111,7 @@ declare module 'leaflet' {
|
||||
profile?: string;
|
||||
polylinePrecision?: number;
|
||||
useHints?: boolean;
|
||||
routingOptions?: any;
|
||||
}
|
||||
|
||||
class Formatter {
|
||||
@@ -190,6 +191,7 @@ declare module 'leaflet' {
|
||||
allowUTurns: boolean;
|
||||
geometryOnly: boolean;
|
||||
fileFormat: string;
|
||||
simplifyGeometry: boolean;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line interface-name
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as Mark from 'mark.js';
|
||||
/* test instance */
|
||||
const mark = new Mark(document.querySelectorAll('div'));
|
||||
const markBySelector = new Mark('div');
|
||||
const markByElement = new Mark(document.body!);
|
||||
const markByElement = new Mark(document.body);
|
||||
|
||||
mark.mark('keyword');
|
||||
mark.mark('keyword', {
|
||||
|
||||
Vendored
+92
@@ -0,0 +1,92 @@
|
||||
// Type definitions for MarkdownPDF (markdown-pdf) 9.0
|
||||
// Project: https://github.com/alanshaw/markdown-pdf
|
||||
// Definitions by: Ange PICARD <https://github.com/MonsieurMan>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = MarkdownPDF;
|
||||
|
||||
declare function MarkdownPDF(options?: MarkdownPDF.Options): MarkdownPDF.OptionsBuilder;
|
||||
|
||||
declare namespace MarkdownPDF {
|
||||
/** Configuration options */
|
||||
interface Options {
|
||||
/** Current working directory. */
|
||||
cwd?: string;
|
||||
/** Path to the phantomjs library. */
|
||||
phantomPath?: string;
|
||||
/** Path to custom CSS file, relative to current directory. */
|
||||
cssPath?: string;
|
||||
/** Path to custorm highlight CSS file (for code highlighting with highlight.js), relative to the current directory. */
|
||||
highlightCssPath?: string;
|
||||
/** Path to CommonJS module which sets the page header and footer (see runnings.js). */
|
||||
runningsPath?: string;
|
||||
/** Delay (in ms) before the PDF is rendered. */
|
||||
renderDelay?: number;
|
||||
/** If renderDelay option isn't set, this is the timeout (in ms) before the page is rendered in case the page.onLoadFinished event doesn't fire. */
|
||||
loadTimeout?: number;
|
||||
/** Supported dimension units are: 'mm', 'cm', 'in', 'px' */
|
||||
paperBorder?: string;
|
||||
paperFormat?: PaperFormat;
|
||||
paperOrientation?: PaperOrientation;
|
||||
/** A function that returns a through2 stream that transforms the markdown before it is converted to HTML. */
|
||||
preProcessMd?: () => any;
|
||||
/** A function that returns a through2 stream that transforms the HTML before it is converted to PDF. */
|
||||
preProcessHtml?: () => any;
|
||||
/** A config object that is passed to remarkable, the underlying markdown parser */
|
||||
remarkable?: any; // FIXME: remarkable config types
|
||||
}
|
||||
type PaperFormat = "A3" | "A4" | "A5" | "Legal" | "Letter" | "Tabloid";
|
||||
type PaperOrientation = "portait" | "landscape";
|
||||
|
||||
interface OptionsBuilder {
|
||||
/** Create a readable stream and pipe it to markdown pdf. */
|
||||
from: FromOptionsBuilder & FromFunction;
|
||||
/** Concatenates stream and pipe them to markdown pdf. */
|
||||
concat: ConcatOptionsBuilder;
|
||||
}
|
||||
|
||||
type FromFunction =
|
||||
/** Create a readable stream from path and pipe to markdown-pdf. path can be a single path or array of paths. */
|
||||
(path: string | string[]) => ToOptionsBuilder;
|
||||
interface FromOptionsBuilder {
|
||||
/** Create a readable stream from string and pipe to markdown-pdf. string can be a single string or array of strings. */
|
||||
string(markdown: string | string[]): ToOptionsBuilder;
|
||||
/** Create a readable stream from path and pipe to markdown-pdf. path can be a single path or array of paths. */
|
||||
path(path: string | string[], opts: any): ToOptionsBuilder;
|
||||
}
|
||||
|
||||
interface ConcatOptionsBuilder {
|
||||
from: ConcatFromOptionsBuilder;
|
||||
}
|
||||
interface ConcatFromOptionsBuilder {
|
||||
/** Create and concatenate readable streams from strings and pipe to markdown-pdf. */
|
||||
strings(markdownTexts: string[], opts: any): ToOptionsBuilder;
|
||||
/** Create and concatenate readable streams from paths and pipe to markdown-pdf. */
|
||||
paths(paths: string[], opts: any): ToOptionsBuilder;
|
||||
}
|
||||
|
||||
interface ToOptionsBuilder {
|
||||
to: ToBuilder & ToFunction;
|
||||
}
|
||||
|
||||
interface ToBuilder {
|
||||
/**
|
||||
* Create a writeable stream to path and pipe output from markdown-pdf to it.
|
||||
* path can be a single path, or array of output paths if you specified an array of inputs.
|
||||
* The callback function cb will be invoked when data has finished being written.
|
||||
*/
|
||||
path(path: string, callback?: () => void): void;
|
||||
/** Create a concat-stream and pipe output from markdown-pdf to it. The callback function cb will be invoked when the buffer has been created. */
|
||||
buffer(opts: any, callback?: () => void): void;
|
||||
/** Create a concat-stream and pipe output from markdown-pdf to it. The callback function cb will be invoked when the string has been created. */
|
||||
string(opts: any, callback?: () => void): void;
|
||||
}
|
||||
|
||||
type ToFunction =
|
||||
/**
|
||||
* Create a writeable stream to path and pipe output from markdown-pdf to it.
|
||||
* path can be a single path, or array of output paths if you specified an array of inputs.
|
||||
* The callback function cb will be invoked when data has finished being written.
|
||||
*/
|
||||
(path: string, callback?: () => void) => void;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import mdPdf = require('markdown-pdf');
|
||||
|
||||
mdPdf().from('path').to('path', () => { }); // $ExpectType void
|
||||
mdPdf().from.string('markdown').to('path', () => { }); // $ExpectType void
|
||||
mdPdf({ paperOrientation: 'landscape', paperFormat: 'A3' }).from('lol').to('lol', () => { }); // $ExpectType void
|
||||
mdPdf().concat.from.paths(['lol', 'lol'], {}).to('path', () => { }); // $ExpectType void
|
||||
mdPdf().concat.from.strings(['lol', 'lol'], {}).to('path', () => { }); // $ExpectType void
|
||||
mdPdf().from('path').to.path('path', () => { }); // $ExpectType void
|
||||
mdPdf().from('path').to('path'); // $ExpectType void
|
||||
|
||||
mdPdf({ paperFormat: 'wrongFormat' }); // $ExpectError
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"markdown-pdf-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
@@ -18,7 +18,7 @@ const template: Template = require('template.marko');
|
||||
// $ExpectType RenderResult
|
||||
template
|
||||
.renderSync({ name: 'Marko' })
|
||||
.appendTo(document.body!);
|
||||
.appendTo(document.body);
|
||||
|
||||
createServer((req, res) => {
|
||||
res.setHeader('content-type', 'text/html');
|
||||
@@ -30,12 +30,12 @@ const template: Template = require('template.marko');
|
||||
.render({ $global: { flags: ['mobile'] } })
|
||||
.then((result) => {
|
||||
// $ExpectType RenderResult
|
||||
result.appendTo(document.body!);
|
||||
result.appendTo(document.body);
|
||||
});
|
||||
|
||||
template.render({}, (err: Error | null, result: RenderResult) => {
|
||||
// $ExpectType RenderResult
|
||||
result.appendTo(document.body!);
|
||||
result.appendTo(document.body);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Vendored
+8
-8
@@ -66,12 +66,12 @@ export interface CornerBit extends MDCNumbers {
|
||||
* Likewise END maps to RIGHT or LEFT depending on the directionality.
|
||||
*/
|
||||
export interface Corner extends MDCNumbers {
|
||||
TOP_LEFT: 0;
|
||||
TOP_RIGHT: CornerBit["RIGHT"];
|
||||
BOTTOM_LEFT: CornerBit["BOTTOM"];
|
||||
BOTTOM_RIGHT: CornerBit["BOTTOM"] | CornerBit["RIGHT"];
|
||||
TOP_START: CornerBit["FLIP_RTL"];
|
||||
TOP_END: CornerBit["FLIP_RTL"] | CornerBit["RIGHT"];
|
||||
BOTTOM_START: CornerBit["BOTTOM"] | CornerBit["FLIP_RTL"];
|
||||
BOTTOM_END: CornerBit["BOTTOM"] | CornerBit["RIGHT"] | CornerBit["FLIP_RTL"];
|
||||
TOP_LEFT: 0;
|
||||
TOP_RIGHT: 4;
|
||||
BOTTOM_LEFT: 1;
|
||||
BOTTOM_RIGHT: 5;
|
||||
TOP_START: 8;
|
||||
TOP_END: 12;
|
||||
BOTTOM_START: 9;
|
||||
BOTTOM_END: 13;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ const FRAME_BUDGET = 100;
|
||||
});
|
||||
};
|
||||
|
||||
m.render(document.body!, userInputs(users));
|
||||
m.render(document.body, userInputs(users));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -246,7 +246,7 @@ const FRAME_BUDGET = 100;
|
||||
};
|
||||
|
||||
// example 1
|
||||
m.route(document.body!, "/", {
|
||||
m.route(document.body, "/", {
|
||||
"/": {
|
||||
view() {
|
||||
return m(Layout, m(Home));
|
||||
@@ -260,7 +260,7 @@ const FRAME_BUDGET = 100;
|
||||
});
|
||||
|
||||
// example 2
|
||||
m.route(document.body!, "/", {
|
||||
m.route(document.body, "/", {
|
||||
"/": {
|
||||
render() {
|
||||
return m(Layout, m(Home));
|
||||
@@ -285,7 +285,7 @@ const FRAME_BUDGET = 100;
|
||||
},
|
||||
};
|
||||
|
||||
m.route(document.body!, "/", {
|
||||
m.route(document.body, "/", {
|
||||
"/": {
|
||||
render() {
|
||||
return m(Anon1);
|
||||
@@ -313,7 +313,7 @@ const FRAME_BUDGET = 100;
|
||||
}
|
||||
};
|
||||
|
||||
m.route(document.body!, "/user/list", {
|
||||
m.route(document.body, "/user/list", {
|
||||
"/user/list": {
|
||||
onmatch: state.loadUsers,
|
||||
render() {
|
||||
@@ -330,7 +330,7 @@ const FRAME_BUDGET = 100;
|
||||
{
|
||||
let progress = 0;
|
||||
|
||||
m.mount(document.body!, {
|
||||
m.mount(document.body, {
|
||||
view() {
|
||||
return [
|
||||
m("input[type=file]", { onchange: upload }),
|
||||
@@ -396,7 +396,7 @@ const FRAME_BUDGET = 100;
|
||||
deserialize: value => value
|
||||
})
|
||||
.then(svg => {
|
||||
m.render(document.body!, m.trust(svg));
|
||||
m.render(document.body, m.trust(svg));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ class Comp4 implements ClassComponent<Comp4Attrs> {
|
||||
//
|
||||
// Test that all are mountable components
|
||||
//
|
||||
m.route(document.body!, '/', {
|
||||
m.route(document.body, '/', {
|
||||
'/comp0': Comp0,
|
||||
'/comp1': Comp1,
|
||||
'/comp2': Comp2,
|
||||
|
||||
@@ -148,7 +148,7 @@ function comp5(): Component<Comp4Attrs, Comp5State> {
|
||||
//
|
||||
// Test that all are mountable components
|
||||
//
|
||||
m.route(document.body!, '/', {
|
||||
m.route(document.body, '/', {
|
||||
'/comp0': comp0,
|
||||
'/comp1': comp1,
|
||||
'/comp2': comp2,
|
||||
|
||||
@@ -10,9 +10,9 @@ const params = parseQueryString('?id=123');
|
||||
|
||||
const qstr = buildQueryString({id: 123});
|
||||
|
||||
render(document.body!, 'Hello');
|
||||
render(document.body!, h('h1', 'Test'));
|
||||
render(document.body!, [
|
||||
render(document.body, 'Hello');
|
||||
render(document.body, h('h1', 'Test'));
|
||||
render(document.body, [
|
||||
h('h1', 'Test'), "abc", null, 123, false, h('p', 'Vnode array'),
|
||||
['a', 123, undefined, h('div', 'Nested')]
|
||||
]);
|
||||
|
||||
@@ -66,7 +66,7 @@ const routeResolver: RouteResolver<Attrs, RRState> & RRState = {
|
||||
}
|
||||
};
|
||||
|
||||
route(document.body!, '/', {
|
||||
route(document.body, '/', {
|
||||
'/': component1,
|
||||
'/test1': {
|
||||
onmatch(args, path) {
|
||||
|
||||
Vendored
+2
-2
@@ -5863,8 +5863,8 @@ declare module "crypto" {
|
||||
export interface Signer extends NodeJS.WritableStream {
|
||||
update(data: string | Buffer | NodeJS.TypedArray | DataView): Signer;
|
||||
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer;
|
||||
sign(private_key: string | { key: string; passphrase: string }): Buffer;
|
||||
sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string;
|
||||
sign(private_key: string | { key: string; passphrase: string, padding?: number, saltLength?: number }): Buffer;
|
||||
sign(private_key: string | { key: string; passphrase: string, padding?: number, saltLength?: number }, output_format: HexBase64Latin1Encoding): string;
|
||||
}
|
||||
export function createVerify(algorith: string, options?: stream.WritableOptions): Verify;
|
||||
export interface Verify extends NodeJS.WritableStream {
|
||||
|
||||
Vendored
+59
-31
@@ -613,7 +613,20 @@ declare namespace Office {
|
||||
* True, if the current platform allows the add-in to display a UI for selling or upgrading; otherwise returns False.
|
||||
*
|
||||
* @remarks
|
||||
* The iOS App Store doesn't support apps with add-ins that provide links to additional payment systems. However, Office Add-ins running on the Windows desktop or for Office Online in the browser, do allow such links. If you want the UI of your add-in to provide a link to an external payment system on platforms other than iOS, you can use the commerceAllowed property to control when that link is displayed.
|
||||
* The iOS App Store doesn't support apps with add-ins that provide links to additional payment systems. However, Office Add-ins running on the Windows desktop or for Office Online in the browser do allow such links. If you want the UI of your add-in to provide a link to an external payment system on platforms other than iOS, you can use the commerceAllowed property to control when that link is displayed.
|
||||
*
|
||||
* **Support details**
|
||||
*
|
||||
* A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration.
|
||||
*
|
||||
* For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}.
|
||||
*
|
||||
* *Supported hosts, by platform*
|
||||
* <table>
|
||||
* <tr><th> </th><th> Office for iPad </th></tr>
|
||||
* <tr><th> Excel </th><td> Y </td></tr>
|
||||
* <tr><th> Word </th><td> Y </td></tr>
|
||||
* </table>
|
||||
*/
|
||||
commerceAllowed: boolean;
|
||||
/**
|
||||
@@ -698,7 +711,7 @@ declare namespace Office {
|
||||
* <tr><th> Word </th><td> Y </td><td> Y </td><td> Y </td></tr>
|
||||
* </table>
|
||||
*/
|
||||
document: Document;
|
||||
document: Office.Document;
|
||||
/**
|
||||
* Contains the Office application host in which the add-in is running.
|
||||
*/
|
||||
@@ -725,7 +738,7 @@ declare namespace Office {
|
||||
*
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or read</td></tr></table>
|
||||
*/
|
||||
mailbox: Mailbox;
|
||||
mailbox: Office.Mailbox;
|
||||
/**
|
||||
* Provides access to the properties for Office theme colors.
|
||||
*/
|
||||
@@ -750,12 +763,26 @@ declare namespace Office {
|
||||
*
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or read</td></tr></table>
|
||||
*/
|
||||
roamingSettings: RoamingSettings;
|
||||
roamingSettings: Office.RoamingSettings;
|
||||
/**
|
||||
* Specifies whether the platform and device allows touch interaction.
|
||||
* Specifies whether the platform and device allows touch interaction. True if the add-in is running on a touch device, such as an iPad; false otherwise.
|
||||
*
|
||||
* @remarks
|
||||
* Use the touchEnabled property to determine when your add-in is running on a touch device and if necessary, adjust the kind of controls, and size and spacing of elements in your add-in's UI to accommodate touch interactions.
|
||||
*
|
||||
* **Support details**
|
||||
*
|
||||
* A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration.
|
||||
*
|
||||
* For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}.
|
||||
*
|
||||
* *Supported hosts, by platform*
|
||||
* <table>
|
||||
* <tr><th> </th><th> Office for iPad </th></tr>
|
||||
* <tr><th> Excel </th><td> Y </td></tr>
|
||||
* <tr><th> PowerPoint </th><td> Y </td></tr>
|
||||
* <tr><th> Word </th><td> Y </td></tr>
|
||||
* </table>
|
||||
*/
|
||||
touchEnabled: boolean;
|
||||
/**
|
||||
@@ -2048,11 +2075,11 @@ declare namespace Office {
|
||||
* Represents a binding to a section of the document.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>MatrixBinding, TableBinding, TextBinding</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>MatrixBinding, TableBinding, TextBinding</td></tr></table>
|
||||
*
|
||||
* The Binding object exposes the functionality possessed by all bindings regardless of type.
|
||||
*
|
||||
* The Binding object is never called directly. It is the abstract parent class of the objects that represent each type of binding: MatrixBinding, TableBinding, or TextBinding. All three of these objects inherit the getDataAsync and setDataAsync methods from the Binding object that enable to you interact with the data in the binding. They also inherit the id and type properties for querying those property values. Additionally, the MatrixBinding and TableBinding objects expose additional methods for matrix- and table-specific features, such as counting the number of rows and columns.
|
||||
* The Binding object is never called directly. It is the abstract parent class of the objects that represent each type of binding: {@link Office.MatrixBinding}, {@link Office.TableBinding}, or {@link Office.TextBinding}. All three of these objects inherit the getDataAsync and setDataAsync methods from the Binding object that enable to you interact with the data in the binding. They also inherit the id and type properties for querying those property values. Additionally, the MatrixBinding and TableBinding objects expose additional methods for matrix- and table-specific features, such as counting the number of rows and columns.
|
||||
*
|
||||
* **Support details**
|
||||
*
|
||||
@@ -2074,15 +2101,15 @@ declare namespace Office {
|
||||
/**
|
||||
* Get the Document object associated with the binding.
|
||||
*/
|
||||
document: Document;
|
||||
document: Office.Document;
|
||||
/**
|
||||
* A string that uniquely identifies this binding among the bindings in the same Document object.
|
||||
* A string that uniquely identifies this binding among the bindings in the same {@link Office.Document} object.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Gets the type of the binding.
|
||||
*/
|
||||
type: BindingType;
|
||||
type: Office.BindingType;
|
||||
/**
|
||||
* Adds an event handler to the object for the specified {@link Office.EventType}. Supported EventTypes are `Office.EventType.BindingDataChanged` and `Office.EventType.BindingSelectionChanged`.
|
||||
*
|
||||
@@ -2092,26 +2119,26 @@ declare namespace Office {
|
||||
* @param eventType The event type. For bindings, it can be `Office.EventType.BindingDataChanged` or `Office.EventType.BindingSelectionChanged`.
|
||||
* @param handler The event handler function to add, whose only parameter is of type {@link Office.BindingDataChangedEventArgs} or {@link Office.BindingSelectionChangedEventArgs}.
|
||||
* @param options Provides an option for preserving context data of any type, unchanged, for use in a callback.
|
||||
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult.
|
||||
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
||||
*/
|
||||
addHandlerAsync(eventType: Office.EventType, handler: any, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void;
|
||||
addHandlerAsync(eventType: Office.EventType, handler: any, options?: Office.AsyncContextOptions, callback?: (result: Office.AsyncResult) => void): void;
|
||||
/**
|
||||
* Returns the data contained within the binding.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
*
|
||||
* When called from a MatrixBinding or TableBinding, the getDataAsync method will return a subset of the bound values if the optional startRow, startColumn, rowCount, and columnCount parameters are specified (and they specify a contiguous and valid range).
|
||||
*
|
||||
* @param options Provides options for how to get the data in a binding.
|
||||
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult.
|
||||
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
||||
*/
|
||||
getDataAsync(options?: GetBindingDataOptions, callback?: (result: AsyncResult) => void): void;
|
||||
/**
|
||||
* Removes the specified handler from the binding for the specified event type.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>BindingEvents</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>BindingEvents</td></tr></table>
|
||||
*
|
||||
* @param eventType The event type. For bindings, it can be `Office.EventType.BindingDataChanged` or `Office.EventType.BindingSelectionChanged`.
|
||||
* @param options Provides options to determine which event handler or handlers are removed.
|
||||
@@ -2123,7 +2150,7 @@ declare namespace Office {
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* <tr><td>Requirement Sets</td><td>MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
*
|
||||
* The value passed for data contains the data to be written in the binding. The kind of value passed determines what will be written as described in the following table.
|
||||
*
|
||||
@@ -2341,7 +2368,7 @@ declare namespace Office {
|
||||
* Creates a binding against a named object in the document.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
*
|
||||
* For Excel, the itemName parameter can refer to a named range or a table.
|
||||
*
|
||||
@@ -2378,7 +2405,7 @@ declare namespace Office {
|
||||
* Create a binding by prompting the user to make a selection on the document.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>Not in a set</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>Not in a set</td></tr></table>
|
||||
*
|
||||
* Adds a binding object of the specified type to the Bindings collection, which will be identified with the supplied id. The method fails if the specified selection cannot be bound.
|
||||
*
|
||||
@@ -2404,7 +2431,7 @@ declare namespace Office {
|
||||
* Create a binding based on the user's current selection.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
*
|
||||
* Adds the specified type of binding object to the Bindings collection, which will be identified with the supplied id.
|
||||
*
|
||||
@@ -2434,7 +2461,7 @@ declare namespace Office {
|
||||
* Gets all bindings that were previously created.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
*
|
||||
* **Support details**
|
||||
*
|
||||
@@ -2458,7 +2485,7 @@ declare namespace Office {
|
||||
* Retrieves a binding based on its Name
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>CustomXmlParts, MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>CustomXmlParts, MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
*
|
||||
* Fails if the specified id does not exist.
|
||||
*
|
||||
@@ -2485,7 +2512,7 @@ declare namespace Office {
|
||||
* Removes the binding from the document
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>MatrixBindings, TableBindings, TextBindings</td></tr></table>
|
||||
*
|
||||
* Fails if the specified id does not exist.
|
||||
*
|
||||
@@ -2532,28 +2559,28 @@ declare namespace Office {
|
||||
* Gets the base name of the node without the namespace prefix, if one exists.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
*/
|
||||
baseName: string;
|
||||
/**
|
||||
* Retrieves the string GUID of the CustomXMLPart.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
*/
|
||||
namespaceUri: string;
|
||||
/**
|
||||
* Gets the type of the CustomXMLNode.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
*/
|
||||
nodeType: string;
|
||||
/**
|
||||
* Gets the nodes associated with the XPath expression.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
*
|
||||
* @param xPath The XPath expression that specifies the nodes to get. Required.
|
||||
* @param options Provides an option for preserving context data of any type, unchanged, for use in a callback.
|
||||
@@ -2564,7 +2591,7 @@ declare namespace Office {
|
||||
* Gets the node value.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
*
|
||||
* @param options Provides an option for preserving context data of any type, unchanged, for use in a callback.
|
||||
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult.
|
||||
@@ -2574,7 +2601,7 @@ declare namespace Office {
|
||||
* Gets the text of an XML node in a custom XML part.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
*
|
||||
* @param options Provides an option for preserving context data of any type, unchanged, for use in a callback.
|
||||
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult.
|
||||
@@ -2584,7 +2611,7 @@ declare namespace Office {
|
||||
* Gets the node's XML.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
*
|
||||
* @param options Provides an option for preserving context data of any type, unchanged, for use in a callback.
|
||||
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult.
|
||||
@@ -2594,7 +2621,7 @@ declare namespace Office {
|
||||
* Sets the node value.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
*
|
||||
* @param value The value to be set on the node
|
||||
* @param options Provides an option for preserving context data of any type, unchanged, for use in a callback.
|
||||
@@ -2618,7 +2645,7 @@ declare namespace Office {
|
||||
* Sets the node XML.
|
||||
*
|
||||
* @remarks
|
||||
* <tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
* <table><tr><td>Requirement Sets</td><td>CustomXmlParts</td></tr></table>
|
||||
*
|
||||
* @param xml The XML to be set on the node
|
||||
* @param options Provides an option for preserving context data of any type, unchanged, for use in a callback.
|
||||
@@ -2779,6 +2806,7 @@ declare namespace Office {
|
||||
/**
|
||||
* Provides information about the replaced node that raised the nodeReplaced event.
|
||||
*
|
||||
* @remarks
|
||||
* **Support details**
|
||||
*
|
||||
* A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface.
|
||||
|
||||
Vendored
+16
@@ -10135,6 +10135,13 @@ export namespace style {
|
||||
*/
|
||||
getLineDash(): number[];
|
||||
|
||||
/**
|
||||
* Get the line dash offset style for the stroke.
|
||||
* @return Line dash offset
|
||||
* @api
|
||||
*/
|
||||
getLineDashOffset(): number;
|
||||
|
||||
/**
|
||||
* Get the line join type for the stroke.
|
||||
* @return Line join.
|
||||
@@ -10186,6 +10193,14 @@ export namespace style {
|
||||
*/
|
||||
setLineDash(lineDash: number[]): void;
|
||||
|
||||
/**
|
||||
* Set the line dash offset.
|
||||
*
|
||||
* @param lineDashOffset Line dash offset.
|
||||
* @api
|
||||
*/
|
||||
setLineDashOffset(lineDashOffset: number): void;
|
||||
|
||||
/**
|
||||
* Set the line join.
|
||||
*
|
||||
@@ -12347,6 +12362,7 @@ export namespace olx {
|
||||
lineCap?: string;
|
||||
lineJoin?: string;
|
||||
lineDash?: number[];
|
||||
lineDashOffset?: number;
|
||||
miterLimit?: number;
|
||||
width?: number;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ const style = new ol.style.Style();
|
||||
const styleArray: ol.style.Style[] = [];
|
||||
const styleFunction: ol.StyleFunction = (feature, resolution) => style;
|
||||
let styleRegularShape: ol.style.RegularShape;
|
||||
let styleStroke: ol.style.Stroke;
|
||||
const tilegrid = new ol.tilegrid.TileGrid({resolutions: numberArray});
|
||||
const transformFn: ol.TransformFunction = (array, out, dimension) => numberArray;
|
||||
let units: ol.proj.Units;
|
||||
@@ -1111,6 +1112,35 @@ styleRegularShape = new ol.style.RegularShape({
|
||||
points: 4,
|
||||
});
|
||||
|
||||
//
|
||||
// ol.style.Stroke
|
||||
//
|
||||
|
||||
styleStroke = new ol.style.Stroke();
|
||||
styleStroke.setColor('#FF0000');
|
||||
styleStroke.setColor('red');
|
||||
styleStroke.setColor('#CCC');
|
||||
styleStroke.setColor('rgb(255, 255, 255)');
|
||||
styleStroke.setColor('rgb(255, 255, 255, 0.7)');
|
||||
styleStroke.setLineCap('butt');
|
||||
styleStroke.setLineCap('round');
|
||||
styleStroke.setLineCap('square');
|
||||
styleStroke.setLineJoin('bevel');
|
||||
styleStroke.setLineJoin('round');
|
||||
styleStroke.setLineJoin('miter');
|
||||
styleStroke.setLineDash([10, 5]);
|
||||
styleStroke.setLineDashOffset(10);
|
||||
styleStroke.setMiterLimit(20);
|
||||
styleStroke.setWidth(5);
|
||||
|
||||
const strokeColor: ol.Color|ol.ColorLike = styleStroke.getColor();
|
||||
const strokeLineCap: string = styleStroke.getLineCap();
|
||||
const strokeLineJoin: string = styleStroke.getLineJoin();
|
||||
const strokeLineDash: number[] = styleStroke.getLineDash();
|
||||
const strokeLineDashOffset: number = styleStroke.getLineDashOffset();
|
||||
const strokeMiterLimit: number = styleStroke.getMiterLimit();
|
||||
const strokeWidth: number = styleStroke.getWidth();
|
||||
|
||||
//
|
||||
// ol.proj
|
||||
//
|
||||
|
||||
Vendored
+1
@@ -61,6 +61,7 @@ declare namespace OwlCarousel {
|
||||
dotsContainer?: string | boolean;
|
||||
checkVisible?: boolean;
|
||||
slideTransition?: string;
|
||||
autoHeight?: boolean;
|
||||
// CLASSES
|
||||
refreshClass?: string;
|
||||
loadingClass?: string;
|
||||
|
||||
Vendored
+3
-1
@@ -39,7 +39,7 @@ interface Parse {
|
||||
/**
|
||||
* Returns an object with only the properties that had ini-style keys converted to objects.
|
||||
*/
|
||||
keys(config: Config): Config;
|
||||
expandKeys(config: Config): Config;
|
||||
}
|
||||
|
||||
// no-empty-interface is disabled for a better debugging experience. Empty interfaces are used to alias a type alias.
|
||||
@@ -49,6 +49,8 @@ interface Options extends Pick<_Options, keyof _Options> { }
|
||||
interface _Options {
|
||||
cwd: string;
|
||||
path: string;
|
||||
include?: boolean;
|
||||
expandKeys?: boolean;
|
||||
}
|
||||
|
||||
type ParseCallback = ((err: Error | null, config: Config) => void);
|
||||
|
||||
@@ -99,12 +99,12 @@ function test_sync() {
|
||||
}
|
||||
}
|
||||
|
||||
function test_keys() {
|
||||
function test_expandKeys() {
|
||||
const config = {
|
||||
'foo "bar"': { doStuff: true },
|
||||
'foo "baz"': { doStuff: true }
|
||||
};
|
||||
const keys = parse.keys(config);
|
||||
const keys = parse.expandKeys(config);
|
||||
|
||||
keys.foo.bar.doStuff === true;
|
||||
keys.foo.baz.doStuff === true;
|
||||
|
||||
Vendored
+1
-1
@@ -626,7 +626,7 @@ declare namespace PouchDB {
|
||||
};
|
||||
}
|
||||
|
||||
interface Database<Content extends {} = {}> {
|
||||
interface Database<Content extends {} = {}> extends EventEmitter {
|
||||
/** The name passed to the PouchDB constructor and unique identifier of the database. */
|
||||
name: string;
|
||||
|
||||
|
||||
@@ -114,6 +114,8 @@ function testBasics() {
|
||||
|
||||
const db = new PouchDB<MyModel>();
|
||||
|
||||
db.on("closed", () => {});
|
||||
|
||||
db.post(model).then((result) => {
|
||||
isString(result.id);
|
||||
});
|
||||
|
||||
Vendored
+1
-1
@@ -43,7 +43,7 @@ export interface KeyboardStatic {
|
||||
}
|
||||
|
||||
export interface ClipboardStatic {
|
||||
convert(html: string|Blot): DeltaStatic;
|
||||
convert(html?: string): DeltaStatic;
|
||||
addMatcher(selectorOrNodeType: string|number, callback: (node: any, delta: DeltaStatic) => DeltaStatic): void;
|
||||
dangerouslyPasteHTML(html: string, source?: Sources): void;
|
||||
dangerouslyPasteHTML(index: number, html: string, source?: Sources): void;
|
||||
|
||||
@@ -148,6 +148,7 @@ function test_setHtmlContents() {
|
||||
const html = "<b>this is a bold text</b>";
|
||||
const delta = quillEditor.clipboard.convert(html);
|
||||
quillEditor.setContents(delta);
|
||||
quillEditor.clipboard.convert();
|
||||
}
|
||||
|
||||
function test_getSelection() {
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
// Type definitions for radium 0.24.0
|
||||
// Project: https://github.com/formidablelabs/radium
|
||||
// Definitions by: Alex Gorbatchev <https://github.com/alexgorbatchev>, Philipp Holzer <https://github.com/nupplaphil>, Alexey Svetliakov <https://github.com/asvetliakov>, Mikael Hermansson <https://github.com/mihe>
|
||||
// Definitions by: Alex Gorbatchev <https://github.com/alexgorbatchev>, Philipp Holzer <https://github.com/nupplaphil>, Alexey Svetliakov <https://github.com/asvetliakov>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
|
||||
Vendored
+1
@@ -86,6 +86,7 @@ export interface ReactDatePickerProps {
|
||||
startDate?: moment.Moment;
|
||||
startOpen?: boolean;
|
||||
tabIndex?: number;
|
||||
timeCaption?: string;
|
||||
timeFormat?: string;
|
||||
timeIntervals?: number;
|
||||
title?: string;
|
||||
|
||||
Vendored
+1
@@ -3,6 +3,7 @@
|
||||
// Definitions by: Giedrius Grabauskas <https://github.com/GiedriusGrabauskas>
|
||||
// Simon Baumann <https://github.com/chnoch>
|
||||
// Benedict Etzel <https://github.com/beheh>
|
||||
// Wu Haotian <https://github.com/whtsky>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -15,7 +15,7 @@ export interface i18nProps {
|
||||
i18n?: i18n;
|
||||
initialI18nStore?: any;
|
||||
initialLanguage?: string;
|
||||
children: (t: TranslationFunction, options: Options) => JSX.Element;
|
||||
children: (t: TranslationFunction, options: Options) => React.ReactNode;
|
||||
}
|
||||
|
||||
export default class I18n extends React.Component<i18nProps> { }
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ export interface I18nextProviderProps {
|
||||
i18n: i18n;
|
||||
initialI18nStore?: any;
|
||||
initialLanguage?: string;
|
||||
children: JSX.Element;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
export default class I18nextProvider extends React.Component<I18nextProviderProps> { }
|
||||
|
||||
@@ -107,6 +107,10 @@ class App extends React.Component {
|
||||
<App/>
|
||||
</I18nextProvider>;
|
||||
|
||||
<I18nextProvider i18n={i18n} initialLanguage={'en'} initialI18nStore={{}}>
|
||||
123
|
||||
</I18nextProvider>;
|
||||
|
||||
loadNamespaces({components: [App], i18n}).then(() => {
|
||||
}).catch(error => {
|
||||
});
|
||||
@@ -182,6 +186,10 @@ interface CustomTranslateFunctionProps {
|
||||
}
|
||||
</I18n>;
|
||||
|
||||
<I18n>
|
||||
{t => '123'}
|
||||
</I18n>;
|
||||
|
||||
const defaults: ReactI18NextOptions = {
|
||||
wait: true,
|
||||
withRef: true,
|
||||
|
||||
Vendored
+2
@@ -20,6 +20,7 @@
|
||||
// Luca Campana <https://github.com/TizioFittizio>
|
||||
// Ullrich Schaefer <https://github.com/stigi>
|
||||
// Linus Unnebäck <https://github.com/LinusU>
|
||||
// Jake <https://github.com/jakebooyah>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@@ -442,6 +443,7 @@ export type NavigationStackAction =
|
||||
| NavigationBackAction
|
||||
| NavigationSetParamsAction
|
||||
| NavigationResetAction
|
||||
| NavigationReplaceAction
|
||||
| NavigationPopAction
|
||||
| NavigationPushAction
|
||||
| NavigationPopToTopAction;
|
||||
|
||||
+13
-4
@@ -1,6 +1,8 @@
|
||||
// Type definitions for react-resize-detector 2.2
|
||||
// Type definitions for react-resize-detector 3.1
|
||||
// Project: https://github.com/maslianok/react-resize-detector
|
||||
// Definitions by: Matthew James <https://github.com/matthew-matvei>, James Greenleaf <https://github.com/aMoniker>
|
||||
// Definitions by: Matthew James <https://github.com/matthew-matvei>
|
||||
// James Greenleaf <https://github.com/aMoniker>
|
||||
// Remin <https://github.com/rdrgn>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@@ -8,7 +10,7 @@ import * as React from "react";
|
||||
|
||||
interface ReactResizeDetectorProps extends React.Props<ReactResizeDetector> {
|
||||
/** Function that will be invoked with width and height arguments */
|
||||
onResize: (width: number, height: number) => void;
|
||||
onResize?: (width: number, height: number) => void;
|
||||
/** Trigger onResize on height change. Default: false */
|
||||
handleHeight?: boolean;
|
||||
/** Trigger onResize on width change. Default: false */
|
||||
@@ -18,11 +20,18 @@ interface ReactResizeDetectorProps extends React.Props<ReactResizeDetector> {
|
||||
/** Id of the element we want to observe. If none provided, parentElement of the component will be used. Default: "" */
|
||||
resizableElementId?: string;
|
||||
/** Possible values: throttle and debounce */
|
||||
refreshMode?: 'throttle' | 'debounce';
|
||||
refreshMode?: "throttle" | "debounce";
|
||||
/** Makes sense only when refreshMode is set. Default: 1000. */
|
||||
refreshRate?: number;
|
||||
|
||||
render?: (props: any) => React.ReactNode;
|
||||
}
|
||||
|
||||
declare class ReactResizeDetector extends React.PureComponent<ReactResizeDetectorProps> { }
|
||||
|
||||
export declare function withResizeDetector(
|
||||
WrappedComponent: React.ReactNode,
|
||||
props?: ReactResizeDetectorProps
|
||||
): React.Component;
|
||||
|
||||
export default ReactResizeDetector;
|
||||
|
||||
Regular → Executable
+36
-12
@@ -2,8 +2,11 @@
|
||||
|
||||
import * as React from "react";
|
||||
import * as ReactDOM from "react-dom";
|
||||
import ReactResizeDetector, { withResizeDetector } from "react-resize-detector";
|
||||
|
||||
import ReactResizeRouter from "react-resize-detector";
|
||||
const CustomComponent = ({ width, height }: any) => (
|
||||
<div>{`${width}x${height}`}</div>
|
||||
);
|
||||
|
||||
class App extends React.PureComponent {
|
||||
constructor(props: {}) {
|
||||
@@ -13,17 +16,38 @@ class App extends React.PureComponent {
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
return <div>
|
||||
<div>Some child content</div>
|
||||
<ReactResizeRouter
|
||||
onResize={this.handleResize}
|
||||
handleWidth
|
||||
handleHeight
|
||||
skipOnMount
|
||||
resizableElementId="someElement"
|
||||
refreshMode="throttle"
|
||||
refreshRate={10} />
|
||||
</div>;
|
||||
return (
|
||||
<div>
|
||||
<div>Some child content</div>
|
||||
<ReactResizeDetector
|
||||
onResize={this.handleResize}
|
||||
handleWidth
|
||||
handleHeight
|
||||
skipOnMount
|
||||
resizableElementId="someElement"
|
||||
refreshMode="throttle"
|
||||
refreshRate={10}
|
||||
/>
|
||||
<ReactResizeDetector handleWidth handleHeight>
|
||||
{(width: number, height: number) => (
|
||||
<div>{`${width}x${height}`}</div>
|
||||
)}
|
||||
</ReactResizeDetector>
|
||||
<ReactResizeDetector handleWidth handleHeight>
|
||||
<CustomComponent />
|
||||
</ReactResizeDetector>
|
||||
{withResizeDetector(CustomComponent)}
|
||||
<ReactResizeDetector
|
||||
handleWidth
|
||||
handleHeight
|
||||
render={({ width, height }) => (
|
||||
<div>
|
||||
Width:{width}, Height:{height}
|
||||
</div>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
private handleResize(width: number, height: number) {
|
||||
|
||||
+2
-2
@@ -11,13 +11,13 @@ export interface CreatableProps<OptionType> {
|
||||
allowCreateWhileLoading?: boolean;
|
||||
/* Gets the label for the "create new ..." option in the menu. Is given the
|
||||
current input value. */
|
||||
formatCreateLabel?: (inputValue: string) => Node;
|
||||
formatCreateLabel?: (inputValue: string) => React.ReactNode;
|
||||
/* Determines whether the "create new ..." option should be displayed based on
|
||||
the current input value, select value and options array. */
|
||||
isValidNewOption?: (inputValue: string, value: ValueType<OptionType>, options: OptionsType<OptionType>) => boolean;
|
||||
/* Returns the data for the new option when it is created. Used to display the
|
||||
value, and is passed to `onChange`. */
|
||||
getNewOptionData?: (inputValue: string, optionLabel: Node) => OptionType;
|
||||
getNewOptionData?: (inputValue: string, optionLabel: React.ReactNode) => OptionType;
|
||||
/* If provided, this will be called with the input value when a new option is
|
||||
created, and `onChange` will **not** be called. Use this when you need more
|
||||
control over what happens when new options are created. */
|
||||
|
||||
Vendored
+12
-12
@@ -107,7 +107,7 @@ export interface Props<OptionType> {
|
||||
/* Formats group labels in the menu as React components */
|
||||
formatGroupLabel?: typeof formatGroupLabel;
|
||||
/* Formats option labels in the menu and control as React components */
|
||||
formatOptionLabel?: (option: OptionType, labelMeta: FormatOptionLabelMeta<OptionType>) => Node;
|
||||
formatOptionLabel?: (option: OptionType, labelMeta: FormatOptionLabelMeta<OptionType>) => React.ReactNode;
|
||||
/* Resolves option data to a string to be displayed as the label by components */
|
||||
getOptionLabel?: typeof getOptionLabel;
|
||||
/* Resolves option data to a string to compare options and specify value attributes */
|
||||
@@ -311,7 +311,7 @@ export default class Select<OptionType> extends React.Component<Props<OptionType
|
||||
selectOption: (newValue: OptionType) => void;
|
||||
setValue: (newValue: ValueType<OptionType>, action: ActionTypes, option?: OptionType) => void;
|
||||
selectProps: Readonly<{
|
||||
children?: Node;
|
||||
children?: React.ReactNode;
|
||||
}> & Readonly<Props<OptionType>>;
|
||||
};
|
||||
|
||||
@@ -343,8 +343,8 @@ export default class Select<OptionType> extends React.Component<Props<OptionType
|
||||
isOptionDisabled(option: OptionType, selectValue: OptionsType<OptionType>): boolean;
|
||||
isOptionSelected(option: OptionType, selectValue: OptionsType<OptionType>): boolean;
|
||||
filterOption(option: {}, inputValue: string): boolean;
|
||||
formatOptionLabel(data: OptionType, context: FormatOptionLabelContext): Node;
|
||||
formatGroupLabel(data: GroupType<OptionType>): Node;
|
||||
formatOptionLabel(data: OptionType, context: FormatOptionLabelContext): React.ReactNode;
|
||||
formatGroupLabel(data: GroupType<OptionType>): React.ReactNode;
|
||||
|
||||
// ==============================
|
||||
// Mouse Handlers
|
||||
@@ -406,14 +406,14 @@ export default class Select<OptionType> extends React.Component<Props<OptionType
|
||||
// ==============================
|
||||
constructAriaLiveMessage(): string;
|
||||
|
||||
renderInput(): Node;
|
||||
renderInput(): React.ReactNode;
|
||||
renderPlaceholderOrValue(): PlaceholderOrValue<OptionType> | null;
|
||||
renderClearIndicator(): Node;
|
||||
renderLoadingIndicator(): Node;
|
||||
renderIndicatorSeparator(): Node;
|
||||
renderDropdownIndicator(): Node;
|
||||
renderMenu(): Node;
|
||||
renderFormField(): Node;
|
||||
renderClearIndicator(): React.ReactNode;
|
||||
renderLoadingIndicator(): React.ReactNode;
|
||||
renderIndicatorSeparator(): React.ReactNode;
|
||||
renderDropdownIndicator(): React.ReactNode;
|
||||
renderMenu(): React.ReactNode;
|
||||
renderFormField(): React.ReactNode;
|
||||
|
||||
renderLiveRegion(): Node;
|
||||
renderLiveRegion(): React.ReactNode;
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { ReactNode as Node } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { GroupType } from './types';
|
||||
|
||||
export function formatGroupLabel(group: GroupType<any>): Node;
|
||||
export function formatGroupLabel(group: GroupType<any>): ReactNode;
|
||||
|
||||
export function getOptionLabel(option: any): string;
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
import { ComponentType, ReactNode as Node, Ref as ElementRef } from 'react';
|
||||
import { ComponentType, ReactNode, Ref as ElementRef } from 'react';
|
||||
|
||||
import { borderRadius, colors, spacing } from '../theme';
|
||||
import { CommonProps, PropsWithStyles } from '../types';
|
||||
@@ -14,7 +14,7 @@ export type ControlProps<OptionType> = CommonProps<OptionType> &
|
||||
PropsWithStyles &
|
||||
State & {
|
||||
/** Children to render. */
|
||||
children: Node,
|
||||
children: ReactNode,
|
||||
innerRef: ElementRef<any>,
|
||||
/** The mouse down event and the innerRef to pass down to the controller element. */
|
||||
innerProps: {
|
||||
|
||||
+3
-3
@@ -1,15 +1,15 @@
|
||||
import { ReactNode as Node, ComponentType } from 'react';
|
||||
import { ReactNode, ComponentType } from 'react';
|
||||
|
||||
import { spacing } from '../theme';
|
||||
import { CommonProps } from '../types';
|
||||
|
||||
interface ComponentProps {
|
||||
/** The children to be rendered. */
|
||||
children: Node;
|
||||
children: ReactNode;
|
||||
/** Component to wrap the label, recieves headingProps. */
|
||||
Heading: ComponentType<any>;
|
||||
/** Label to be displayed in the heading component. */
|
||||
label: Node;
|
||||
label: ReactNode;
|
||||
}
|
||||
export type GroupProps<OptionType> = CommonProps<OptionType> & ComponentProps;
|
||||
|
||||
|
||||
+4
-4
@@ -2,7 +2,7 @@ import {
|
||||
Component,
|
||||
ReactElement,
|
||||
Ref as ElementRef,
|
||||
ReactNode as Node,
|
||||
ReactNode,
|
||||
ComponentType
|
||||
} from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
@@ -89,7 +89,7 @@ interface MenuListState {
|
||||
|
||||
export interface MenuListProps {
|
||||
/** The children to be rendered. */
|
||||
children: Node;
|
||||
children: ReactNode;
|
||||
/** Inner ref to DOM Node */
|
||||
innerRef: InnerRef;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ export function loadingMessageCSS(): React.CSSProperties;
|
||||
|
||||
export type NoticeProps<OptionType> = CommonProps<OptionType> & {
|
||||
/** The children to be rendered. */
|
||||
children: Node,
|
||||
children: ReactNode,
|
||||
/** Props to be passed on to the wrapper. */
|
||||
innerProps: { [key: string]: any },
|
||||
};
|
||||
@@ -129,7 +129,7 @@ export const LoadingMessage: ComponentType<NoticeProps<any>>;
|
||||
|
||||
export type MenuPortalProps<OptionType> = CommonProps<OptionType> & {
|
||||
appendTo: HTMLElement,
|
||||
children: Node, // ideally Menu<MenuProps>
|
||||
children: ReactNode, // ideally Menu<MenuProps>
|
||||
controlElement: HTMLElement,
|
||||
menuPlacement: MenuPlacement,
|
||||
menuPosition: MenuPosition,
|
||||
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
import { ComponentType, Component, ReactNode as Node } from 'react';
|
||||
import { ComponentType, Component, ReactNode } from 'react';
|
||||
|
||||
import { borderRadius, colors, spacing } from '../theme';
|
||||
import { CommonProps } from '../types';
|
||||
|
||||
export type MultiValueProps<OptionType> = CommonProps<OptionType> &{
|
||||
children: Node,
|
||||
children: ReactNode,
|
||||
components: any,
|
||||
cropWithEllipsis: boolean,
|
||||
data: OptionType,
|
||||
@@ -23,7 +23,7 @@ export function multiValueLabelCSS(props: MultiValueProps<any>): React.CSSProper
|
||||
export function multiValueRemoveCSS(props: MultiValueProps<any>): React.CSSProperties;
|
||||
|
||||
export interface MultiValueGenericProps<OptionType> {
|
||||
children: Node;
|
||||
children: ReactNode;
|
||||
data: OptionType;
|
||||
innerProps: { className?: string };
|
||||
selectProps: any;
|
||||
@@ -33,7 +33,7 @@ export const MultiValueGeneric: ComponentType<MultiValueGenericProps<any>>;
|
||||
export const MultiValueContainer: typeof MultiValueGeneric;
|
||||
export const MultiValueLabel: typeof MultiValueGeneric;
|
||||
export type MultiValueRemoveProps<OptionType> = CommonProps<OptionType> & {
|
||||
children: Node,
|
||||
children: ReactNode,
|
||||
innerProps: {
|
||||
className: string,
|
||||
onTouchEnd: (event: any) => void,
|
||||
@@ -44,7 +44,7 @@ export type MultiValueRemoveProps<OptionType> = CommonProps<OptionType> & {
|
||||
};
|
||||
export class MultiValueRemove<OptionType> extends Component<MultiValueRemoveProps<OptionType>> {
|
||||
static defaultProps: {
|
||||
children: Node,
|
||||
children: ReactNode,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
import { ComponentType, ReactNode as Node, MouseEventHandler } from 'react';
|
||||
import { ComponentType, ReactNode, MouseEventHandler } from 'react';
|
||||
|
||||
import { colors, spacing } from '../theme';
|
||||
import { CommonProps, PropsWithStyles, InnerRef } from '../types';
|
||||
@@ -22,7 +22,7 @@ export type OptionProps<OptionType> = PropsWithStyles &
|
||||
CommonProps<OptionType> &
|
||||
State & {
|
||||
/** The children to be rendered. */
|
||||
children: Node,
|
||||
children: ReactNode,
|
||||
/** Inner ref to DOM Node */
|
||||
innerRef: InnerRef,
|
||||
/** props passed to the wrapping element for the group. */
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
import { ComponentType, ReactNode as Node } from 'react';
|
||||
import { ComponentType, ReactNode } from 'react';
|
||||
|
||||
import { colors, spacing } from '../theme';
|
||||
import { CommonProps } from '../types';
|
||||
|
||||
export type PlaceholderProps<OptionType> = CommonProps<OptionType> & {
|
||||
/** The children to be rendered. */
|
||||
children: Node,
|
||||
children: ReactNode,
|
||||
/** props passed to the wrapping element for the group. */
|
||||
innerProps: { [key: string]: any },
|
||||
};
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
import { Component, ReactNode as Node, ComponentType } from 'react';
|
||||
import { Component, ReactNode, ComponentType } from 'react';
|
||||
import { spacing } from '../theme';
|
||||
import { CommonProps, KeyboardEventHandler } from '../types';
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface ContainerState {
|
||||
export type ContainerProps<OptionType> = CommonProps<OptionType> &
|
||||
ContainerState & {
|
||||
/** The children to be rendered. */
|
||||
children: Node,
|
||||
children: ReactNode,
|
||||
/** Inner props to be passed down to the container. */
|
||||
innerProps: { onKeyDown: KeyboardEventHandler },
|
||||
};
|
||||
@@ -33,7 +33,7 @@ export type ValueContainerProps<OptionType> = CommonProps<OptionType> & {
|
||||
/** Whether the value container currently holds a value. */
|
||||
hasValue: boolean,
|
||||
/** The children to be rendered. */
|
||||
children: Node,
|
||||
children: ReactNode,
|
||||
};
|
||||
export function valueContainerCSS(): React.CSSProperties;
|
||||
export class ValueContainer extends Component<ValueContainerProps<any>> {}
|
||||
@@ -50,7 +50,7 @@ export interface IndicatorsState {
|
||||
export type IndicatorContainerProps<OptionType> = CommonProps<OptionType> &
|
||||
IndicatorsState & {
|
||||
/** The children to be rendered. */
|
||||
children: Node,
|
||||
children: ReactNode,
|
||||
};
|
||||
|
||||
export function indicatorsContainerCSS(): React.CSSProperties;
|
||||
|
||||
+7
-1
@@ -16,7 +16,13 @@ export interface TransitionActions {
|
||||
exit?: boolean;
|
||||
}
|
||||
|
||||
export type TransitionChildren = React.ReactNode | ((status: string) => React.ReactNode);
|
||||
type TransitionStatus =
|
||||
typeof ENTERING |
|
||||
typeof ENTERED |
|
||||
typeof EXITING |
|
||||
typeof EXITED |
|
||||
typeof UNMOUNTED;
|
||||
export type TransitionChildren = React.ReactNode | ((status: TransitionStatus) => React.ReactNode);
|
||||
export interface TransitionProps extends TransitionActions {
|
||||
in?: boolean;
|
||||
mountOnEnter?: boolean;
|
||||
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/reactjs/react-transition-group
|
||||
// Definitions by: Karol Janyst <https://github.com/LKay>
|
||||
// Epskampie <https://github.com/Epskampie>
|
||||
// Masafumi Koba <https://github.com/ybiquitous>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
|
||||
@@ -52,7 +52,16 @@ const Test: React.StatelessComponent = () => {
|
||||
<div>{ "test" }</div>
|
||||
</Components.Transition>
|
||||
<Components.Transition in timeout={500}>
|
||||
{(status) => <div>{status}</div>}
|
||||
{(status) => {
|
||||
switch (status) {
|
||||
case ENTERING:
|
||||
case ENTERED:
|
||||
case EXITING:
|
||||
case EXITED:
|
||||
case UNMOUNTED:
|
||||
return <div>{status}</div>;
|
||||
}
|
||||
}}
|
||||
</Components.Transition>
|
||||
|
||||
<Transition
|
||||
|
||||
+3
-13
@@ -11,26 +11,16 @@ export type WindowScrollerChildProps = {
|
||||
width: number;
|
||||
isScrolling: boolean;
|
||||
scrollTop: number;
|
||||
onChildScroll: () => void;
|
||||
onChildScroll: (params: { scrollTop: number }) => void;
|
||||
};
|
||||
|
||||
export type WindowScrollerProps = {
|
||||
/**
|
||||
* Function responsible for rendering children.
|
||||
* This function should implement the following signature:
|
||||
* ({ height, isScrolling, scrollLeft, scrollTop, width }) => PropTypes.element
|
||||
* ({ height, isScrolling, scrollLeft, scrollTop, width, onChildScroll }) => PropTypes.element
|
||||
*/
|
||||
children: (
|
||||
params: {
|
||||
onChildScroll: (params: { scrollTop: number }) => void;
|
||||
registerChild: (params?: Element) => void;
|
||||
height: number;
|
||||
isScrolling: boolean;
|
||||
scrollLeft: number;
|
||||
scrollTop: number;
|
||||
width: number;
|
||||
}
|
||||
) => React.ReactNode;
|
||||
children: (params: WindowScrollerChildProps) => React.ReactNode;
|
||||
|
||||
/** Callback to be invoked on-resize: ({ height, width }) */
|
||||
onResize?: (params: { height: number; width: number }) => void;
|
||||
|
||||
Vendored
+1
@@ -7,6 +7,7 @@
|
||||
// Kræn Hansen <https://github.com/kraenhansen>
|
||||
// Steve Zhang <https://github.com/Stevearzh>
|
||||
// Maciej Goszczycki <https://github.com/mgoszcz2>
|
||||
// Brandon Hall <https://github.com/brandonhall>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for redom 3.6
|
||||
// Type definitions for redom 3.12
|
||||
// Project: https://github.com/redom/redom/
|
||||
// Definitions by: Rauli Laine <https://github.com/RauliL>
|
||||
// Felix Nehrke <https://github.com/nemoinho>
|
||||
|
||||
+7
-3
@@ -1,7 +1,8 @@
|
||||
// Type definitions for @storybook/addon-knobs 3.3
|
||||
// Type definitions for @storybook/addon-knobs 3.4
|
||||
// Project: https://github.com/storybooks/storybook
|
||||
// Definitions by: Joscha Feth <https://github.com/joscha>
|
||||
// Martynas Kadisa <https://github.com/martynaskadisa>
|
||||
// A.MacLeay <https://github.com/amacleay>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@@ -49,11 +50,14 @@ export function object<T>(name: string, value: T, groupId?: string): T;
|
||||
export type SelectValue = string | number;
|
||||
export function select<T extends string>(name: string, options: { [s: string]: string }, value: T, groupId?: string): T;
|
||||
export function select<T extends number>(name: string, options: { [s: number]: string }, value: T, groupId?: string): T;
|
||||
export function select<T extends SelectValue>(name: string, options: T[], value: T, groupId?: string): T;
|
||||
export function select<T extends SelectValue>(name: string, options: ReadonlyArray<T>, value: T, groupId?: string): T;
|
||||
|
||||
export function selectV2<T extends string | number>(name: string, options: { [s: string]: T | T[] }, value: T | T[], groupId?: string): T;
|
||||
export function selectV2<T extends SelectValue>(name: string, options: T[], value: T, groupId?: string): T;
|
||||
|
||||
export function date(name: string, value?: Date, groupId?: string): Date;
|
||||
|
||||
export function array<T>(name: string, value: T[], separator?: string, groupId?: string): T[];
|
||||
export function array<T>(name: string, value: ReadonlyArray<T>, separator?: string, groupId?: string): T[];
|
||||
|
||||
export function button(name: string, handler: () => any, groupId?: string): void;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
array,
|
||||
button,
|
||||
knob,
|
||||
selectV2,
|
||||
} from '@storybook/addon-knobs';
|
||||
|
||||
enum SomeEnum {
|
||||
@@ -49,13 +50,16 @@ stories.add('with all knobs', () => {
|
||||
|
||||
type X = 'a' | 'b';
|
||||
|
||||
const genericSelect: X = select<X>('Some generic select', { a: 'type a', b: 'type b'}, 'b');
|
||||
const genericSelect: X = select<X>('Some generic select', { a: 'type a', b: 'type b' }, 'b');
|
||||
|
||||
const enumSelectOptions: { [s: number]: string } = {};
|
||||
enumSelectOptions[SomeEnum.Type1] = "Type 1";
|
||||
enumSelectOptions[SomeEnum.Type2] = "Type 2";
|
||||
const genericSelect2: SomeEnum = select<SomeEnum>('Some generic select', enumSelectOptions, SomeEnum.Type1);
|
||||
|
||||
const genericSelectV2: X = selectV2<X>('Some generic select', { 'type a': 'a', 'type b': 'b' }, 'b');
|
||||
const genericSelectV2Enum: SomeEnum = selectV2<SomeEnum>('Some generic select v2', { 'type a': SomeEnum.Type1, 'type b': SomeEnum.Type2 }, SomeEnum.Type2);
|
||||
|
||||
const genericArray: string[] = array<string>('Some generic array', ['red', 'green', 'blue']);
|
||||
|
||||
const genericKnob: X = knob<X>('Some generic knob', { value: 'a', type: 'text' });
|
||||
@@ -90,6 +94,14 @@ stories.add('dynamic knobs', () => {
|
||||
);
|
||||
});
|
||||
|
||||
const readonlyOptionsArray: ReadonlyArray<string> = ['hi'];
|
||||
select('With readonly array', readonlyOptionsArray, readonlyOptionsArray[0]);
|
||||
|
||||
const genericArray = array('With regular array', ['hi', 'there']);
|
||||
|
||||
const userInputArray = array('With readonly array', readonlyOptionsArray);
|
||||
userInputArray.push('Make sure that the output is still mutable although the input need not be!');
|
||||
|
||||
// groups
|
||||
const groupId = 'GROUP-ID1';
|
||||
|
||||
|
||||
Vendored
+9
-4
@@ -189,7 +189,7 @@ declare namespace Stripe {
|
||||
* account holder to setup a username and password, and handle all account
|
||||
* management directly with them. Possible values are custom and standard.
|
||||
*/
|
||||
type: 'custom' | 'standard';
|
||||
type: "custom" | "standard";
|
||||
}
|
||||
|
||||
interface IAccountShared {
|
||||
@@ -1470,7 +1470,7 @@ declare namespace Stripe {
|
||||
source?: sources.ISourceCreationOptionsExtended;
|
||||
}
|
||||
|
||||
interface ICustomerListOptions extends IListOptionsCreated {
|
||||
interface ICustomerListOptions extends IListOptionsCreated {
|
||||
/**
|
||||
* A filter on the list based on the customer’s email field. The value must be a string.
|
||||
*/
|
||||
@@ -4347,7 +4347,7 @@ declare namespace Stripe {
|
||||
/**
|
||||
* Value is 'card'
|
||||
*/
|
||||
object: 'card';
|
||||
object: "card";
|
||||
|
||||
/**
|
||||
* The card number
|
||||
@@ -4680,7 +4680,7 @@ declare namespace Stripe {
|
||||
trial_period_days?: number;
|
||||
|
||||
/**
|
||||
* Indicates if a plan’s trial_period_days should be applied to the subscription. Setting trial_end per subscription is preferred,
|
||||
* Indicates if a plan’s trial_period_days should be applied to the subscription. Setting trial_end per subscription is preferred,
|
||||
* and this defaults to false. Setting this flag to true together with trial_end is not allowed.
|
||||
*/
|
||||
trial_from_plan?: boolean;
|
||||
@@ -5039,6 +5039,11 @@ declare namespace Stripe {
|
||||
* For other types of refunds, it can be pending, succeeded, failed, or canceled.
|
||||
*/
|
||||
status: "pending" | "succeeded" | "failed" | "canceled";
|
||||
|
||||
/**
|
||||
* If the refund failed, the reason for refund failure if known.
|
||||
*/
|
||||
failure_reason?: "lost_or_stolen_card" | "expired_or_canceled_card" | "unknown";
|
||||
}
|
||||
|
||||
interface IRefundCreationOptions extends IDataOptionsWithMetadata {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user