mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Merge branch 'master' into node_urlUrl
This commit is contained in:
@@ -38,5 +38,6 @@ node_modules
|
||||
.sublimets
|
||||
.settings/launch.json
|
||||
|
||||
.vs
|
||||
.vscode
|
||||
yarn.lock
|
||||
|
||||
Vendored
+1
@@ -106,6 +106,7 @@ declare module 'angular' {
|
||||
onComplete?: Function;
|
||||
onRemoving?: Function;
|
||||
skipHide?: boolean;
|
||||
multiple?: boolean;
|
||||
fullscreen?: boolean; // default: false
|
||||
}
|
||||
|
||||
|
||||
@@ -109,3 +109,16 @@ const v1: Visitor = {
|
||||
path.scope.rename("n");
|
||||
}
|
||||
};
|
||||
|
||||
// Binding.kind
|
||||
const BindingKindTest: Visitor = {
|
||||
Identifier(path) {
|
||||
const kind = path.scope.getBinding("str").kind;
|
||||
kind === 'module';
|
||||
kind === 'const';
|
||||
kind === 'let';
|
||||
kind === 'var';
|
||||
// The following should fail when uncommented
|
||||
// kind === 'anythingElse';
|
||||
},
|
||||
};
|
||||
|
||||
Vendored
+1
-1
@@ -126,7 +126,7 @@ export class Binding {
|
||||
identifier: t.Identifier;
|
||||
scope: Scope;
|
||||
path: NodePath<Node>;
|
||||
kind: 'var' | 'let' | 'const';
|
||||
kind: 'var' | 'let' | 'const' | 'module';
|
||||
referenced: boolean;
|
||||
references: number;
|
||||
referencePaths: NodePath<Node>[];
|
||||
|
||||
Vendored
+6
-6
@@ -1,6 +1,6 @@
|
||||
// Type definitions for Chrome extension development
|
||||
// Project: http://developer.chrome.com/extensions/
|
||||
// Definitions by: Matthew Kimber <https://github.com/matthewkimber>, otiai10 <https://github.com/otiai10>, couven92 <https://github.com/couven92>, RReverser <https://github.com/rreverser>
|
||||
// Definitions by: Matthew Kimber <https://github.com/matthewkimber>, otiai10 <https://github.com/otiai10>, couven92 <https://github.com/couven92>, RReverser <https://github.com/rreverser>, sreimer15 <https://github.com/sreimer15>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="filesystem" />
|
||||
@@ -7062,13 +7062,12 @@ declare namespace chrome.webNavigation {
|
||||
transitionQualifiers: string[];
|
||||
}
|
||||
|
||||
interface WebNavigationEventFilter {
|
||||
/** Conditions that the URL being navigated to must satisfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event. */
|
||||
url: chrome.events.UrlFilter[];
|
||||
interface WebNavigationRequestFilter extends chrome.webRequest.RequestFilter {
|
||||
/** fulfills the webRequest.RequestFilter interface even though it is under web navigation **/
|
||||
}
|
||||
|
||||
interface WebNavigationEvent<T extends WebNavigationCallbackDetails> extends chrome.events.Event<(details: T) => void> {
|
||||
addListener(callback: (details: T) => void, filters?: WebNavigationEventFilter): void;
|
||||
addListener(callback: (details: T) => void, filters?: WebNavigationRequestFilter): void;
|
||||
}
|
||||
|
||||
interface WebNavigationFramedEvent extends WebNavigationEvent<WebNavigationFramedCallbackDetails> {}
|
||||
@@ -7178,7 +7177,8 @@ declare namespace chrome.webRequest {
|
||||
*/
|
||||
types?: string[];
|
||||
/** A list of URLs or URL patterns. Requests that cannot match any of the URLs will be filtered out. */
|
||||
urls: string[];
|
||||
urls: string[] | RegExp[] | "<all_urls>";
|
||||
|
||||
/** Optional. */
|
||||
windowId?: number;
|
||||
}
|
||||
|
||||
@@ -171,6 +171,29 @@ function catBlock () {
|
||||
["blocking"]);
|
||||
}
|
||||
|
||||
// webNavigation.onBeforeNavigate.addListener example similar api to onBeforeRequest but without extra spec
|
||||
function beforeRedditNavigation() {
|
||||
chrome.webNavigation.onBeforeNavigate.addListener(function (requestDetails) {
|
||||
console.log("URL we want to redirect to: " + requestDetails.url);
|
||||
// NOTE: This will search for top level frames with the value -1.
|
||||
if (requestDetails.parentFrameId != -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
let url = new URL(requestDetails.url);
|
||||
let splitUrl = url.hostname.split('.');
|
||||
//` Note: Does not cover the XX.co.uk type edge case
|
||||
let host = (splitUrl[(splitUrl.length -1) - 1]);
|
||||
|
||||
if (host === null) {
|
||||
return;
|
||||
} else if (host === "reddit") {
|
||||
alert("Were you trying to go on reddit, during working hours? :(")
|
||||
return;
|
||||
}
|
||||
},{urls: ["http://*/*"], types: ["image"]});
|
||||
}
|
||||
|
||||
// contrived settings example
|
||||
function proxySettings() {
|
||||
chrome.proxy.settings.get({ incognito: true }, (details) => {
|
||||
|
||||
Vendored
+2
-2
@@ -578,7 +578,7 @@ declare class Dockerode {
|
||||
|
||||
getTask(id: string): Dockerode.Task;
|
||||
|
||||
getNode(id: string): Node;
|
||||
getNode(id: string): Dockerode.Node;
|
||||
|
||||
getNetwork(id: string): Dockerode.Network;
|
||||
|
||||
@@ -640,4 +640,4 @@ declare class Dockerode {
|
||||
modem: any;
|
||||
}
|
||||
|
||||
export = Dockerode;
|
||||
export = Dockerode;
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/// <reference path="index.d.ts"/>
|
||||
|
||||
//constructor
|
||||
var constructorNoOptions = new Dropkick('#my-select');
|
||||
var constructorNoOptions2 = new Dropkick(new HTMLSelectElement());
|
||||
var constructorOptions = new Dropkick('#my-select', {});
|
||||
var constructorOptions2 = new Dropkick(new HTMLSelectElement(), {});
|
||||
|
||||
//options
|
||||
var options : DropkickOptions = {
|
||||
disabled: true,
|
||||
form: new HTMLFormElement(),
|
||||
length: 1,
|
||||
mobile: true,
|
||||
multiple: true,
|
||||
options: ['test'],
|
||||
selectedIndex: 0,
|
||||
selectedOptions: ['test'],
|
||||
value: 'test',
|
||||
change() { },
|
||||
close() { },
|
||||
open() { },
|
||||
initialize: () => { }
|
||||
}
|
||||
var withFullOptions = new Dropkick('#test', options);
|
||||
|
||||
var dk = new Dropkick('#test');
|
||||
|
||||
//fields (same as options)
|
||||
var o1 = dk.disabled;
|
||||
var o2 = dk.form;
|
||||
var o3 = dk.length;
|
||||
var o4 = dk.mobile;
|
||||
var o5 = dk.multiple;
|
||||
var o6 = dk.options;
|
||||
var o7 = dk.selectedIndex;
|
||||
var o8 = dk.selectedOptions;
|
||||
var o9 = dk.value;
|
||||
|
||||
//methods
|
||||
dk.add('new');
|
||||
dk.add(new HTMLSelectElement());
|
||||
dk.add('new', 'old');
|
||||
dk.add('new', 1);
|
||||
|
||||
dk.disable();
|
||||
dk.disable(false);
|
||||
dk.disable(4, true);
|
||||
dk.disable(4);
|
||||
|
||||
dk.dispose();
|
||||
|
||||
dk.focus();
|
||||
|
||||
dk.hide(4);
|
||||
dk.hide(4, false);
|
||||
|
||||
var node = dk.item(4);
|
||||
|
||||
dk.open();
|
||||
|
||||
dk.refresh();
|
||||
|
||||
dk.remove(4);
|
||||
|
||||
dk.reset();
|
||||
dk.reset(true);
|
||||
|
||||
var words = dk.search("qwer", "fuzzy");
|
||||
|
||||
var node2 = dk.select(4);
|
||||
var node3 = dk.select("AL");
|
||||
var node4 = dk.select(4, true);
|
||||
|
||||
var node5 = dk.selectOne(4);
|
||||
var node6 = dk.selectOne(4, true);
|
||||
|
||||
//real life example
|
||||
var fieldValue = '';
|
||||
var selectOptions : DropkickOptions = {
|
||||
open(this: Dropkick) {
|
||||
const optionsList = (<any>this).data.elem.lastChild; //undocumented but useful data field
|
||||
if (optionsList.scrollWidth > optionsList.offsetWidth) {
|
||||
optionsList.style.width = optionsList.scrollWidth + 25 + 'px';
|
||||
}
|
||||
},
|
||||
change: () => {
|
||||
fieldValue = select.value;
|
||||
}
|
||||
};
|
||||
var select = new Dropkick('#select', options);
|
||||
Vendored
+51
@@ -0,0 +1,51 @@
|
||||
// Type definitions for dropkickjs 2.1
|
||||
// Project: http://dropkickjs.com/
|
||||
// Definitions by: Dmitry Pesterev <https://github.com/VorobeY1326/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface DropkickOptions {
|
||||
disabled?: boolean;
|
||||
form?: Node;
|
||||
length?: number;
|
||||
mobile?: boolean;
|
||||
multiple?: boolean;
|
||||
options?: string[];
|
||||
selectedIndex?: number;
|
||||
selectedOptions?: string[];
|
||||
value?: string;
|
||||
|
||||
change?: () => void;
|
||||
close?: () => void;
|
||||
initialize?: () => void;
|
||||
open?: () => void;
|
||||
}
|
||||
|
||||
declare class Dropkick {
|
||||
constructor(id: string|HTMLElement, options?: DropkickOptions);
|
||||
|
||||
add(value: string | Node, before?: number | string): void;
|
||||
close(): void;
|
||||
disable(disabled?: boolean): void;
|
||||
disable(index: number, disabled?: boolean): void;
|
||||
dispose(): void;
|
||||
focus(): void;
|
||||
hide(index: number, hidden?: boolean): void;
|
||||
item(index: number): Node;
|
||||
open(): void;
|
||||
refresh(): void;
|
||||
remove(index: number): void;
|
||||
reset(clear?: boolean): void;
|
||||
search(string: string, mode?: string): string[];
|
||||
select(element: number|string, selectDisabled?: boolean): Node;
|
||||
selectOne(element: number, selectDisabled?: boolean): Node;
|
||||
|
||||
disabled: boolean;
|
||||
form: Node;
|
||||
length: number;
|
||||
mobile: boolean;
|
||||
multiple: boolean;
|
||||
options: string[];
|
||||
selectedIndex: number;
|
||||
selectedOptions: string[];
|
||||
value: string;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"dropkickjs-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/bvaughn/jasmine-es6-promise-matchers
|
||||
// Definitions by: Stephen Lautier <https://github.com/stephenlautier>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/// <reference types="jasmine" />
|
||||
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/JamieMason/Jasmine-Matchers
|
||||
// Definitions by: UserPixel <https://github.com/UserPixel>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/// <reference types="jasmine" />
|
||||
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/velesin/jasmine-jquery
|
||||
// Definitions by: Gregor Stamac <https://github.com/gstamac/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/// <reference types="jasmine"/>
|
||||
/// <reference types="jquery"/>
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/uxebu/jasmine-matchers
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/*
|
||||
Typings 2013 Bart van der Schoor
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/mhevery/jasmine-node
|
||||
// Definitions by: Sven Reglitzki <https://github.com/svi3c/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
///<reference types="jasmine"/>
|
||||
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/bvaughn/jasmine-promise-matchers
|
||||
// Definitions by: Matthew Hill <https://github.com/matthewjh>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/// <reference types="jasmine" />
|
||||
|
||||
|
||||
Vendored
+2
-1
@@ -2,6 +2,7 @@
|
||||
// Project: http://jasmine.github.io/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Theodore Brown <https://github.com/theodorejb>, David Pärsson <https://github.com/davidparsson/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
|
||||
// For ddescribe / iit use : https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/karma-jasmine/karma-jasmine.d.ts
|
||||
@@ -35,7 +36,7 @@ interface DoneFn extends Function {
|
||||
fail: (message?: Error|string) => void;
|
||||
}
|
||||
|
||||
declare function spyOn(object: any, method: string): jasmine.Spy;
|
||||
declare function spyOn<T>(object: T, method: keyof T): jasmine.Spy;
|
||||
|
||||
declare function runs(asyncMethod: Function): void;
|
||||
declare function waitsFor(latchMethod: () => boolean, failureMessage?: string, timeout?: number): void;
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/angular/jasminewd
|
||||
// Definitions by: Sammy Jelin <https://github.com/sjelin>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/// <reference types="jasmine" />
|
||||
|
||||
|
||||
Vendored
+48
-18
@@ -1,4 +1,4 @@
|
||||
// Type definitions for kafka-node 0.2.22
|
||||
// Type definitions for kafka-node 1.3.3
|
||||
// Project: https://github.com/SOHU-Co/kafka-node/
|
||||
// Definitions by: Daniel Imrie-Situnayake <https://github.com/dansitu/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -13,24 +13,24 @@ export declare class Client {
|
||||
|
||||
export declare class Producer {
|
||||
constructor(client: Client);
|
||||
on(eventName: string, cb: () => any): Producer;
|
||||
on(eventName: string, cb: (error: any) => any): Producer;
|
||||
on(eventName: string, cb: () => any): void;
|
||||
on(eventName: string, cb: (error: any) => any): void;
|
||||
send(payloads: Array<ProduceRequest>, cb: (error: any, data: any) => any): void;
|
||||
createTopics(topics: Array<string>, async: boolean, cb?: (error: any, data: any) => any): void;
|
||||
}
|
||||
|
||||
export declare class HighLevelProducer {
|
||||
constructor(client: Client);
|
||||
on(eventName: string, cb: () => any): HighLevelProducer;
|
||||
on(eventName: string, cb: (error: any) => any): HighLevelProducer;
|
||||
constructor(client: Client, options?: any);
|
||||
on(eventName: string, cb: () => any): void;
|
||||
on(eventName: string, cb: (error: any) => any): void;
|
||||
send(payloads: Array<ProduceRequest>, cb: (error: any, data: any) => any): void;
|
||||
createTopics(topics: Array<string>, async: boolean, cb?: (error: any, data: any) => any): void;
|
||||
}
|
||||
|
||||
export declare class Consumer {
|
||||
constructor(client: Client, fetchRequests: Array<FetchRequest>, options: ConsumerOptions);
|
||||
on(eventName: string, cb: (message: string) => any): Consumer;
|
||||
on(eventName: string, cb: (error: any) => any): Consumer;
|
||||
constructor(client: Client, fetchRequests: Array<OffsetFetchRequest>, options: ConsumerOptions);
|
||||
on(eventName: string, cb: (message: string) => any): void;
|
||||
on(eventName: string, cb: (error: any) => any): void;
|
||||
addTopics(topics: Array<string>, cb: (error: any, added: boolean) => any): void;
|
||||
addTopics(topics: Array<Topic>, cb: (error: any, added: boolean) => any, fromOffset: boolean): void;
|
||||
removeTopics(topics: Array<string>, cb: (error: any, removed: boolean) => any): void;
|
||||
@@ -45,8 +45,8 @@ export declare class Consumer {
|
||||
|
||||
export declare class HighLevelConsumer {
|
||||
constructor(client: Client, payloads: Array<Topic>, options: ConsumerOptions);
|
||||
on(eventName: string, cb: (message: string) => any): HighLevelConsumer;
|
||||
on(eventName: string, cb: (error: any) => any): HighLevelConsumer;
|
||||
on(eventName: string, cb: (message: string) => any): void;
|
||||
on(eventName: string, cb: (error: any) => any): void;
|
||||
addTopics(topics: Array<string>, cb: (error: any, added: boolean) => any): void;
|
||||
addTopics(topics: Array<Topic>, cb: (error: any, added: boolean) => any, fromOffset: boolean): void;
|
||||
removeTopics(topics: Array<string>, cb: (error: any, removed: boolean) => any): void;
|
||||
@@ -59,14 +59,22 @@ export declare class HighLevelConsumer {
|
||||
close(force: boolean, cb: () => any): void;
|
||||
}
|
||||
|
||||
export declare class ConsumerGroup {
|
||||
constructor(options: ConsumerGroupOptions, topics: string[]);
|
||||
on(eventName: string, cb: (message: string) => any): void;
|
||||
on(eventName: string, cb: (error: any) => any): void;
|
||||
close(force: boolean, cb: (error: any) => any): void;
|
||||
}
|
||||
|
||||
export declare class Offset {
|
||||
constructor(client: Client);
|
||||
on(eventName: string, cb: () => any): Offset;
|
||||
on(eventName: string, cb: () => any): void;
|
||||
fetch(payloads: Array<OffsetRequest>, cb: (error: any, data: any) => any): void;
|
||||
commit(groupId: string, payloads: Array<OffsetCommitRequest>, cb: (error: any, data: any) => any): void;
|
||||
fetchCommits(groupId: string, payloads: Array<OffsetFetchRequest>, cb: (error: any, data: any) => any): void;
|
||||
fetchLatestOffsets(topics: Array<string>, cb: (error: any, data: any) => any): void;
|
||||
on(eventName: string, cb: (error: any) => any): Offset;
|
||||
fetchEarliestOffsets(topics: Array<string>, cb: (error: any, data: any) => any): void;
|
||||
on(eventName: string, cb: (error: any) => any): void;
|
||||
}
|
||||
|
||||
export declare class KeyedMessage {
|
||||
@@ -74,6 +82,11 @@ export declare class KeyedMessage {
|
||||
}
|
||||
|
||||
// # Interfaces
|
||||
export interface AckBatchOptions {
|
||||
noAckBatchSize: number | null,
|
||||
noAckBatchAge: number | null
|
||||
}
|
||||
|
||||
export interface ZKOptions {
|
||||
sessionTimeout?: number;
|
||||
spinDelay?: number;
|
||||
@@ -90,6 +103,7 @@ export interface ProduceRequest {
|
||||
|
||||
export interface ConsumerOptions {
|
||||
groupId?: string;
|
||||
id?: string;
|
||||
autoCommit?: boolean;
|
||||
autoCommitIntervalMs?: number;
|
||||
fetchMaxWaitMs?: number;
|
||||
@@ -99,6 +113,27 @@ export interface ConsumerOptions {
|
||||
encoding?: string;
|
||||
}
|
||||
|
||||
export interface CustomPartitionAssignmentProtocol {
|
||||
name: string;
|
||||
version: number;
|
||||
userData: {};
|
||||
assign: (topicPattern: any, groupMembers: any, callback: (error: any, result: any) => void) => void;
|
||||
}
|
||||
|
||||
export interface ConsumerGroupOptions {
|
||||
host: string;
|
||||
zk?: ZKOptions;
|
||||
batch?: AckBatchOptions;
|
||||
ssl?: boolean;
|
||||
id: string;
|
||||
groupId: string;
|
||||
sessionTimeout: number;
|
||||
protocol: Array<"roundrobin" | "range" | CustomPartitionAssignmentProtocol>;
|
||||
fromOffset: "earliest" | "latest" | "none";
|
||||
migrateHLC: false;
|
||||
migrateRolling: true;
|
||||
}
|
||||
|
||||
export interface Topic {
|
||||
topic: string;
|
||||
offset?: number;
|
||||
@@ -123,10 +158,5 @@ export interface OffsetCommitRequest {
|
||||
export interface OffsetFetchRequest {
|
||||
topic: string;
|
||||
partition?: number;
|
||||
}
|
||||
|
||||
export interface FetchRequest {
|
||||
topic: string;
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import kafka = require('kafka-node');
|
||||
|
||||
var basicClient = new kafka.Client('localhost:2181/', 'sendMessage');
|
||||
@@ -138,6 +137,24 @@ hlConsumer.resumeTopics([
|
||||
|
||||
hlConsumer.close(true, function () {});
|
||||
|
||||
var ackBatchOptions = {'noAckBatchSize': 1024, 'noAckBatchAge': 10};
|
||||
var cgOptions: kafka.ConsumerGroupOptions = {
|
||||
host: 'localhost:2181/',
|
||||
batch: ackBatchOptions,
|
||||
groupId: 'groupID',
|
||||
id: 'consumerID',
|
||||
sessionTimeout: 15000,
|
||||
protocol: ["roundrobin"],
|
||||
fromOffset: "latest",
|
||||
migrateHLC: false,
|
||||
migrateRolling: true
|
||||
};
|
||||
|
||||
var consumerGroup = new kafka.ConsumerGroup( cgOptions, ['topic1']);
|
||||
consumerGroup.on('error', (err) => {});
|
||||
consumerGroup.on('message', (msg) => {});
|
||||
consumerGroup.close(true, () => {});
|
||||
|
||||
var offset = new kafka.Offset(basicClient);
|
||||
|
||||
offset.on('ready', function(){});
|
||||
@@ -154,3 +171,6 @@ offset.commit('groupId', [
|
||||
offset.fetchCommits('groupId', [
|
||||
{ topic: 't', partition: 0 }
|
||||
], function (err, data) {});
|
||||
|
||||
offset.fetchLatestOffsets(['t'], (err, offsets) => {})
|
||||
offset.fetchEarliestOffsets(['t'], (err, offsets) => {})
|
||||
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/karma-runner/karma-jasmine
|
||||
// Definitions by: Michel Salib <https://github.com/michelsalib>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/// <reference types="jasmine" />
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -689,7 +689,7 @@ declare namespace L {
|
||||
/**
|
||||
* Returns a GeoJSON representation of the layer group (as a GeoJSON GeometryCollection, GeoJSONFeatureCollection or Multipoint).
|
||||
*/
|
||||
toGeoJSON(): GeoJSONFeatureCollection<GeoJSONGeometryObject> | GeoJSONFeature<GeoJSONGeometryCollection | GeoJSONMultiPoint>;
|
||||
toGeoJSON(): GeoJSONFeatureCollection<GeoJSONGeometryObject> | GeoJSONFeature<GeoJSONMultiPoint> | GeoJSONGeometryCollection;
|
||||
|
||||
/**
|
||||
* Adds the given layer to the group.
|
||||
@@ -743,7 +743,7 @@ declare namespace L {
|
||||
*/
|
||||
getLayerId(layer: Layer): number;
|
||||
|
||||
feature: GeoJSONFeatureCollection<GeoJSONGeometryObject> | GeoJSONFeature<GeoJSONGeometryCollection | GeoJSONMultiPoint>;
|
||||
feature: GeoJSONFeatureCollection<GeoJSONGeometryObject> | GeoJSONFeature<GeoJSONMultiPoint> | GeoJSONGeometryCollection;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Vendored
-3
@@ -623,11 +623,8 @@ export interface Collection {
|
||||
/** @deprecated */
|
||||
find(query: Object, fields?: Object, skip?: number, limit?: number, timeout?: number): Cursor<any>;
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOne
|
||||
/** @deprecated use find().limit(1).next(function(err, doc){}) */
|
||||
findOne(filter: Object, callback: MongoCallback<any>): void;
|
||||
/** @deprecated use find().limit(1).next(function(err, doc){}) */
|
||||
findOne(filter: Object, options?: FindOneOptions): Promise<any>;
|
||||
/** @deprecated use find().limit(1).next(function(err, doc){}) */
|
||||
findOne(filter: Object, options: FindOneOptions, callback: MongoCallback<any>): void;
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOneAndDelete
|
||||
findOneAndDelete(filter: Object, callback: MongoCallback<FindAndModifyWriteOpResultObject>): void;
|
||||
|
||||
Vendored
+4
@@ -19,6 +19,10 @@ interface Profile extends passport.Profile {
|
||||
_json: any;
|
||||
}
|
||||
|
||||
export interface AuthenticateOptions extends passport.AuthenticateOptions {
|
||||
authType?: string;
|
||||
}
|
||||
|
||||
interface IStrategyOption {
|
||||
clientID: string;
|
||||
clientSecret: string;
|
||||
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
// Type definitions for range-parser 1.2
|
||||
// Project: https://github.com/jshttp/range-parser
|
||||
// Definitions by: Tomek Łaziuk <https://github.com/tlaziuk>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function RangeParser(size: number, str: string, options?: RangeParser.Options): RangeParser.Result | RangeParser.Ranges;
|
||||
|
||||
declare namespace RangeParser {
|
||||
export interface Ranges extends Array<Range> {
|
||||
type: string;
|
||||
}
|
||||
export interface Range {
|
||||
start: number;
|
||||
end: number;
|
||||
}
|
||||
export interface Options {
|
||||
combine?: boolean;
|
||||
}
|
||||
export const enum Result {
|
||||
invaild = -2,
|
||||
unsatisifiable = -1,
|
||||
}
|
||||
}
|
||||
|
||||
export = RangeParser;
|
||||
@@ -0,0 +1,11 @@
|
||||
import * as RangeParser from 'range-parser';
|
||||
|
||||
console.assert(RangeParser(200, `malformed`) === RangeParser.Result.invaild);
|
||||
console.assert(RangeParser(200, `bytes=500-20`) === RangeParser.Result.unsatisifiable);
|
||||
|
||||
const range = RangeParser(1000, `bytes=0-499`);
|
||||
|
||||
if (typeof range !== 'number') {
|
||||
console.assert(range.type === `bytes`);
|
||||
console.assert(range.length === 1);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"range-parser-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
Vendored
+1
@@ -33,6 +33,7 @@ export {
|
||||
RoutePattern,
|
||||
RouterProps,
|
||||
RouterState,
|
||||
RedirectFunction,
|
||||
StringifyQuery,
|
||||
Query
|
||||
} from "react-router/lib/Router";
|
||||
|
||||
Vendored
+1
@@ -90,6 +90,7 @@ export interface RouteComponentProps<P, R> {
|
||||
params: P & R;
|
||||
route: PlainRoute;
|
||||
router: InjectedRouter;
|
||||
routes: PlainRoute[];
|
||||
routeParams: R;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,9 @@ import {
|
||||
InjectedRouter,
|
||||
Link,
|
||||
RouterContext,
|
||||
LinkProps
|
||||
LinkProps,
|
||||
RedirectFunction,
|
||||
RouteComponentProps
|
||||
} from "react-router";
|
||||
|
||||
const NavLink = (props: LinkProps) => (
|
||||
@@ -92,10 +94,12 @@ class NotFound extends React.Component<{}, {}> {
|
||||
|
||||
}
|
||||
|
||||
interface UsersProps extends RouteComponentProps<{}, {}> { }
|
||||
|
||||
class Users extends React.Component<{}, {}> {
|
||||
class Users extends React.Component<UsersProps, {}> {
|
||||
|
||||
render() {
|
||||
const { location, params, route, routes, router, routeParams } = this.props;
|
||||
return <div>
|
||||
This is a user list
|
||||
</div>
|
||||
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
// Type definitions for react-sticky 5.0
|
||||
// Project: https://github.com/captivationsoftware/react-sticky
|
||||
// Definitions by: Matej Lednicky <http://www.thinkcreatix.com/>, Curtis Warren <https://github.com/curtisw0>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
declare module "react-sticky" {
|
||||
|
||||
export var StickyContainer: React.ComponentClass<React.HTMLAttributes<HTMLDivElement>>;
|
||||
|
||||
export interface StickyProps {
|
||||
isActive: boolean;
|
||||
className: string;
|
||||
style: any;
|
||||
stickyClassName: string;
|
||||
stickyStyle: any;
|
||||
topOffset: number;
|
||||
bottomOffset: number;
|
||||
onStickyStateChange: (isSticky: boolean) => void;
|
||||
}
|
||||
|
||||
export var Sticky: React.ComponentClass<StickyProps>;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import {Sticky, StickyContainer} from "react-sticky";
|
||||
import * as React from "react";
|
||||
|
||||
const StickyComponent: JSX.Element =
|
||||
<StickyContainer className="sticky-container">
|
||||
<Sticky isActive={true} className="sticky" style={{}} stickyClassName="sticky" stickyStyle={{}} topOffset={0} bottomOffset={0} onStickyStateChange={(isSticky: boolean): void => undefined}>
|
||||
</Sticky>
|
||||
</StickyContainer>;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"jsx": "react",
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-sticky-tests.tsx"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
|
||||
Vendored
+2
-2
@@ -207,7 +207,7 @@ declare namespace React {
|
||||
(props: P & { children?: ReactNode }, context?: any): ReactElement<any>;
|
||||
propTypes?: ValidationMap<P>;
|
||||
contextTypes?: ValidationMap<any>;
|
||||
defaultProps?: P;
|
||||
defaultProps?: Partial<P>;
|
||||
displayName?: string;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ declare namespace React {
|
||||
propTypes?: ValidationMap<P>;
|
||||
contextTypes?: ValidationMap<any>;
|
||||
childContextTypes?: ValidationMap<any>;
|
||||
defaultProps?: P;
|
||||
defaultProps?: Partial<P>;
|
||||
displayName?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -689,3 +689,18 @@ type InputChangeEvent = React.ChangeEvent<HTMLInputElement>;
|
||||
type InputFormEvent = React.FormEvent<HTMLInputElement>;
|
||||
const changeEvent:InputChangeEvent = undefined as any;
|
||||
const formEvent:InputFormEvent = changeEvent;
|
||||
|
||||
// defaultProps should be optional of props
|
||||
{
|
||||
interface ComponentProps {
|
||||
prop1: string;
|
||||
prop2: string;
|
||||
prop3?: string;
|
||||
}
|
||||
class ComponentWithDefaultProps extends React.Component<ComponentProps, void> {
|
||||
static defaultProps = {
|
||||
prop3: "default value",
|
||||
};
|
||||
}
|
||||
const VariableWithAClass: React.ComponentClass<ComponentProps> = ComponentWithDefaultProps;
|
||||
}
|
||||
|
||||
Vendored
+6
-2
@@ -1,8 +1,11 @@
|
||||
// Type definitions for wonder-commonlib 0.1
|
||||
// Type definitions for wonder-commonlib 0.1.1
|
||||
// Project: https://github.com/yyc-git/Wonder-CommonLib
|
||||
// Definitions by: YYC <https://github.com/yyc-git>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
declare module wdCb {
|
||||
class JudgeUtils {
|
||||
static isArray(arr: any): boolean;
|
||||
@@ -21,7 +24,8 @@ declare module wdCb {
|
||||
}
|
||||
}
|
||||
|
||||
declare var global: any, window: Window;
|
||||
declare var global:NodeJS.Global,window:Window;
|
||||
|
||||
declare module wdCb {
|
||||
var root: any;
|
||||
}
|
||||
|
||||
Vendored
+3
-2
@@ -1,9 +1,10 @@
|
||||
// Type definitions for wonder-frp 0.1
|
||||
// Type definitions for wonder-frp 0.1.1
|
||||
// Project: https://github.com/yyc-git/Wonder-FRP
|
||||
// Definitions by: YYC <https://github.com/yyc-git>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="wonder-commonlib" />
|
||||
/// <reference types="node" />
|
||||
|
||||
declare module wdFrp {
|
||||
class JudgeUtils extends wdCb.JudgeUtils {
|
||||
@@ -103,7 +104,7 @@ declare module wdFrp {
|
||||
}
|
||||
}
|
||||
|
||||
declare var global: any, window: Window;
|
||||
declare var global:NodeJS.Global,window:Window;
|
||||
declare module wdFrp {
|
||||
var root: any;
|
||||
}
|
||||
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// Type definitions for xdg-basedir 2.0
|
||||
// Project: https://github.com/sindresorhus/xdg-basedir
|
||||
// Definitions by: Tomek Łaziuk <https://github.com/tlaziuk>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export const data: string | null;
|
||||
export const config: string | null;
|
||||
export const cache: string | null;
|
||||
export const runtime: string | null;
|
||||
export const dataDirs: string[];
|
||||
export const configDirs: string[];
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"xdg-basedir-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
@@ -0,0 +1,3 @@
|
||||
import * as xdg from 'xdg-basedir';
|
||||
|
||||
console.log(JSON.stringify(xdg, undefined, 2));
|
||||
Vendored
+1
-1
@@ -143,7 +143,7 @@ export interface IUtils {
|
||||
range?: any;
|
||||
header?: "A"|number|string[];
|
||||
}):T[];
|
||||
sheet_to_csv(worksheet: IWorkSheet):any;
|
||||
sheet_to_csv(worksheet: IWorkSheet, options?: { FS: string, RS: string }): string;
|
||||
sheet_to_formulae(worksheet: IWorkSheet):any;
|
||||
encode_cell(cell: ICell): any;
|
||||
encode_range(s: ICell, e: ICell): any;
|
||||
|
||||
Reference in New Issue
Block a user