mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Merge remote-tracking branch 'refs/remotes/DefinitelyTyped/master' into UpperCasePropertyName
This commit is contained in:
Vendored
+5
-1
@@ -11,7 +11,7 @@ interface JQuery {
|
||||
daterangepicker(settings?: daterangepicker.Settings, callback?: (start?: string | Date | moment.Moment, end?: string | Date | moment.Moment, label?: string) => any): JQuery;
|
||||
}
|
||||
|
||||
declare module daterangepicker {
|
||||
declare namespace daterangepicker {
|
||||
|
||||
interface DatepickerEventObject extends JQueryEventObject {
|
||||
date: Date;
|
||||
@@ -164,3 +164,7 @@ declare module daterangepicker {
|
||||
monthNames?: string[];
|
||||
}
|
||||
}
|
||||
|
||||
declare module "daterangepicker" {
|
||||
export = daterangepicker;
|
||||
}
|
||||
|
||||
Vendored
+1
@@ -1456,6 +1456,7 @@ declare namespace PIXI {
|
||||
global: Point;
|
||||
target: DisplayObject;
|
||||
originalEvent: Event;
|
||||
identifier: number;
|
||||
|
||||
getLocalPosition(displayObject: DisplayObject, point?: Point, globalPos?: Point): Point;
|
||||
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
/// <reference path="./set-cookie-parser.d.ts" />
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
import assert = require("assert");
|
||||
import http = require("http");
|
||||
import setCookie = require("set-cookie-parser");
|
||||
import * as assert from "assert";
|
||||
import * as http from "http";
|
||||
import * as setCookie from "set-cookie-parser";
|
||||
|
||||
// Call parse function on imported object
|
||||
var input = "foo=bar;";
|
||||
var cookies = setCookie.parse(input);
|
||||
assert.equal(cookies.length, 1);
|
||||
assert.equal(cookies[0].name, "foo");
|
||||
assert.equal(cookies[0].value, "bar");
|
||||
|
||||
// Required properties only test
|
||||
var requiredOnly = "foo=bar;";
|
||||
var cookies = setCookie(requiredOnly);
|
||||
cookies = setCookie(requiredOnly);
|
||||
assert.equal(cookies.length, 1);
|
||||
assert.equal(cookies[0].name, "foo");
|
||||
assert.equal(cookies[0].value, "bar");
|
||||
@@ -43,3 +50,21 @@ assert.equal(cookies[0].name, "bam");
|
||||
assert.equal(cookies[0].value, "baz");
|
||||
assert.equal(cookies[1].name, "foo");
|
||||
assert.equal(cookies[1].value, "bar");
|
||||
|
||||
// Create new cookie with only required properties
|
||||
var requiredOnlyCookie: setCookie.Cookie = {
|
||||
name: "Foo",
|
||||
value: "Bar"
|
||||
}
|
||||
|
||||
// Create new cookie with all properties included optional ones
|
||||
var optionalIncludedCookie: setCookie.Cookie = {
|
||||
name: "Bam",
|
||||
value: "Baz",
|
||||
domain: ".example.com",
|
||||
path: "/",
|
||||
expires: new Date("Tue Jul 01 2025 06:01:11 GMT-0400 (EDT)"),
|
||||
maxAge: 1000,
|
||||
httpOnly: true,
|
||||
secure: true
|
||||
};
|
||||
|
||||
+17
-15
@@ -6,22 +6,24 @@
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "set-cookie-parser" {
|
||||
import http = require("http");
|
||||
import http = require("http");
|
||||
|
||||
function SetCookieParser(input: string | string[] | http.IncomingMessage): SetCookieParser.Cookie[];
|
||||
function SetCookieParser(input: string | string[] | http.IncomingMessage): SetCookieParser.Cookie[];
|
||||
|
||||
namespace SetCookieParser {
|
||||
interface Cookie {
|
||||
name: string;
|
||||
value: string;
|
||||
path?: string;
|
||||
expires?: Date;
|
||||
maxAge?: number;
|
||||
domain?: string;
|
||||
secure?: boolean;
|
||||
httpOnly?: boolean;
|
||||
}
|
||||
}
|
||||
namespace SetCookieParser {
|
||||
function parse(input: string | string[] | http.IncomingMessage): Cookie[];
|
||||
|
||||
export = SetCookieParser;
|
||||
interface Cookie {
|
||||
name: string;
|
||||
value: string;
|
||||
path?: string;
|
||||
expires?: Date;
|
||||
maxAge?: number;
|
||||
domain?: string;
|
||||
secure?: boolean;
|
||||
httpOnly?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export = SetCookieParser;
|
||||
}
|
||||
|
||||
Vendored
+10
-2
@@ -1,4 +1,4 @@
|
||||
// Type definitions for TypeScript-STL v1.0.0
|
||||
// Type definitions for TypeScript-STL v1.0.1
|
||||
// Project: https://github.com/samchon/typescript-stl
|
||||
// Definitions by: Jeongho Nam <http://samchon.org>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -7097,6 +7097,14 @@ declare namespace std {
|
||||
* shall be a function pointer or a function object.
|
||||
*/
|
||||
sort(compare: (left: T, right: T) => boolean): void;
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
private qsort(first, last, compare);
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
private partition(first, last, compare);
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
@@ -9217,7 +9225,7 @@ declare namespace std {
|
||||
*/
|
||||
erase(first: VectorReverseIterator<T>, last: VectorReverseIterator<T>): VectorReverseIterator<T>;
|
||||
/**
|
||||
* @hiddde
|
||||
* @hidden
|
||||
*/
|
||||
protected erase_by_range(first: VectorIterator<T>, last: VectorIterator<T>): VectorIterator<T>;
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,7 @@ function test_HeadersCopiedFromHeaders() {
|
||||
}
|
||||
|
||||
function test_HeadersCopiedFromHash() {
|
||||
var source:HeadersMap = {
|
||||
var source: DOMStringMap = {
|
||||
'Content-Type': 'application/json'
|
||||
};
|
||||
return new Headers(source);
|
||||
|
||||
Vendored
+96
-85
@@ -1,98 +1,109 @@
|
||||
// Type definitions for fetch API
|
||||
// Type definitions for Fetch API
|
||||
// Project: https://github.com/github/fetch
|
||||
// Definitions by: Ryan Graham <https://github.com/ryan-codingintrigue>
|
||||
// Definitions by: Ryan Graham <https://github.com/ryan-codingintrigue>, Kagami Sascha Rosylight <https://github.com/saschanaz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare class Request extends Body {
|
||||
constructor(input: string|Request, init?:RequestInit);
|
||||
method: string;
|
||||
url: string;
|
||||
headers: Headers;
|
||||
context: RequestContext;
|
||||
referrer: string;
|
||||
mode: RequestMode;
|
||||
redirect: RequestRedirect;
|
||||
credentials: RequestCredentials;
|
||||
cache: RequestCache;
|
||||
}
|
||||
|
||||
interface RequestInit {
|
||||
method?: string;
|
||||
headers?: HeaderInit|{ [index: string]: string };
|
||||
body?: BodyInit;
|
||||
mode?: RequestMode;
|
||||
redirect?: RequestRedirect;
|
||||
credentials?: RequestCredentials;
|
||||
cache?: RequestCache;
|
||||
}
|
||||
|
||||
type RequestContext =
|
||||
"audio" | "beacon" | "cspreport" | "download" | "embed" |
|
||||
"eventsource" | "favicon" | "fetch" | "font" | "form" | "frame" |
|
||||
"hyperlink" | "iframe" | "image" | "imageset" | "import" |
|
||||
"internal" | "location" | "manifest" | "object" | "ping" | "plugin" |
|
||||
"prefetch" | "script" | "serviceworker" | "sharedworker" |
|
||||
"subresource" | "style" | "track" | "video" | "worker" |
|
||||
"xmlhttprequest" | "xslt";
|
||||
type RequestMode = "same-origin" | "no-cors" | "cors";
|
||||
type RequestRedirect = "follow" | "error" | "manual";
|
||||
type RequestCredentials = "omit" | "same-origin" | "include";
|
||||
type RequestCache =
|
||||
"default" | "no-store" | "reload" | "no-cache" |
|
||||
"force-cache" | "only-if-cached";
|
||||
|
||||
declare interface HeadersMap {
|
||||
[index: string]: string;
|
||||
interface Window {
|
||||
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
|
||||
}
|
||||
declare var fetch: typeof window.fetch;
|
||||
|
||||
declare type HeadersInit = Headers | string[][] | { [key: string]: string };
|
||||
declare class Headers {
|
||||
constructor(headers?:Headers|HeadersMap)
|
||||
append(name: string, value: string): void;
|
||||
delete(name: string):void;
|
||||
get(name: string): string;
|
||||
getAll(name: string): Array<string>;
|
||||
has(name: string): boolean;
|
||||
set(name: string, value: string): void;
|
||||
forEach(callback: (value: string, name: string) => void): void;
|
||||
constructor(init?: HeadersInit);
|
||||
|
||||
append(name: string, value: string): void;
|
||||
delete(name: string): void;
|
||||
get(name: string): string; // | null; (TS 2.0 strict null check)
|
||||
has(name: string): boolean;
|
||||
set(name: string, value: string): void;
|
||||
|
||||
// WebIDL pair iterator: iterable<ByteString, ByteString>
|
||||
entries(): IterableIterator<[string, string]>;
|
||||
forEach(callback: (value: string, index: number, headers: Headers) => void, thisArg?: any): void;
|
||||
keys(): IterableIterator<string>;
|
||||
values(): IterableIterator<string>;
|
||||
[Symbol.iterator](): IterableIterator<[string, string]>;
|
||||
}
|
||||
|
||||
declare class Body {
|
||||
bodyUsed: boolean;
|
||||
arrayBuffer(): Promise<ArrayBuffer>;
|
||||
blob(): Promise<Blob>;
|
||||
formData(): Promise<FormData>;
|
||||
json(): Promise<any>;
|
||||
json<T>(): Promise<T>;
|
||||
text(): Promise<string>;
|
||||
declare type BodyInit = Blob | ArrayBufferView | ArrayBuffer | FormData /* | URLSearchParams */ | string;
|
||||
interface Body {
|
||||
bodyUsed: boolean;
|
||||
arrayBuffer(): Promise<ArrayBuffer>;
|
||||
blob(): Promise<Blob>;
|
||||
formData(): Promise<FormData>;
|
||||
json(): Promise<any>;
|
||||
text(): Promise<string>;
|
||||
}
|
||||
|
||||
declare class Response extends Body {
|
||||
constructor(body?: BodyInit, init?: ResponseInit);
|
||||
static error(): Response;
|
||||
static redirect(url: string, status: number): Response;
|
||||
type: ResponseType;
|
||||
url: string;
|
||||
status: number;
|
||||
ok: boolean;
|
||||
statusText: string;
|
||||
headers: Headers;
|
||||
clone(): Response;
|
||||
declare type RequestInfo = Request | string;
|
||||
interface Request extends Body {
|
||||
method: string;
|
||||
url: string;
|
||||
headers: Headers;
|
||||
|
||||
type: RequestType
|
||||
destination: RequestDestination;
|
||||
referrer: string;
|
||||
referrerPolicy: ReferrerPolicy;
|
||||
mode: RequestMode;
|
||||
credentials: RequestCredentials;
|
||||
cache: RequestCache;
|
||||
redirect: RequestRedirect;
|
||||
integrity: string;
|
||||
|
||||
clone(): Request;
|
||||
}
|
||||
interface RequestInit {
|
||||
method?: string;
|
||||
headers?: HeadersInit;
|
||||
body?: BodyInit;
|
||||
referrer?: string;
|
||||
referrerPolicy?: ReferrerPolicy;
|
||||
mode?: RequestMode;
|
||||
credentials?: RequestCredentials;
|
||||
cache?: RequestCache;
|
||||
redirect?: RequestRedirect;
|
||||
integrity?: string;
|
||||
window?: any;
|
||||
}
|
||||
interface RequestConstructor {
|
||||
new (input: RequestInfo, init?: RequestInit): Request;
|
||||
}
|
||||
declare var Request: RequestConstructor;
|
||||
|
||||
type RequestType = "" | "audio" | "font" | "image" | "script" | "style" | "track" | "video";
|
||||
type RequestDestination = "" | "document" | "embed" | "font" | "image" | "manifest" | "media" | "object" | "report" | "script" | "serviceworker" | "sharedworker" | "style" | "worker" | "xslt";
|
||||
type RequestMode = "navigate" | "same-origin" | "no-cors" | "cors";
|
||||
type RequestCredentials = "omit" | "same-origin" | "include";
|
||||
type RequestCache = "default" | "no-store" | "reload" | "no-cache" | "force-cache" | "only-if-cached";
|
||||
type RequestRedirect = "follow" | "error" | "manual";
|
||||
type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "same-origin" | "origin" | "strict-origin" | "origin-when-cross-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
|
||||
|
||||
interface Response extends Body {
|
||||
type: ResponseType;
|
||||
url: string;
|
||||
redirected: boolean;
|
||||
status: number;
|
||||
ok: boolean;
|
||||
statusText: string;
|
||||
headers: Headers;
|
||||
body: any /*ReadableStream | null*/;
|
||||
trailer: Promise<Headers>;
|
||||
|
||||
clone(): Response;
|
||||
}
|
||||
interface ResponseInit {
|
||||
status?: number;
|
||||
statusText?: string;
|
||||
headers?: HeadersInit;
|
||||
}
|
||||
interface ResponseConstructor {
|
||||
new (body?: BodyInit, init?: ResponseInit): Response;
|
||||
|
||||
error(): Response;
|
||||
redirect(url: string, status?: number): Response;
|
||||
}
|
||||
declare var Response: ResponseConstructor;
|
||||
|
||||
type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
|
||||
|
||||
interface ResponseInit {
|
||||
status: number;
|
||||
statusText?: string;
|
||||
headers?: HeaderInit;
|
||||
}
|
||||
|
||||
declare type HeaderInit = Headers|Array<string>;
|
||||
declare type BodyInit = ArrayBuffer|ArrayBufferView|Blob|FormData|string;
|
||||
declare type RequestInfo = Request|string;
|
||||
|
||||
interface Window {
|
||||
fetch(url: string|Request, init?: RequestInit): Promise<Response>;
|
||||
}
|
||||
|
||||
declare var fetch: typeof window.fetch;
|
||||
|
||||
Reference in New Issue
Block a user