mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-22 11:40:10 +08:00
Merge branch 'master' of https://github.com/DefinitelyTyped/DefinitelyTyped into matter-update
This commit is contained in:
+11
-2
@@ -63,7 +63,10 @@ declare module angular.material {
|
||||
interface IDialogOptions {
|
||||
templateUrl?: string;
|
||||
template?: string;
|
||||
autoWrap?: boolean; // default: true
|
||||
targetEvent?: MouseEvent;
|
||||
openFrom?: any;
|
||||
closeTo?: any;
|
||||
scope?: angular.IScope; // default: new child scope
|
||||
preserveScope?: boolean; // default: false
|
||||
disableParentScroll?: boolean; // default: true
|
||||
@@ -77,8 +80,10 @@ declare module angular.material {
|
||||
resolve?: {[index: string]: angular.IPromise<any>}
|
||||
controllerAs?: string;
|
||||
parent?: string|Element|JQuery; // default: root node
|
||||
fullscreen?: boolean;
|
||||
onShowing?: Function;
|
||||
onComplete?: Function;
|
||||
onRemoving?: Function;
|
||||
fullscreen?: boolean;
|
||||
}
|
||||
|
||||
interface IDialogService {
|
||||
@@ -224,7 +229,7 @@ declare module angular.material {
|
||||
setDefaultTheme(theme: string): void;
|
||||
alwaysWatchTheme(alwaysWatch: boolean): void;
|
||||
}
|
||||
|
||||
|
||||
interface IDateLocaleProvider {
|
||||
months: string[];
|
||||
shortMonths: string[];
|
||||
@@ -239,4 +244,8 @@ declare module angular.material {
|
||||
msgCalendar: string;
|
||||
msgOpenCalendar: string;
|
||||
}
|
||||
|
||||
interface IMenuService {
|
||||
hide(response?: any, options?: any): angular.IPromise<any>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/// <reference path="auth0-angular.d.ts" />
|
||||
|
||||
var authProvider: auth0.angular.IAuth0ServiceProvider;
|
||||
|
||||
// Initialize Auth0
|
||||
authProvider.init({
|
||||
clientID: 'myClientID',
|
||||
domain: 'mydomain.auth0.com'
|
||||
});
|
||||
|
||||
// Listen for authenticated event
|
||||
authProvider.on('authenticated', ($location: any) => {
|
||||
});
|
||||
|
||||
|
||||
var authService: auth0.angular.IAuth0Service;
|
||||
|
||||
// Sign in to Auth0
|
||||
authService.signin({}, (profile: string, idToken: string, acccessToken: string, state: string, refreshToken: string) => {
|
||||
}, (err) => {
|
||||
});
|
||||
|
||||
// Sign out of Auth0
|
||||
authService.signout();
|
||||
Vendored
+167
@@ -0,0 +1,167 @@
|
||||
// Type definitions for auth0-angular
|
||||
// Project: https://github.com/auth0/auth0-angular
|
||||
// Definitions by: Matt Emory <https://github.com/homesar>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module auth0.angular {
|
||||
|
||||
interface IAuth0ClientOptions {
|
||||
/**
|
||||
* Login url if you're using ngRoute
|
||||
*/
|
||||
loginUrl?: string;
|
||||
|
||||
/**
|
||||
* Login state if you're using ui-router
|
||||
*/
|
||||
loginState?: string;
|
||||
|
||||
/**
|
||||
* Client identifier of your Auth0 application
|
||||
*/
|
||||
clientID: string;
|
||||
|
||||
/**
|
||||
* Domain of your Auth0 account
|
||||
*/
|
||||
domain: string;
|
||||
|
||||
/**
|
||||
* Use single signon
|
||||
*/
|
||||
sso?: boolean;
|
||||
}
|
||||
|
||||
interface ITokenOptions {
|
||||
|
||||
targetClientId?: string;
|
||||
api?: string;
|
||||
}
|
||||
|
||||
interface IAuth0Options {
|
||||
/**
|
||||
* Connection name
|
||||
*/
|
||||
connection?: string;
|
||||
|
||||
/**
|
||||
* Username
|
||||
*/
|
||||
username?: string;
|
||||
|
||||
/**
|
||||
* Email address
|
||||
*/
|
||||
email?: string;
|
||||
}
|
||||
|
||||
interface ISuccessCallback {
|
||||
(profile?: string, idToken?: string, accessToken?: string, state?: string, refreshToken?: string): void;
|
||||
}
|
||||
|
||||
interface IErrorCallback {
|
||||
(error: any): void;
|
||||
}
|
||||
|
||||
interface IAuth0Service {
|
||||
/**
|
||||
* Hooks to internal Angular events so that a user will be redirected to the login page if trying to visit a restricted resource
|
||||
*/
|
||||
hookEvents(): void;
|
||||
|
||||
/**
|
||||
* Performs a token delegation request exchanging th ecurrent token for another one.
|
||||
* @param options Token options
|
||||
*/
|
||||
getToken(options?: ITokenOptions): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Refreshes the Id token
|
||||
* @param refreshToken Refresh token to use when renewing
|
||||
*/
|
||||
refreshIdToken(refreshToken: string): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Renews the Id Token with the same scopes as the original token
|
||||
* @param id_token Id Token
|
||||
*/
|
||||
renewIdToken(id_token: string): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Logs in a user, returning tokens and profile information
|
||||
* @param options Options to bypass displaying the Lock UI
|
||||
* @param successCallback Callback on successful login
|
||||
* @param errorCallback Callback on failed login
|
||||
*/
|
||||
signin(options?: IAuth0Options, successCallback?: ISuccessCallback, errorCallback?: IErrorCallback): void;
|
||||
|
||||
/**
|
||||
* Displays Lock in signup mode, and logs the user in immediately after a successful signup.
|
||||
* @param options Options to bypass displaying the Lock UI
|
||||
* @param successCallback Callback on successful signup
|
||||
* @param errorCallback Callback on failed signup
|
||||
*/
|
||||
signup(options?: IAuth0Options, successCallback?: ISuccessCallback, errorCallback?: IErrorCallback): void;
|
||||
|
||||
/**
|
||||
* Performs the "forgot your password" flow.
|
||||
* @param options Options to bypass displaying the Lock UI
|
||||
* @param successCallback Callback on successful reset
|
||||
* @param errorCallback Callback on failed reset
|
||||
*/
|
||||
reset(options?: IAuth0Options, successCallback?: ISuccessCallback, errorCallback?: IErrorCallback): void;
|
||||
|
||||
/**
|
||||
* Validates the user
|
||||
* @param options Options to bypass displaying the Lock UI
|
||||
* @param successCallback Callback on successful validation
|
||||
* @param errorCallback Callback on failed validation
|
||||
*/
|
||||
validateUser(options: IAuth0Options, successCallback?: ISuccessCallback, errorCallback?: IErrorCallback): void;
|
||||
|
||||
/**
|
||||
* Logs the user out locally by deleting their token from local storage.
|
||||
*/
|
||||
signout(): void;
|
||||
|
||||
/**
|
||||
* Reauthenticates the user by using a stored profile and token without going through the login flow.
|
||||
* @param profile Profile of the user
|
||||
* @param idToken Id token
|
||||
* @param accessToken Access token
|
||||
* @param state State
|
||||
* @param refreshToken Flag to indicate refreshing the token
|
||||
*/
|
||||
authenticate(profile?: any, idToken?: string, accessToken?: string, state?: any, refreshToken?: boolean): ng.IPromise<any>;
|
||||
|
||||
/**
|
||||
* Gets the user's profile
|
||||
* @param idToken Id token
|
||||
*/
|
||||
getProfile(idToken?: string): ng.IPromise<any>;
|
||||
|
||||
// Properties
|
||||
|
||||
accessToken: string;
|
||||
idToken: string;
|
||||
profile: any;
|
||||
isAuthenticated: boolean;
|
||||
config: any;
|
||||
}
|
||||
|
||||
interface IAuth0ServiceProvider {
|
||||
/**
|
||||
* Configures the auth service
|
||||
* @param options Client options passed into Auth0
|
||||
*/
|
||||
init(options: IAuth0ClientOptions): void;
|
||||
|
||||
/**
|
||||
* @param event Name of the event to handle.
|
||||
* @param handler Event handler
|
||||
*/
|
||||
on(event: string, handler: (...args: any[]) => any): void;
|
||||
}
|
||||
}
|
||||
@@ -78,6 +78,8 @@ evt.on("init", function () {
|
||||
|
||||
browserSync(config);
|
||||
|
||||
var has = browserSync.has("My server");
|
||||
|
||||
var bs = browserSync.create();
|
||||
|
||||
bs.init({
|
||||
@@ -85,7 +87,7 @@ bs.init({
|
||||
});
|
||||
|
||||
bs.reload();
|
||||
|
||||
|
||||
function browserSyncInit(): browserSync.BrowserSyncInstance {
|
||||
var browser = browserSync.create();
|
||||
browser.init();
|
||||
@@ -95,3 +97,26 @@ function browserSyncInit(): browserSync.BrowserSyncInstance {
|
||||
}
|
||||
var browser = browserSyncInit();
|
||||
browser.exit();
|
||||
|
||||
// Stream method.
|
||||
|
||||
// -- No options.
|
||||
browser.stream();
|
||||
|
||||
// -- "once" option.
|
||||
browser.stream({once: true});
|
||||
|
||||
// -- "match" option (string).
|
||||
browser.stream({match: "**/*.js"});
|
||||
|
||||
// -- "match" option (RegExp).
|
||||
browser.stream({match: /\.js$/});
|
||||
|
||||
// -- "match" option (function).
|
||||
browser.stream({match: (testString) => true});
|
||||
|
||||
// -- "match" option (array).
|
||||
browser.stream({match: ["**/*.js", /\.js$/, (testString) => true]});
|
||||
|
||||
// -- Both options.
|
||||
browser.stream({once: true, match: ["**/*.js", /\.js$/, (testString) => true]});
|
||||
|
||||
Vendored
+39
-27
@@ -5,25 +5,27 @@
|
||||
|
||||
/// <reference path="../chokidar/chokidar.d.ts"/>
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
/// <reference path="../micromatch/micromatch.d.ts" />
|
||||
|
||||
declare module "browser-sync" {
|
||||
import chokidar = require("chokidar");
|
||||
import fs = require("fs");
|
||||
import http = require("http");
|
||||
import mm = require("micromatch");
|
||||
|
||||
namespace browserSync {
|
||||
interface Options {
|
||||
/**
|
||||
* Browsersync includes a user-interface that is accessed via a separate port. The UI allows to controls
|
||||
* Browsersync includes a user-interface that is accessed via a separate port. The UI allows to controls
|
||||
* all devices, push sync updates and much more.
|
||||
*
|
||||
*
|
||||
* port - Default: 3001
|
||||
* weinre.port - Default: 8080
|
||||
* Note: requires at least version 2.0.0
|
||||
*/
|
||||
ui?: UIOptions;
|
||||
/**
|
||||
* Browsersync can watch your files as you work. Changes you make will either be injected into the page (CSS
|
||||
* Browsersync can watch your files as you work. Changes you make will either be injected into the page (CSS
|
||||
* & images) or will cause all browsers to do a full-page refresh. See anymatch for more information on glob
|
||||
* patterns.
|
||||
* Default: false
|
||||
@@ -55,14 +57,14 @@ declare module "browser-sync" {
|
||||
*/
|
||||
port?: number;
|
||||
/**
|
||||
* Add additional directories from which static files should be served.
|
||||
* Add additional directories from which static files should be served.
|
||||
* Should only be used in proxy or snippet mode.
|
||||
* Default: []
|
||||
* Note: requires at least version 2.8.0
|
||||
*/
|
||||
serveStatic?: string[];
|
||||
/**
|
||||
* Enable https for localhost development.
|
||||
* Enable https for localhost development.
|
||||
* Note - this is not needed for proxy option as it will be inferred from your target url.
|
||||
* Note: requires at least version 1.3.0
|
||||
*/
|
||||
@@ -102,7 +104,7 @@ declare module "browser-sync" {
|
||||
*/
|
||||
logSnippet?: boolean;
|
||||
/**
|
||||
* You can control how the snippet is injected onto each page via a custom regex + function.
|
||||
* You can control how the snippet is injected onto each page via a custom regex + function.
|
||||
* You can also provide patterns for certain urls that should be ignored from the snippet injection.
|
||||
* Note: requires at least version 2.0.0
|
||||
*/
|
||||
@@ -119,13 +121,13 @@ declare module "browser-sync" {
|
||||
*/
|
||||
tunnel?: string | boolean;
|
||||
/**
|
||||
* Some features of Browsersync (such as xip & tunnel) require an internet connection, but if you're
|
||||
* Some features of Browsersync (such as xip & tunnel) require an internet connection, but if you're
|
||||
* working offline, you can reduce start-up time by setting this option to false
|
||||
*/
|
||||
online?: boolean;
|
||||
/**
|
||||
* Default: true
|
||||
* Decide which URL to open automatically when Browsersync starts. Defaults to "local" if none set.
|
||||
* Decide which URL to open automatically when Browsersync starts. Defaults to "local" if none set.
|
||||
* Can be true, local, external, ui, ui-external, tunnel or false
|
||||
*/
|
||||
open?: string | boolean;
|
||||
@@ -135,7 +137,7 @@ declare module "browser-sync" {
|
||||
*/
|
||||
browser?: string | string[];
|
||||
/**
|
||||
* Requires an internet connection - useful for services such as Typekit as it allows you to configure
|
||||
* Requires an internet connection - useful for services such as Typekit as it allows you to configure
|
||||
* domains such as *.xip.io in your kit settings
|
||||
* Default: false
|
||||
*/
|
||||
@@ -154,14 +156,14 @@ declare module "browser-sync" {
|
||||
* scrollProportionally: false // Sync viewports to TOP position
|
||||
* Default: true
|
||||
*/
|
||||
scrollProportionally?: boolean
|
||||
scrollProportionally?: boolean;
|
||||
/**
|
||||
* How often to send scroll events
|
||||
* Default: 0
|
||||
*/
|
||||
scrollThrottle?: number;
|
||||
/**
|
||||
* Decide which technique should be used to restore scroll position following a reload.
|
||||
* Decide which technique should be used to restore scroll position following a reload.
|
||||
* Can be window.name or cookie
|
||||
* Default: 'window.name'
|
||||
*/
|
||||
@@ -175,13 +177,13 @@ declare module "browser-sync" {
|
||||
/**
|
||||
* Default: []
|
||||
* Note: requires at least version 2.9.0
|
||||
* Sync the scroll position of any element on the page - where any scrolled element will cause
|
||||
* all others to match scroll position. This is helpful when a breakpoint alters which element
|
||||
* Sync the scroll position of any element on the page - where any scrolled element will cause
|
||||
* all others to match scroll position. This is helpful when a breakpoint alters which element
|
||||
* is actually scrolling
|
||||
*/
|
||||
scrollElementMapping?: string[];
|
||||
/**
|
||||
* Time, in milliseconds, to wait before instructing the browser to reload/inject following a file
|
||||
* Time, in milliseconds, to wait before instructing the browser to reload/inject following a file
|
||||
* change event
|
||||
* Default: 0
|
||||
*/
|
||||
@@ -227,7 +229,7 @@ declare module "browser-sync" {
|
||||
*/
|
||||
timestamps?: boolean;
|
||||
/**
|
||||
* Alter the script path for complete control over where the Browsersync Javascript is served
|
||||
* Alter the script path for complete control over where the Browsersync Javascript is served
|
||||
* from. Whatever you return from this function will be used as the script path.
|
||||
* Note: requires at least version 1.5.0
|
||||
*/
|
||||
@@ -250,7 +252,7 @@ declare module "browser-sync" {
|
||||
[path: string]: T;
|
||||
}
|
||||
|
||||
interface UIOptions {
|
||||
interface UIOptions {
|
||||
/** set the default port */
|
||||
port?: number;
|
||||
/** set the default weinre port */
|
||||
@@ -266,9 +268,9 @@ declare module "browser-sync" {
|
||||
directory?: boolean;
|
||||
/** set index filename */
|
||||
index?: string;
|
||||
/**
|
||||
* key-value object hash, where the key is the url to match,
|
||||
* and the value is the folder to serve (relative to your working directory)
|
||||
/**
|
||||
* key-value object hash, where the key is the url to match,
|
||||
* and the value is the folder to serve (relative to your working directory)
|
||||
*/
|
||||
routes?: Hash<string>;
|
||||
/** configure custom middleware */
|
||||
@@ -312,9 +314,14 @@ declare module "browser-sync" {
|
||||
fn: (match: string) => string;
|
||||
}
|
||||
|
||||
interface StreamOptions {
|
||||
once?: boolean;
|
||||
match?: mm.Pattern | mm.Pattern[];
|
||||
}
|
||||
|
||||
interface BrowserSyncStatic extends BrowserSyncInstance {
|
||||
/**
|
||||
* Start the Browsersync service. This will launch a server, proxy or start the snippet mode
|
||||
* Start the Browsersync service. This will launch a server, proxy or start the snippet mode
|
||||
* depending on your use-case.
|
||||
*/
|
||||
(config?: Options, callback?: (err: Error, bs: Object) => any): BrowserSyncInstance;
|
||||
@@ -328,36 +335,41 @@ declare module "browser-sync" {
|
||||
* @param name the identifier used for retrieval
|
||||
*/
|
||||
get(name: string): BrowserSyncInstance;
|
||||
/**
|
||||
* Check if an instance has been created.
|
||||
* @param name the name of the instance
|
||||
*/
|
||||
has(name: string): boolean;
|
||||
}
|
||||
|
||||
interface BrowserSyncInstance {
|
||||
/** the name of this instance of browser-sync */
|
||||
name: string;
|
||||
/**
|
||||
* Start the Browsersync service. This will launch a server, proxy or start the snippet mode
|
||||
* Start the Browsersync service. This will launch a server, proxy or start the snippet mode
|
||||
* depending on your use-case.
|
||||
*/
|
||||
init(config?: Options, callback?: (err: Error, bs: Object) => any): BrowserSyncInstance;
|
||||
/**
|
||||
* Reload the browser
|
||||
* The reload method will inform all browsers about changed files and will either cause the browser
|
||||
* The reload method will inform all browsers about changed files and will either cause the browser
|
||||
* to refresh, or inject the files where possible.
|
||||
*/
|
||||
reload(): void;
|
||||
/**
|
||||
* Reload a single file
|
||||
* The reload method will inform all browsers about changed files and will either cause the browser
|
||||
* The reload method will inform all browsers about changed files and will either cause the browser
|
||||
* to refresh, or inject the files where possible.
|
||||
*/
|
||||
reload(file: string): void;
|
||||
/**
|
||||
* Reload multiple files
|
||||
* The reload method will inform all browsers about changed files and will either cause the browser
|
||||
* The reload method will inform all browsers about changed files and will either cause the browser
|
||||
* to refresh, or inject the files where possible.
|
||||
*/
|
||||
reload(files: string[]): void;
|
||||
/**
|
||||
* The reload method will inform all browsers about changed files and will either cause the browser
|
||||
* The reload method will inform all browsers about changed files and will either cause the browser
|
||||
* to refresh, or inject the files where possible.
|
||||
*/
|
||||
reload(options: { stream: boolean }): NodeJS.ReadWriteStream;
|
||||
@@ -365,7 +377,7 @@ declare module "browser-sync" {
|
||||
* The stream method returns a transform stream and can act once or on many files.
|
||||
* @param opts Configuration for the stream method
|
||||
*/
|
||||
stream(opts?: { once: boolean }): NodeJS.ReadWriteStream;
|
||||
stream(opts?: StreamOptions): NodeJS.ReadWriteStream;
|
||||
/**
|
||||
* Helper method for browser notifications
|
||||
* @param message Can be a simple message such as 'Connected' or HTML
|
||||
@@ -390,7 +402,7 @@ declare module "browser-sync" {
|
||||
*/
|
||||
resume(): void;
|
||||
/**
|
||||
* The internal Event Emitter used by the running Browsersync instance (if there is one). You can use
|
||||
* The internal Event Emitter used by the running Browsersync instance (if there is one). You can use
|
||||
* this to emit your own events, such as changed files, logging etc.
|
||||
*/
|
||||
emitter: NodeJS.EventEmitter;
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
///<reference path="callsite.d.ts" />
|
||||
|
||||
import callsite = require("callsite");
|
||||
|
||||
var stack = callsite();
|
||||
var p = stack[0];
|
||||
|
||||
console.log(p.getThis());
|
||||
console.log(p.getTypeName());
|
||||
console.log(p.getFunctionName());
|
||||
console.log(p.getMethodName());
|
||||
console.log(p.getFileName());
|
||||
console.log(p.getLineNumber());
|
||||
console.log(p.getColumnNumber());
|
||||
console.log(p.getFunction());
|
||||
console.log(p.getEvalOrigin());
|
||||
console.log(p.isNative());
|
||||
console.log(p.isToplevel());
|
||||
console.log(p.isEval());
|
||||
console.log(p.isConstructor());
|
||||
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
// Type definitions for callsite 1.0.0
|
||||
// Project: https://github.com/tj/callsite
|
||||
// Definitions by: newclear <https://github.com/newclear>
|
||||
// Definitions: https://github.com/newclear/DefinitelyTyped
|
||||
|
||||
declare module "callsite" {
|
||||
|
||||
module Callsite{
|
||||
|
||||
interface CallSite {
|
||||
getThis(): any;
|
||||
getTypeName(): string;
|
||||
getFunctionName(): string;
|
||||
getMethodName(): string;
|
||||
getFileName(): string;
|
||||
getLineNumber(): number;
|
||||
getColumnNumber(): number;
|
||||
getFunction(): Function;
|
||||
getEvalOrigin(): string;
|
||||
isNative(): boolean;
|
||||
isToplevel(): boolean;
|
||||
isEval(): boolean;
|
||||
isConstructor(): boolean;
|
||||
}
|
||||
}
|
||||
|
||||
function Callsite(): Callsite.CallSite[];
|
||||
|
||||
export = Callsite;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
/// <reference path="../jquery.dataTables/jquery.dataTables.d.ts" />
|
||||
/// <reference path="datatables-buttons.d.ts" />
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
var config: DataTables.Settings =
|
||||
{
|
||||
// Buttons extension options
|
||||
buttons: [
|
||||
{
|
||||
extend: 'excel',
|
||||
text: 'Excel',
|
||||
className: 'class',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
{
|
||||
action: function (e, dt, node, config) { },
|
||||
available: function (dt, config) { return true; },
|
||||
destroy: function (dt, node, config) { },
|
||||
enabled: true,
|
||||
init: function (dt, node, config) { },
|
||||
key: 'a',
|
||||
name: 'name',
|
||||
namespace: 'namespace',
|
||||
titleAttr: 'title',
|
||||
}
|
||||
],
|
||||
}
|
||||
|
||||
});
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
// Type definitions for JQuery DataTables Buttons extension 1.1.0
|
||||
// Project: http://datatables.net/extensions/buttons/
|
||||
// Definitions by: Sam Germano <https://github.com/SammyG4Free>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
/// <reference path="../jquery.dataTables/jquery.dataTables.d.ts"/>
|
||||
|
||||
declare module DataTables {
|
||||
export interface Settings {
|
||||
/**
|
||||
* Buttons extension options
|
||||
*/
|
||||
buttons?: boolean | string[] | ButtonSettings[];
|
||||
}
|
||||
|
||||
//#region "button-settings"
|
||||
|
||||
/**
|
||||
* Buttons extension options
|
||||
*/
|
||||
export interface ButtonSettings {
|
||||
/**
|
||||
* Action to take when the button is activated
|
||||
*/
|
||||
action?: FunctionButtonAction;
|
||||
|
||||
/**
|
||||
* Ensure that any requirements have been satisfied before initialising a button
|
||||
*/
|
||||
available?: FunctionButtonAvailable;
|
||||
|
||||
/**
|
||||
* Set the class name for the button
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* Function that is called when the button is destroyed
|
||||
*/
|
||||
destroy?: FunctionButtonInit;
|
||||
|
||||
/**
|
||||
* Set a button's initial enabled state
|
||||
*/
|
||||
enabled?: boolean;
|
||||
|
||||
/**
|
||||
* Define which button type the button should be based on
|
||||
*/
|
||||
extend?: string;
|
||||
|
||||
/**
|
||||
* Initialisation function that can be used to add events specific to this button
|
||||
*/
|
||||
init?: FunctionButtonInit;
|
||||
|
||||
/**
|
||||
* Define an activation key for a button
|
||||
*/
|
||||
key?: string | ButtonKey;
|
||||
|
||||
/**
|
||||
* Set a name for each selection
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* Unique namespace for every button
|
||||
*/
|
||||
namespace?: string;
|
||||
|
||||
/**
|
||||
* The text to show in the button
|
||||
*/
|
||||
text?: string | ButtonText;
|
||||
|
||||
/**
|
||||
* Button 'title' attribute text
|
||||
*/
|
||||
titleAttr?: string;
|
||||
|
||||
exportOptions?: ButtonExportOptions;
|
||||
autoPrint?: boolean;
|
||||
}
|
||||
|
||||
export interface FunctionButtonAvailable {
|
||||
(dt: DataTables.DataTable, config: any): boolean
|
||||
}
|
||||
export interface ButtonExportOptions {
|
||||
columns?: string;
|
||||
}
|
||||
|
||||
export interface ButtonKey {
|
||||
key?: string;
|
||||
shiftKey?: boolean;
|
||||
altKey?: boolean;
|
||||
ctrlKey?: boolean;
|
||||
metaKey?: boolean;
|
||||
}
|
||||
|
||||
export interface ButtonText {
|
||||
(dt: DataTables.DataTable, node: JQuery, config: any): string
|
||||
}
|
||||
export interface FunctionButtonInit {
|
||||
(dt: DataTables.DataTable, node: JQuery, config: any): void
|
||||
}
|
||||
// api object?
|
||||
export interface FunctionButtonAction {
|
||||
(e: any, dt: DataTables.DataTable, node: JQuery, config: any): void
|
||||
}
|
||||
//#endregion "button-settings
|
||||
}
|
||||
@@ -166,6 +166,10 @@ var dockMenu = Menu.buildFromTemplate([
|
||||
},
|
||||
]);
|
||||
app.dock.setMenu(dockMenu);
|
||||
app.dock.setBadge('foo');
|
||||
var id = app.dock.bounce('informational');
|
||||
app.dock.cancelBounce(id);
|
||||
app.dock.setIcon('/path/to/icon.png');
|
||||
|
||||
app.setUserTasks([
|
||||
<Electron.Task>{
|
||||
|
||||
Vendored
+61
-53
@@ -1048,7 +1048,7 @@ declare module Electron {
|
||||
* Note: This API is only available on Windows.
|
||||
*/
|
||||
setUserTasks(tasks: Task[]): void;
|
||||
dock: BrowserWindow;
|
||||
dock: Dock;
|
||||
commandLine: CommandLine;
|
||||
/**
|
||||
* This method makes your application a Single Instance Application instead of allowing
|
||||
@@ -1075,6 +1075,64 @@ declare module Electron {
|
||||
appendArgument(value: any): void;
|
||||
}
|
||||
|
||||
interface Dock {
|
||||
/**
|
||||
* When critical is passed, the dock icon will bounce until either the
|
||||
* application becomes active or the request is canceled.
|
||||
*
|
||||
* When informational is passed, the dock icon will bounce for one second.
|
||||
* The request, though, remains active until either the application becomes
|
||||
* active or the request is canceled.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
* @param type Can be critical or informational, the default is informational.
|
||||
* @returns An ID representing the request
|
||||
*/
|
||||
bounce(type?: string): number;
|
||||
/**
|
||||
* Cancel the bounce of id.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
*/
|
||||
cancelBounce(id: number): void;
|
||||
/**
|
||||
* Sets the string to be displayed in the dock’s badging area.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
*/
|
||||
setBadge(text: string): void;
|
||||
/**
|
||||
* Returns the badge string of the dock.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
*/
|
||||
getBadge(): string;
|
||||
/**
|
||||
* Hides the dock icon.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
*/
|
||||
hide(): void;
|
||||
/**
|
||||
* Shows the dock icon.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
*/
|
||||
show(): void;
|
||||
/**
|
||||
* Sets the application dock menu.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
*/
|
||||
setMenu(menu: Menu): void;
|
||||
/**
|
||||
* Sets the image associated with this dock icon.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
*/
|
||||
setIcon(icon: NativeImage | string): void;
|
||||
}
|
||||
|
||||
interface Task {
|
||||
/**
|
||||
* Path of the program to execute, usually you should specify process.execPath
|
||||
@@ -1106,57 +1164,7 @@ declare module Electron {
|
||||
*/
|
||||
iconIndex?: number;
|
||||
commandLine?: CommandLine;
|
||||
dock?: {
|
||||
/**
|
||||
* When critical is passed, the dock icon will bounce until either the
|
||||
* application becomes active or the request is canceled.
|
||||
*
|
||||
* When informational is passed, the dock icon will bounce for one second.
|
||||
* The request, though, remains active until either the application becomes
|
||||
* active or the request is canceled.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
* @param type Can be critical or informational, the default is informational.
|
||||
* @returns An ID representing the request
|
||||
*/
|
||||
bounce(type?: string): any;
|
||||
/**
|
||||
* Cancel the bounce of id.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
*/
|
||||
cancelBounce(id: number): void;
|
||||
/**
|
||||
* Sets the string to be displayed in the dock’s badging area.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
*/
|
||||
setBadge(text: string): void;
|
||||
/**
|
||||
* Returns the badge string of the dock.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
*/
|
||||
getBadge(): string;
|
||||
/**
|
||||
* Hides the dock icon.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
*/
|
||||
hide(): void;
|
||||
/**
|
||||
* Shows the dock icon.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
*/
|
||||
show(): void;
|
||||
/**
|
||||
* Sets the application dock menu.
|
||||
*
|
||||
* Note: This API is only available on Mac.
|
||||
*/
|
||||
setMenu(menu: Menu): void;
|
||||
};
|
||||
dock?: Dock;
|
||||
}
|
||||
|
||||
class AutoUpdater implements NodeJS.EventEmitter {
|
||||
@@ -1225,7 +1233,7 @@ declare module Electron {
|
||||
filters?: {
|
||||
name: string;
|
||||
extensions: string[];
|
||||
}[]
|
||||
}[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
///<reference path="js-schema.d.ts" />
|
||||
|
||||
import {default as schema} from 'js-schema';
|
||||
|
||||
var Duck = schema({ // A duck
|
||||
swim : Function, // - can swim
|
||||
quack : Function, // - can quack
|
||||
age : Number.min(0).max(5), // - is 0 to 5 years old
|
||||
color : ['yellow', 'brown'] // - has either yellow or brown color
|
||||
});
|
||||
|
||||
// Some animals
|
||||
var myDuck = { swim : function() {}, quack : function() {}, age : 2, color : 'yellow' },
|
||||
myCat = { walk : function() {}, purr : function() {}, age : 3, color : 'black' },
|
||||
animals = [ myDuck, myCat, {}, /*...*/ ];
|
||||
|
||||
// Simple checks
|
||||
console.log( Duck(myDuck) ); // true
|
||||
console.log( Duck(myCat) ); // false
|
||||
Vendored
+50
@@ -0,0 +1,50 @@
|
||||
// Type definitions for js-schema
|
||||
// Project: https://github.com/molnarg/js-schema
|
||||
// Definitions by: Marcin Porebski <https://github.com/marcinporebski>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
declare module 'js-schema'
|
||||
{
|
||||
export interface Schema
|
||||
{
|
||||
(obj: any): boolean; // test obj against the schema
|
||||
}
|
||||
|
||||
export default function schema(definition: any): Schema
|
||||
}
|
||||
|
||||
interface NumberConstructor
|
||||
{
|
||||
min(n: number): NumberConstructor;
|
||||
max(n: number): NumberConstructor;
|
||||
below(n: number): NumberConstructor;
|
||||
above(n: number): NumberConstructor;
|
||||
step(n: number): NumberConstructor;
|
||||
}
|
||||
|
||||
interface StringConstructor
|
||||
{
|
||||
of(charset: string): StringConstructor;
|
||||
of(length: number, charset: string): StringConstructor;
|
||||
of(minLength: number, maxLength: number, charset: string): StringConstructor;
|
||||
}
|
||||
|
||||
interface ArrayConstructor
|
||||
{
|
||||
like(arr: Array<any>): ArrayConstructor;
|
||||
of(pattern: any): ArrayConstructor;
|
||||
of(length: number, pattern: any): ArrayConstructor;
|
||||
of(minLength: number, maxLength: number, pattern: any): ArrayConstructor;
|
||||
}
|
||||
|
||||
interface ObjectConstructor
|
||||
{
|
||||
like(obj: any): ObjectConstructor;
|
||||
reference(obj: any): ObjectConstructor;
|
||||
}
|
||||
|
||||
interface FunctionConstructor
|
||||
{
|
||||
reference(func: Function): FunctionConstructor;
|
||||
}
|
||||
@@ -3,12 +3,31 @@
|
||||
import yaml = require('js-yaml');
|
||||
import LoadOptions = yaml.LoadOptions;
|
||||
import DumpOptions = yaml.DumpOptions;
|
||||
import TypeConstructorOptions = yaml.TypeConstructorOptions;
|
||||
import SchemaDefinition = yaml.SchemaDefinition;
|
||||
|
||||
var bool: boolean;
|
||||
var num: number;
|
||||
var str: string;
|
||||
var obj: Object;
|
||||
var value: any;
|
||||
var array: any[];
|
||||
var fn: Function;
|
||||
var schemaDefinition: SchemaDefinition = {
|
||||
implicit: array,
|
||||
explicit: array,
|
||||
include: array
|
||||
};
|
||||
var typeConstructorOptions: TypeConstructorOptions = {
|
||||
kind: str,
|
||||
resolve: fn,
|
||||
construct: fn,
|
||||
instanceOf: obj,
|
||||
predicate: str,
|
||||
represent: fn,
|
||||
defaultStyle: str,
|
||||
styleAliases: obj
|
||||
};
|
||||
|
||||
var loadOpts: LoadOptions;
|
||||
var dumpOpts: DumpOptions;
|
||||
@@ -20,6 +39,8 @@ yaml.JSON_SCHEMA;
|
||||
yaml.CORE_SCHEMA;
|
||||
yaml.DEFAULT_SAFE_SCHEMA;
|
||||
yaml.DEFAULT_FULL_SCHEMA;
|
||||
yaml.MINIMAL_SCHEMA;
|
||||
yaml.SAFE_SCHEMA;
|
||||
|
||||
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
|
||||
@@ -82,3 +103,7 @@ value = yaml.safeDump(str, dumpOpts);
|
||||
|
||||
value = yaml.dump(str);
|
||||
value = yaml.dump(str, dumpOpts);
|
||||
|
||||
value = new yaml.YAMLException();
|
||||
value = new yaml.Type(str, typeConstructorOptions);
|
||||
value = yaml.Schema.create([schemaDefinition]);
|
||||
|
||||
Vendored
+38
-5
@@ -1,17 +1,26 @@
|
||||
// Type definitions for js-yaml 3.0.2
|
||||
// Type definitions for js-yaml 3.5.2
|
||||
// Project: https://github.com/nodeca/js-yaml
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Sebastian Clausen <https://github.com/sclausen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module jsyaml {
|
||||
export function safeLoad(str: string, opts?: LoadOptions): any;
|
||||
export function load(str: string, opts?: LoadOptions): any;
|
||||
|
||||
export class Type implements TypeConstructorOptions {
|
||||
constructor(tag: string, opts?: TypeConstructorOptions);
|
||||
tag: string;
|
||||
}
|
||||
export class Schema {
|
||||
constructor(definition: SchemaDefinition);
|
||||
public static create(args: any[]): Schema;
|
||||
}
|
||||
|
||||
export function safeLoadAll(str: string, iterator: (doc: any) => void, opts?: LoadOptions): any;
|
||||
export function loadAll(str: string, iterator: (doc: any) => void, opts?: LoadOptions): any;
|
||||
|
||||
export function safeDump(obj: any, opts?: DumpOptions): string;
|
||||
export function dump(obj: any, opts?: DumpOptions): string
|
||||
export function dump(obj: any, opts?: DumpOptions): string;
|
||||
|
||||
export interface LoadOptions {
|
||||
// string to be used as a file path in error/warning messages.
|
||||
@@ -29,12 +38,29 @@ declare module jsyaml {
|
||||
skipInvalid?: boolean;
|
||||
// specifies level of nesting, when to switch from block to flow style for collections. -1 means block style everwhere
|
||||
flowLevel?: number;
|
||||
// Each tag may have own set of styles. - "tag" => "style" map.
|
||||
// Each tag may have own set of styles. - "tag" => "style" map.
|
||||
styles?: Object;
|
||||
// specifies a schema to use.
|
||||
schema?: any;
|
||||
}
|
||||
|
||||
export interface TypeConstructorOptions {
|
||||
kind?: string;
|
||||
resolve?: Function;
|
||||
construct?: Function;
|
||||
instanceOf?: Object;
|
||||
predicate?: string;
|
||||
represent?: Function;
|
||||
defaultStyle?: string;
|
||||
styleAliases?: Object;
|
||||
}
|
||||
|
||||
export interface SchemaDefinition {
|
||||
implicit?: any[];
|
||||
explicit?: any[];
|
||||
include?: any[];
|
||||
}
|
||||
|
||||
// only strings, arrays and plain objects: http://www.yaml.org/spec/1.2/spec.html#id2802346
|
||||
export var FAILSAFE_SCHEMA: any;
|
||||
// only strings, arrays and plain objects: http://www.yaml.org/spec/1.2/spec.html#id2802346
|
||||
@@ -45,6 +71,13 @@ declare module jsyaml {
|
||||
export var DEFAULT_SAFE_SCHEMA: any;
|
||||
// all supported YAML types.
|
||||
export var DEFAULT_FULL_SCHEMA: any;
|
||||
export var MINIMAL_SCHEMA: any;
|
||||
export var SAFE_SCHEMA: any;
|
||||
|
||||
export class YAMLException extends Error {
|
||||
constructor(reason?: any, mark?: any);
|
||||
toString(compact?: boolean): string;
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'js-yaml' {
|
||||
|
||||
Vendored
+10
-17
@@ -41,7 +41,7 @@ declare module L {
|
||||
export function bounds(points: Point[]): Bounds;
|
||||
|
||||
|
||||
export interface BoundsStatic extends ClassStatic {
|
||||
export interface BoundsStatic {
|
||||
/**
|
||||
* Creates a Bounds object from two coordinates (usually top-left and bottom-right
|
||||
* corners).
|
||||
@@ -513,7 +513,7 @@ declare module L {
|
||||
/**
|
||||
* Creates a control with the given options.
|
||||
*/
|
||||
function (options?: ControlOptions): Control;
|
||||
(options?: ControlOptions): Control;
|
||||
}
|
||||
|
||||
export namespace control {
|
||||
@@ -805,13 +805,6 @@ declare namespace L {
|
||||
}
|
||||
|
||||
declare namespace L {
|
||||
|
||||
/**
|
||||
* Creates a Draggable object for moving the given element when you start dragging
|
||||
* the dragHandle element (equals the element itself by default).
|
||||
*/
|
||||
function draggable(element: HTMLElement, dragHandle?: HTMLElement): Draggable;
|
||||
|
||||
export interface DraggableStatic extends ClassStatic {
|
||||
/**
|
||||
* Creates a Draggable object for moving the given element when you start dragging
|
||||
@@ -1453,7 +1446,7 @@ declare namespace L {
|
||||
*/
|
||||
function latLng(coords: LatLngExpression): LatLng;
|
||||
|
||||
export interface LatLngStatic extends ClassStatic {
|
||||
export interface LatLngStatic {
|
||||
/**
|
||||
* Creates an object representing a geographical point with the given latitude
|
||||
* and longitude.
|
||||
@@ -1539,7 +1532,7 @@ declare namespace L {
|
||||
*/
|
||||
function latLngBounds(latlngs: LatLngBoundsExpression): LatLngBounds;
|
||||
|
||||
export interface LatLngBoundsStatic extends ClassStatic {
|
||||
export interface LatLngBoundsStatic {
|
||||
/**
|
||||
* Creates a LatLngBounds object by defining south-west and north-east corners
|
||||
* of the rectangle.
|
||||
@@ -2442,7 +2435,7 @@ declare namespace L {
|
||||
options: Map.MapOptions;
|
||||
|
||||
/**
|
||||
* Iterates over the layers of the map, optionally specifying context
|
||||
* Iterates over the layers of the map, optionally specifying context
|
||||
* of the iterator function.
|
||||
*/
|
||||
eachLayer(fn: (layer: ILayer) => void, context?: any): Map;
|
||||
@@ -3058,7 +3051,7 @@ declare namespace L {
|
||||
*/
|
||||
function multiPolygon(latlngs: LatLng[][], options?: PolylineOptions): MultiPolygon;
|
||||
|
||||
export interface MultiPolylgonStatic extends ClassStatic {
|
||||
export interface MultiPolygonStatic extends ClassStatic {
|
||||
/**
|
||||
* Instantiates a multi-polyline object given an array of latlngs arrays (one
|
||||
* for each individual polygon) and optionally an options object (the same
|
||||
@@ -3066,7 +3059,7 @@ declare namespace L {
|
||||
*/
|
||||
new(latlngs: LatLng[][], options?: PolylineOptions): MultiPolygon;
|
||||
}
|
||||
export var MultiPolylgon: MultiPolylgonStatic;
|
||||
export var MultiPolygon: MultiPolygonStatic;
|
||||
|
||||
export interface MultiPolygon extends FeatureGroup<Polygon> {
|
||||
/**
|
||||
@@ -3401,7 +3394,7 @@ declare namespace L {
|
||||
*/
|
||||
function point(x: number, y: number, round?: boolean): Point;
|
||||
|
||||
export interface PointStatic extends ClassStatic {
|
||||
export interface PointStatic {
|
||||
/**
|
||||
* Creates a Point object with the given x and y coordinates. If optional round
|
||||
* is set to true, rounds the x and y values.
|
||||
@@ -4182,7 +4175,7 @@ declare namespace L {
|
||||
* When this option is set, the TileLayer only loads tiles that are in the given geographical bounds.
|
||||
*/
|
||||
bounds?: LatLngBounds;
|
||||
|
||||
|
||||
/**
|
||||
* Custom keys may be specified in TileLayerOptions so they can be used in a provided URL template.
|
||||
*/
|
||||
@@ -4191,7 +4184,7 @@ declare namespace L {
|
||||
}
|
||||
|
||||
declare namespace L {
|
||||
export interface TransformationStatic extends ClassStatic {
|
||||
export interface TransformationStatic {
|
||||
/**
|
||||
* Creates a transformation object with the given coefficients.
|
||||
*/
|
||||
|
||||
+402
-91
@@ -257,6 +257,193 @@ module TestDifference {
|
||||
}
|
||||
}
|
||||
|
||||
// _.differenceBy
|
||||
module TestDifferenceBy {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
let iteratee: (value: TResult) => any;
|
||||
|
||||
{
|
||||
let result: TResult[];
|
||||
|
||||
result = _.differenceBy<TResult>(array, array);
|
||||
result = _.differenceBy<TResult>(array, list, array);
|
||||
result = _.differenceBy<TResult>(array, array, list, array);
|
||||
result = _.differenceBy<TResult>(array, list, array, list, array);
|
||||
result = _.differenceBy<TResult>(array, array, list, array, list, array);
|
||||
result = _.differenceBy<TResult>(array, list, array, list, array, list, array);
|
||||
|
||||
result = _.differenceBy<TResult>(array, array, iteratee);
|
||||
result = _.differenceBy<TResult>(array, list, array, iteratee);
|
||||
result = _.differenceBy<TResult>(array, array, list, array, iteratee);
|
||||
result = _.differenceBy<TResult>(array, list, array, list, array, iteratee);
|
||||
result = _.differenceBy<TResult>(array, array, list, array, list, array, iteratee);
|
||||
result = _.differenceBy<TResult>(array, list, array, list, array, list, array, iteratee);
|
||||
|
||||
result = _.differenceBy<TResult>(array, array, 'a');
|
||||
result = _.differenceBy<TResult>(array, list, array, 'a');
|
||||
result = _.differenceBy<TResult>(array, array, list, array, 'a');
|
||||
result = _.differenceBy<TResult>(array, list, array, list, array, 'a');
|
||||
result = _.differenceBy<TResult>(array, array, list, array, list, array, 'a');
|
||||
result = _.differenceBy<TResult>(array, list, array, list, array, list, array, 'a');
|
||||
|
||||
result = _.differenceBy<TResult, {a: number}>(array, array, {a: 1});
|
||||
result = _.differenceBy<TResult, {a: number}>(array, list, array, {a: 1});
|
||||
result = _.differenceBy<TResult, {a: number}>(array, array, list, array, {a: 1});
|
||||
result = _.differenceBy<TResult, {a: number}>(array, list, array, list, array, {a: 1});
|
||||
result = _.differenceBy<TResult, {a: number}>(array, array, list, array, list, array, {a: 1});
|
||||
result = _.differenceBy<TResult>(array, list, array, list, array, list, array, {a: 1});
|
||||
|
||||
result = _.differenceBy<TResult>(list, list);
|
||||
result = _.differenceBy<TResult>(list, array, list);
|
||||
result = _.differenceBy<TResult>(list, list, array, list);
|
||||
result = _.differenceBy<TResult>(list, array, list, array, list);
|
||||
result = _.differenceBy<TResult>(list, list, array, list, array, list);
|
||||
result = _.differenceBy<TResult>(list, array, list, array, list, array, list);
|
||||
|
||||
result = _.differenceBy<TResult>(list, list, iteratee);
|
||||
result = _.differenceBy<TResult>(list, array, list, iteratee);
|
||||
result = _.differenceBy<TResult>(list, list, array, list, iteratee);
|
||||
result = _.differenceBy<TResult>(list, array, list, array, list, iteratee);
|
||||
result = _.differenceBy<TResult>(list, list, array, list, array, list, iteratee);
|
||||
result = _.differenceBy<TResult>(list, array, list, array, list, array, list, iteratee);
|
||||
|
||||
result = _.differenceBy<TResult>(list, list, 'a');
|
||||
result = _.differenceBy<TResult>(list, array, list, 'a');
|
||||
result = _.differenceBy<TResult>(list, list, array, list, 'a');
|
||||
result = _.differenceBy<TResult>(list, array, list, array, list, 'a');
|
||||
result = _.differenceBy<TResult>(list, list, array, list, array, list, 'a');
|
||||
result = _.differenceBy<TResult>(list, array, list, array, list, array, list, 'a');
|
||||
|
||||
result = _.differenceBy<TResult, {a: number}>(list, list, {a: 1});
|
||||
result = _.differenceBy<TResult, {a: number}>(list, array, list, {a: 1});
|
||||
result = _.differenceBy<TResult, {a: number}>(list, list, array, list, {a: 1});
|
||||
result = _.differenceBy<TResult, {a: number}>(list, array, list, array, list, {a: 1});
|
||||
result = _.differenceBy<TResult, {a: number}>(list, list, array, list, array, list, {a: 1});
|
||||
result = _.differenceBy<TResult>(list, array, list, array, list, array, list, {a: 1});
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).differenceBy<TResult>(array);
|
||||
result = _(array).differenceBy<TResult>(list, array);
|
||||
result = _(array).differenceBy<TResult>(array, list, array);
|
||||
result = _(array).differenceBy<TResult>(list, array, list, array);
|
||||
result = _(array).differenceBy<TResult>(array, list, array, list, array);
|
||||
result = _(array).differenceBy<TResult>(list, array, list, array, list, array);
|
||||
|
||||
result = _(array).differenceBy<TResult>(array, iteratee);
|
||||
result = _(array).differenceBy<TResult>(list, array, iteratee);
|
||||
result = _(array).differenceBy<TResult>(array, list, array, iteratee);
|
||||
result = _(array).differenceBy<TResult>(list, array, list, array, iteratee);
|
||||
result = _(array).differenceBy<TResult>(array, list, array, list, array, iteratee);
|
||||
result = _(array).differenceBy<TResult>(list, array, list, array, list, array, iteratee);
|
||||
|
||||
result = _(array).differenceBy<TResult>(array, 'a');
|
||||
result = _(array).differenceBy<TResult>(list, array, 'a');
|
||||
result = _(array).differenceBy<TResult>(array, list, array, 'a');
|
||||
result = _(array).differenceBy<TResult>(list, array, list, array, 'a');
|
||||
result = _(array).differenceBy<TResult>(array, list, array, list, array, 'a');
|
||||
result = _(array).differenceBy<TResult>(list, array, list, array, list, array, 'a');
|
||||
|
||||
result = _(array).differenceBy<TResult, {a: number}>(array, {a: 1});
|
||||
result = _(array).differenceBy<TResult, {a: number}>(list, array, {a: 1});
|
||||
result = _(array).differenceBy<TResult, {a: number}>(array, list, array, {a: 1});
|
||||
result = _(array).differenceBy<TResult, {a: number}>(list, array, list, array, {a: 1});
|
||||
result = _(array).differenceBy<TResult, {a: number}>(array, list, array, list, array, {a: 1});
|
||||
result = _(array).differenceBy<TResult>(list, array, list, array, list, array, {a: 1});
|
||||
|
||||
result = _(list).differenceBy<TResult>(list);
|
||||
result = _(list).differenceBy<TResult>(array, list);
|
||||
result = _(list).differenceBy<TResult>(list, array, list);
|
||||
result = _(list).differenceBy<TResult>(array, list, array, list);
|
||||
result = _(list).differenceBy<TResult>(list, array, list, array, list);
|
||||
result = _(list).differenceBy<TResult>(array, list, array, list, array, list);
|
||||
|
||||
result = _(list).differenceBy<TResult>(list, iteratee);
|
||||
result = _(list).differenceBy<TResult>(array, list, iteratee);
|
||||
result = _(list).differenceBy<TResult>(list, array, list, iteratee);
|
||||
result = _(list).differenceBy<TResult>(array, list, array, list, iteratee);
|
||||
result = _(list).differenceBy<TResult>(list, array, list, array, list, iteratee);
|
||||
result = _(list).differenceBy<TResult>(array, list, array, list, array, list, iteratee);
|
||||
|
||||
result = _(list).differenceBy<TResult>(list, 'a');
|
||||
result = _(list).differenceBy<TResult>(array, list, 'a');
|
||||
result = _(list).differenceBy<TResult>(list, array, list, 'a');
|
||||
result = _(list).differenceBy<TResult>(array, list, array, list, 'a');
|
||||
result = _(list).differenceBy<TResult>(list, array, list, array, list, 'a');
|
||||
result = _(list).differenceBy<TResult>(array, list, array, list, array, list, 'a');
|
||||
|
||||
result = _(list).differenceBy<TResult, {a: number}>(list, {a: 1});
|
||||
result = _(list).differenceBy<TResult, {a: number}>(array, list, {a: 1});
|
||||
result = _(list).differenceBy<TResult, {a: number}>(list, array, list, {a: 1});
|
||||
result = _(list).differenceBy<TResult, {a: number}>(array, list, array, list, {a: 1});
|
||||
result = _(list).differenceBy<TResult, {a: number}>(list, array, list, array, list, {a: 1});
|
||||
result = _(list).differenceBy<TResult>(array, list, array, list, array, list, {a: 1});
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).chain().differenceBy<TResult>(array);
|
||||
result = _(array).chain().differenceBy<TResult>(list, array);
|
||||
result = _(array).chain().differenceBy<TResult>(array, list, array);
|
||||
result = _(array).chain().differenceBy<TResult>(list, array, list, array);
|
||||
result = _(array).chain().differenceBy<TResult>(array, list, array, list, array);
|
||||
result = _(array).chain().differenceBy<TResult>(list, array, list, array, list, array);
|
||||
|
||||
result = _(array).chain().differenceBy<TResult>(array, iteratee);
|
||||
result = _(array).chain().differenceBy<TResult>(list, array, iteratee);
|
||||
result = _(array).chain().differenceBy<TResult>(array, list, array, iteratee);
|
||||
result = _(array).chain().differenceBy<TResult>(list, array, list, array, iteratee);
|
||||
result = _(array).chain().differenceBy<TResult>(array, list, array, list, array, iteratee);
|
||||
result = _(array).chain().differenceBy<TResult>(list, array, list, array, list, array, iteratee);
|
||||
|
||||
result = _(array).chain().differenceBy<TResult>(array, 'a');
|
||||
result = _(array).chain().differenceBy<TResult>(list, array, 'a');
|
||||
result = _(array).chain().differenceBy<TResult>(array, list, array, 'a');
|
||||
result = _(array).chain().differenceBy<TResult>(list, array, list, array, 'a');
|
||||
result = _(array).chain().differenceBy<TResult>(array, list, array, list, array, 'a');
|
||||
result = _(array).chain().differenceBy<TResult>(list, array, list, array, list, array, 'a');
|
||||
|
||||
result = _(array).chain().differenceBy<TResult, {a: number}>(array, {a: 1});
|
||||
result = _(array).chain().differenceBy<TResult, {a: number}>(list, array, {a: 1});
|
||||
result = _(array).chain().differenceBy<TResult, {a: number}>(array, list, array, {a: 1});
|
||||
result = _(array).chain().differenceBy<TResult, {a: number}>(list, array, list, array, {a: 1});
|
||||
result = _(array).chain().differenceBy<TResult, {a: number}>(array, list, array, list, array, {a: 1});
|
||||
result = _(array).chain().differenceBy<TResult>(list, array, list, array, list, array, {a: 1});
|
||||
|
||||
result = _(list).chain().differenceBy<TResult>(list);
|
||||
result = _(list).chain().differenceBy<TResult>(array, list);
|
||||
result = _(list).chain().differenceBy<TResult>(list, array, list);
|
||||
result = _(list).chain().differenceBy<TResult>(array, list, array, list);
|
||||
result = _(list).chain().differenceBy<TResult>(list, array, list, array, list);
|
||||
result = _(list).chain().differenceBy<TResult>(array, list, array, list, array, list);
|
||||
|
||||
result = _(list).chain().differenceBy<TResult>(list, iteratee);
|
||||
result = _(list).chain().differenceBy<TResult>(array, list, iteratee);
|
||||
result = _(list).chain().differenceBy<TResult>(list, array, list, iteratee);
|
||||
result = _(list).chain().differenceBy<TResult>(array, list, array, list, iteratee);
|
||||
result = _(list).chain().differenceBy<TResult>(list, array, list, array, list, iteratee);
|
||||
result = _(list).chain().differenceBy<TResult>(array, list, array, list, array, list, iteratee);
|
||||
|
||||
result = _(list).chain().differenceBy<TResult>(list, 'a');
|
||||
result = _(list).chain().differenceBy<TResult>(array, list, 'a');
|
||||
result = _(list).chain().differenceBy<TResult>(list, array, list, 'a');
|
||||
result = _(list).chain().differenceBy<TResult>(array, list, array, list, 'a');
|
||||
result = _(list).chain().differenceBy<TResult>(list, array, list, array, list, 'a');
|
||||
result = _(list).chain().differenceBy<TResult>(array, list, array, list, array, list, 'a');
|
||||
|
||||
result = _(list).chain().differenceBy<TResult, {a: number}>(list, {a: 1});
|
||||
result = _(list).chain().differenceBy<TResult, {a: number}>(array, list, {a: 1});
|
||||
result = _(list).chain().differenceBy<TResult, {a: number}>(list, array, list, {a: 1});
|
||||
result = _(list).chain().differenceBy<TResult, {a: number}>(array, list, array, list, {a: 1});
|
||||
result = _(list).chain().differenceBy<TResult, {a: number}>(list, array, list, array, list, {a: 1});
|
||||
result = _(list).chain().differenceBy<TResult>(array, list, array, list, array, list, {a: 1});
|
||||
}
|
||||
}
|
||||
|
||||
// _.drop
|
||||
{
|
||||
let array: TResult[];
|
||||
@@ -3979,8 +4166,53 @@ module TestKeyBy {
|
||||
}
|
||||
}
|
||||
|
||||
result = <number[][]>_.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
|
||||
result = <string[][]>_.invokeMap([123, 456], String.prototype.split, '');
|
||||
//_.invokeMap
|
||||
module TestInvokeMap {
|
||||
let numArray = [4, 2, 1, 3]
|
||||
let numDict: _.Dictionary<number> = {
|
||||
a: 1,
|
||||
b: 2,
|
||||
c: 3,
|
||||
d: 4
|
||||
}
|
||||
|
||||
let result: string[];
|
||||
result = _.invokeMap<number, string>(numArray, 'toString');
|
||||
result = _.invokeMap<number, string>(numArray, 'toString', 2);
|
||||
result = _.invokeMap<string>(numArray, 'toString');
|
||||
result = _.invokeMap<string>(numArray, 'toString', 2);
|
||||
result = _(numArray).invokeMap<string>('toString').value();
|
||||
result = _(numArray).invokeMap<string>('toString', 2).value();
|
||||
result = _(numArray).chain().invokeMap<string>('toString').value();
|
||||
result = _(numArray).chain().invokeMap<string>('toString', 2).value();
|
||||
|
||||
result = _.invokeMap<number, string>(numArray, Number.prototype.toString);
|
||||
result = _.invokeMap<number, string>(numArray, Number.prototype.toString, 2);
|
||||
result = _.invokeMap<string>(numArray, Number.prototype.toString);
|
||||
result = _.invokeMap<string>(numArray, Number.prototype.toString, 2);
|
||||
result = _(numArray).invokeMap<string>(Number.prototype.toString).value();
|
||||
result = _(numArray).invokeMap<string>(Number.prototype.toString, 2).value();
|
||||
result = _(numArray).chain().invokeMap<string>(Number.prototype.toString).value();
|
||||
result = _(numArray).chain().invokeMap<string>(Number.prototype.toString, 2).value();
|
||||
|
||||
result = _.invokeMap<number, string>(numDict, 'toString');
|
||||
result = _.invokeMap<number, string>(numDict, 'toString', 2);
|
||||
result = _.invokeMap<string>(numDict, 'toString');
|
||||
result = _.invokeMap<string>(numDict, 'toString', 2);
|
||||
result = _(numDict).invokeMap<string>('toString').value();
|
||||
result = _(numDict).invokeMap<string>('toString', 2).value();
|
||||
result = _(numDict).chain().invokeMap<string>('toString').value();
|
||||
result = _(numDict).chain().invokeMap<string>('toString', 2).value();
|
||||
|
||||
result = _.invokeMap<number, string>(numDict, Number.prototype.toString);
|
||||
result = _.invokeMap<number, string>(numDict, Number.prototype.toString, 2);
|
||||
result = _.invokeMap<string>(numDict, Number.prototype.toString);
|
||||
result = _.invokeMap<string>(numDict, Number.prototype.toString, 2);
|
||||
result = _(numDict).invokeMap<string>(Number.prototype.toString).value();
|
||||
result = _(numDict).invokeMap<string>(Number.prototype.toString, 2).value();
|
||||
result = _(numDict).chain().invokeMap<string>(Number.prototype.toString).value();
|
||||
result = _(numDict).chain().invokeMap<string>(Number.prototype.toString, 2).value();
|
||||
}
|
||||
|
||||
// _.map
|
||||
module TestMap {
|
||||
@@ -8970,7 +9202,7 @@ module TestValuesIn {
|
||||
**********/
|
||||
|
||||
// _.camelCase
|
||||
module TestCamelCase {
|
||||
namespace TestCamelCase {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -8986,7 +9218,7 @@ module TestCamelCase {
|
||||
}
|
||||
|
||||
// _.capitalize
|
||||
module TestCapitalize {
|
||||
namespace TestCapitalize {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9002,7 +9234,7 @@ module TestCapitalize {
|
||||
}
|
||||
|
||||
// _.deburr
|
||||
module TestDeburr {
|
||||
namespace TestDeburr {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9018,7 +9250,7 @@ module TestDeburr {
|
||||
}
|
||||
|
||||
// _.endsWith
|
||||
module TestEndsWith {
|
||||
namespace TestEndsWith {
|
||||
{
|
||||
let result: boolean;
|
||||
|
||||
@@ -9038,7 +9270,7 @@ module TestEndsWith {
|
||||
}
|
||||
|
||||
// _.escape
|
||||
module TestEscape {
|
||||
namespace TestEscape {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9054,7 +9286,7 @@ module TestEscape {
|
||||
}
|
||||
|
||||
// _.escapeRegExp
|
||||
module TestEscapeRegExp {
|
||||
namespace TestEscapeRegExp {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9070,7 +9302,7 @@ module TestEscapeRegExp {
|
||||
}
|
||||
|
||||
// _.kebabCase
|
||||
module TestKebabCase {
|
||||
namespace TestKebabCase {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9086,7 +9318,7 @@ module TestKebabCase {
|
||||
}
|
||||
|
||||
// _.lowerCase
|
||||
module TestLowerCase {
|
||||
namespace TestLowerCase {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9102,7 +9334,7 @@ module TestLowerCase {
|
||||
}
|
||||
|
||||
// _.lowerFirst
|
||||
module TestLowerFirst {
|
||||
namespace TestLowerFirst {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9118,11 +9350,11 @@ module TestLowerFirst {
|
||||
}
|
||||
|
||||
// _.pad
|
||||
module TestPad {
|
||||
namespace TestPad {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
result = _.pad('abd');
|
||||
result = _.pad('abc');
|
||||
result = _.pad('abc', 8);
|
||||
result = _.pad('abc', 8, '_-');
|
||||
|
||||
@@ -9140,31 +9372,8 @@ module TestPad {
|
||||
}
|
||||
}
|
||||
|
||||
// _.padStart
|
||||
module TestPadStart {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
result = _.padStart('abc');
|
||||
result = _.padStart('abc', 6);
|
||||
result = _.padStart('abc', 6, '_-');
|
||||
|
||||
result = _('abc').padStart();
|
||||
result = _('abc').padStart(6);
|
||||
result = _('abc').padStart(6, '_-');
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _('abc').chain().padStart();
|
||||
result = _('abc').chain().padStart(6);
|
||||
result = _('abc').chain().padStart(6, '_-');
|
||||
}
|
||||
}
|
||||
|
||||
// _.padEnd
|
||||
module TestPadEnd {
|
||||
namespace TestPadEnd {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9186,9 +9395,31 @@ module TestPadEnd {
|
||||
}
|
||||
}
|
||||
|
||||
// _.padStart
|
||||
namespace TestPadStart {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
result = _.padStart('abc');
|
||||
result = _.padStart('abc', 6);
|
||||
result = _.padStart('abc', 6, '_-');
|
||||
|
||||
result = _('abc').padStart();
|
||||
result = _('abc').padStart(6);
|
||||
result = _('abc').padStart(6, '_-');
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _('abc').chain().padStart();
|
||||
result = _('abc').chain().padStart(6);
|
||||
result = _('abc').chain().padStart(6, '_-');
|
||||
}
|
||||
}
|
||||
|
||||
// _.parseInt
|
||||
module TestParseInt {
|
||||
namespace TestParseInt {
|
||||
{
|
||||
let result: number;
|
||||
|
||||
@@ -9208,7 +9439,7 @@ module TestParseInt {
|
||||
}
|
||||
|
||||
// _.repeat
|
||||
module TestRepeat {
|
||||
namespace TestRepeat {
|
||||
{
|
||||
let result: string;
|
||||
result = _.repeat('*');
|
||||
@@ -9226,8 +9457,63 @@ module TestRepeat {
|
||||
}
|
||||
}
|
||||
|
||||
// _.replace
|
||||
namespace TestReplace {
|
||||
let replacer = (match: string, offset: number, string: string) => 'Barney';
|
||||
|
||||
{
|
||||
let result: string;
|
||||
|
||||
result = _.replace('Hi Fred', 'Fred', 'Barney');
|
||||
result = _.replace('Hi Fred', 'Fred', replacer);
|
||||
|
||||
result = _.replace('Hi Fred', /fred/i, 'Barney');
|
||||
result = _.replace('Hi Fred', /fred/i, replacer);
|
||||
|
||||
result = _.replace('Fred');
|
||||
result = _.replace('Fred', 'Barney');
|
||||
result = _.replace('Fred', replacer);
|
||||
|
||||
result = _.replace(/fred/i);
|
||||
result = _.replace(/fred/i, 'Barney');
|
||||
result = _.replace(/fred/i, replacer);
|
||||
|
||||
result = _('Hi Fred').replace('Fred', 'Barney');
|
||||
result = _('Hi Fred').replace('Fred', replacer);
|
||||
|
||||
result = _('Hi Fred').replace(/fred/i, 'Barney');
|
||||
result = _('Hi Fred').replace(/fred/i, replacer);
|
||||
|
||||
result = _('Fred').replace();
|
||||
result = _('Fred').replace('Barney');
|
||||
result = _('Fred').replace(replacer);
|
||||
|
||||
result = _(/fred/i).replace();
|
||||
result = _(/fred/i).replace('Barney');
|
||||
result = _(/fred/i).replace(replacer);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _('Hi Fred').chain().replace('Fred', 'Barney');
|
||||
result = _('Hi Fred').chain().replace('Fred', replacer);
|
||||
|
||||
result = _('Hi Fred').chain().replace(/fred/i, 'Barney');
|
||||
result = _('Hi Fred').chain().replace(/fred/i, replacer);
|
||||
|
||||
result = _('Fred').chain().replace();
|
||||
result = _('Fred').chain().replace('Barney');
|
||||
result = _('Fred').chain().replace(replacer);
|
||||
|
||||
result = _(/fred/i).chain().replace();
|
||||
result = _(/fred/i).chain().replace('Barney');
|
||||
result = _(/fred/i).chain().replace(replacer);
|
||||
}
|
||||
}
|
||||
|
||||
// _.snakeCase
|
||||
module TestSnakeCase {
|
||||
namespace TestSnakeCase {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9242,8 +9528,35 @@ module TestSnakeCase {
|
||||
}
|
||||
}
|
||||
|
||||
// _.split
|
||||
namespace TestSplit {
|
||||
{
|
||||
let result: string[];
|
||||
|
||||
result = _.split('a-b-c');
|
||||
result = _.split('a-b-c', '-');
|
||||
result = _.split('a-b-c', '-', 2);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<string>;
|
||||
|
||||
result = _('a-b-c').split();
|
||||
result = _('a-b-c').split('-');
|
||||
result = _('a-b-c').split('-', 2);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<string>;
|
||||
|
||||
result = _('a-b-c').chain().split();
|
||||
result = _('a-b-c').chain().split('-');
|
||||
result = _('a-b-c').chain().split('-', 2);
|
||||
}
|
||||
}
|
||||
|
||||
// _.startCase
|
||||
module TestStartCase {
|
||||
namespace TestStartCase {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9259,7 +9572,7 @@ module TestStartCase {
|
||||
}
|
||||
|
||||
// _.startsWith
|
||||
module TestStartsWith {
|
||||
namespace TestStartsWith {
|
||||
{
|
||||
let result: boolean;
|
||||
|
||||
@@ -9279,7 +9592,7 @@ module TestStartsWith {
|
||||
}
|
||||
|
||||
// _.template
|
||||
module TestTemplate {
|
||||
namespace TestTemplate {
|
||||
interface TemplateExecutor {
|
||||
(obj?: Object): string;
|
||||
source: string;
|
||||
@@ -9313,7 +9626,7 @@ module TestTemplate {
|
||||
}
|
||||
|
||||
// _.toLower
|
||||
module TestToLower {
|
||||
namespace TestToLower {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9329,7 +9642,7 @@ module TestToLower {
|
||||
}
|
||||
|
||||
// _.toUpper
|
||||
module TestToUpper {
|
||||
namespace TestToUpper {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9345,7 +9658,7 @@ module TestToUpper {
|
||||
}
|
||||
|
||||
// _.trim
|
||||
module TestTrim {
|
||||
namespace TestTrim {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9365,29 +9678,8 @@ module TestTrim {
|
||||
}
|
||||
}
|
||||
|
||||
// _.trimStart
|
||||
module TestTrimStart {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
result = _.trimStart();
|
||||
result = _.trimStart(' abc ');
|
||||
result = _.trimStart('-_-abc-_-', '_-');
|
||||
|
||||
result = _('-_-abc-_-').trimStart();
|
||||
result = _('-_-abc-_-').trimStart('_-');
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _('-_-abc-_-').chain().trimStart();
|
||||
result = _('-_-abc-_-').chain().trimStart('_-');
|
||||
}
|
||||
}
|
||||
|
||||
// _.trimEnd
|
||||
module TestTrimEnd {
|
||||
namespace TestTrimEnd {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9407,19 +9699,38 @@ module TestTrimEnd {
|
||||
}
|
||||
}
|
||||
|
||||
// _.trimStart
|
||||
namespace TestTrimStart {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
result = _.trimStart();
|
||||
result = _.trimStart(' abc ');
|
||||
result = _.trimStart('-_-abc-_-', '_-');
|
||||
|
||||
result = _('-_-abc-_-').trimStart();
|
||||
result = _('-_-abc-_-').trimStart('_-');
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _('-_-abc-_-').chain().trimStart();
|
||||
result = _('-_-abc-_-').chain().trimStart('_-');
|
||||
}
|
||||
}
|
||||
|
||||
// _.truncate
|
||||
module Testtruncate {
|
||||
namespace TestTruncate {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
result = _.truncate('hi-diddly-ho there, neighborino');
|
||||
result = _.truncate('hi-diddly-ho there, neighborino', 24);
|
||||
result = _.truncate('hi-diddly-ho there, neighborino', { 'length': 24, 'separator': ' ' });
|
||||
result = _.truncate('hi-diddly-ho there, neighborino', { 'length': 24, 'separator': /,? +/ });
|
||||
result = _.truncate('hi-diddly-ho there, neighborino', { 'omission': ' […]' });
|
||||
|
||||
result = _('hi-diddly-ho there, neighborino').truncate();
|
||||
result = _('hi-diddly-ho there, neighborino').truncate(24);
|
||||
result = _('hi-diddly-ho there, neighborino').truncate({ 'length': 24, 'separator': ' ' });
|
||||
result = _('hi-diddly-ho there, neighborino').truncate({ 'length': 24, 'separator': /,? +/ });
|
||||
result = _('hi-diddly-ho there, neighborino').truncate({ 'omission': ' […]' });
|
||||
@@ -9429,15 +9740,31 @@ module Testtruncate {
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _('hi-diddly-ho there, neighborino').chain().truncate();
|
||||
result = _('hi-diddly-ho there, neighborino').chain().truncate(24);
|
||||
result = _('hi-diddly-ho there, neighborino').chain().truncate({ 'length': 24, 'separator': ' ' });
|
||||
result = _('hi-diddly-ho there, neighborino').chain().truncate({ 'length': 24, 'separator': /,? +/ });
|
||||
result = _('hi-diddly-ho there, neighborino').chain().truncate({ 'omission': ' […]' });
|
||||
}
|
||||
}
|
||||
|
||||
// _.unescape
|
||||
namespace TestUnescape {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
result = _.unescape('fred, barney, & pebbles');
|
||||
result = _('fred, barney, & pebbles').unescape();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _('fred, barney, & pebbles').chain().unescape();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// _.upperCase
|
||||
module TestUpperCase {
|
||||
namespace TestUpperCase {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9453,7 +9780,7 @@ module TestUpperCase {
|
||||
}
|
||||
|
||||
// _.upperFirst
|
||||
module TestUpperFirst {
|
||||
namespace TestUpperFirst {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
@@ -9468,24 +9795,8 @@ module TestUpperFirst {
|
||||
}
|
||||
}
|
||||
|
||||
// _.unescape
|
||||
module TestUnescape {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
result = _.unescape('fred, barney, & pebbles');
|
||||
result = _('fred, barney, & pebbles').unescape();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _('fred, barney, & pebbles').chain().unescape();
|
||||
}
|
||||
}
|
||||
|
||||
// _.words
|
||||
module TestWords {
|
||||
namespace TestWords {
|
||||
{
|
||||
let result: string[];
|
||||
|
||||
|
||||
Vendored
+918
-238
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,60 @@
|
||||
/// <reference path="meteor-publish-composite.d.ts" />
|
||||
/// <reference path="../meteor/meteor.d.ts" />
|
||||
|
||||
import User = Meteor.User;
|
||||
interface IPost { _id : string, authorId : string };
|
||||
interface IComment { authorId : string };
|
||||
var Posts : Mongo.Collection<IPost> = new Mongo.Collection<IPost>('Posts');
|
||||
var Comments : Mongo.Collection<IComment> = new Mongo.Collection<IComment>('Comments');
|
||||
|
||||
// Server
|
||||
Meteor.publishComposite('topTenPosts', {
|
||||
find: function() : Mongo.Cursor<IPost> {
|
||||
// Find top ten highest scoring posts
|
||||
return Posts.find({}, { sort: { score: -1 }, limit: 10 });
|
||||
},
|
||||
children: [
|
||||
{
|
||||
find: function(post) {
|
||||
// Find post author. Even though we only want to return
|
||||
// one record here, we use "find" instead of "findOne"
|
||||
// since this function should return a cursor.
|
||||
return Meteor.users.find(
|
||||
{ _id: post.authorId },
|
||||
{ limit: 1, fields: { profile: 1 } });
|
||||
}
|
||||
},
|
||||
{
|
||||
find: function(post) {
|
||||
// Find top two comments on post
|
||||
return Comments.find(
|
||||
{ postId: post._id },
|
||||
{ sort: { score: -1 }, limit: 2 });
|
||||
},
|
||||
children: [
|
||||
{
|
||||
find: function(comment, post) {
|
||||
// Find user that authored comment.
|
||||
return Meteor.users.find(
|
||||
{ _id: comment.authorId },
|
||||
{ limit: 1, fields: { profile: 1 } });
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// Server
|
||||
Meteor.publishComposite('postsByUser', function(userId, limit) {
|
||||
return {
|
||||
find: function() {
|
||||
// Find posts made by user. Note arguments for callback function
|
||||
// being used in query.
|
||||
return Posts.find({ authorId: userId }, { limit: limit });
|
||||
},
|
||||
children: [
|
||||
// This section will be similar to that of the previous example.
|
||||
]
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,65 @@
|
||||
// Type definitions for meteor-publish-composite
|
||||
// Project: https://github.com/englue/meteor-publish-composite
|
||||
// Definitions by: Robert Van Gorkom <https://github.com/vangorra>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="../meteor/meteor.d.ts" />
|
||||
|
||||
declare interface PublishCompositeConfigN {
|
||||
children? : PublishCompositeConfigN[];
|
||||
find(
|
||||
...args : any[]
|
||||
) : Mongo.Cursor<any>;
|
||||
}
|
||||
|
||||
declare interface PublishCompositeConfig4<InLevel1, InLevel2, InLevel3, InLevel4, OutLevel> {
|
||||
children? : PublishCompositeConfigN[];
|
||||
find(
|
||||
arg4 : InLevel4,
|
||||
arg3 : InLevel3,
|
||||
arg2 : InLevel2,
|
||||
arg1 : InLevel1
|
||||
) : Mongo.Cursor<OutLevel>;
|
||||
}
|
||||
|
||||
declare interface PublishCompositeConfig3<InLevel1, InLevel2, InLevel3, OutLevel> {
|
||||
children? : PublishCompositeConfig4<InLevel1, InLevel2, InLevel3, OutLevel, any>[];
|
||||
find(
|
||||
arg3 : InLevel3,
|
||||
arg2 : InLevel2,
|
||||
arg1 : InLevel1
|
||||
) : Mongo.Cursor<OutLevel>;
|
||||
}
|
||||
|
||||
declare interface PublishCompositeConfig2<InLevel1, InLevel2, OutLevel> {
|
||||
children? : PublishCompositeConfig3<InLevel1, InLevel2, OutLevel, any>[];
|
||||
find(
|
||||
arg2 : InLevel2,
|
||||
arg1 : InLevel1
|
||||
) : Mongo.Cursor<OutLevel>;
|
||||
}
|
||||
|
||||
declare interface PublishCompositeConfig1<InLevel1, OutLevel> {
|
||||
children? : PublishCompositeConfig2<InLevel1, OutLevel, any>[];
|
||||
find(
|
||||
arg1 : InLevel1
|
||||
) : Mongo.Cursor<OutLevel>;
|
||||
}
|
||||
|
||||
declare interface PublishCompositeConfig<OutLevel> {
|
||||
children? : PublishCompositeConfig1<OutLevel, any>[];
|
||||
find() : Mongo.Cursor<OutLevel>;
|
||||
}
|
||||
|
||||
declare module Meteor {
|
||||
function publishComposite(
|
||||
name : string,
|
||||
config : PublishCompositeConfig<any>|PublishCompositeConfig<any>[]
|
||||
) : void;
|
||||
|
||||
function publishComposite(
|
||||
name : string,
|
||||
configFunc : (...args : any[]) =>
|
||||
PublishCompositeConfig<any>|PublishCompositeConfig<any>[]
|
||||
) : void;
|
||||
}
|
||||
Vendored
+20
-12
@@ -11,6 +11,7 @@
|
||||
declare module "mongodb" {
|
||||
import {EventEmitter} from 'events';
|
||||
|
||||
|
||||
// Class documentation : http://mongodb.github.io/node-mongodb-native/2.1/api/MongoClient.html
|
||||
export class MongoClient {
|
||||
constructor();
|
||||
@@ -150,7 +151,7 @@ declare module "mongodb" {
|
||||
socketOptions?: SocketOptions;
|
||||
}
|
||||
|
||||
// Class documentation : http://mongodb.github.io/node-mongodb-native/api-generated/db.html
|
||||
// Class documentation : http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html
|
||||
export class Db extends EventEmitter {
|
||||
constructor(databaseName: string, serverConfig: Server | ReplSet | Mongos, options?: DbCreateOptions);
|
||||
|
||||
@@ -322,7 +323,7 @@ declare module "mongodb" {
|
||||
}
|
||||
|
||||
// http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html
|
||||
export class Admin {
|
||||
export interface Admin {
|
||||
// http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#addUser
|
||||
addUser(username: string, password: string, callback: MongoCallback<any>): void;
|
||||
addUser(username: string, password: string, options?: AddUserOptions): Promise<any>;
|
||||
@@ -552,7 +553,7 @@ declare module "mongodb" {
|
||||
}
|
||||
|
||||
// Documentation : http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html
|
||||
export class Collection {
|
||||
export interface Collection {
|
||||
// Get the collection name.
|
||||
collectionName: string;
|
||||
// Get the full collection namespace.
|
||||
@@ -642,7 +643,7 @@ declare module "mongodb" {
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#initializeOrderedBulkOp
|
||||
initializeOrderedBulkOp(options: CollectionOptions): OrderedBulkOperation;
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#initializeUnorderedBulkOp
|
||||
initializeOrderedBulkOp(options: CollectionOptions): OrderedBulkOperation;
|
||||
initializeUnorderedBulkOp(options: CollectionOptions): OrderedBulkOperation;
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#insertMany
|
||||
insertMany(docs: Object[], callback: MongoCallback<InsertWriteOpResult>): void
|
||||
insertMany(docs: Object[], options?: CollectionInsertManyOptions): Promise<InsertWriteOpResult>;
|
||||
@@ -871,7 +872,7 @@ declare module "mongodb" {
|
||||
}
|
||||
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/OrderedBulkOperation.html
|
||||
export class OrderedBulkOperation {
|
||||
export interface OrderedBulkOperation {
|
||||
length: number;
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/OrderedBulkOperation.html#execute
|
||||
execute(callback: MongoCallback<BulkWriteResult>): void;
|
||||
@@ -884,7 +885,14 @@ declare module "mongodb" {
|
||||
}
|
||||
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/BulkWriteResult.html
|
||||
export class BulkWriteResult {
|
||||
export interface BulkWriteResult {
|
||||
ok: boolean;
|
||||
nInserted: number;
|
||||
nUpdated: number;
|
||||
nUpserted: number;
|
||||
nModified: number;
|
||||
nRemoved: number;
|
||||
|
||||
getInsertedIds(): Array<Object>;
|
||||
getLastOp(): Object;
|
||||
getRawResponse(): Object;
|
||||
@@ -916,7 +924,7 @@ declare module "mongodb" {
|
||||
}
|
||||
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/FindOperatorsOrdered.html
|
||||
export class FindOperatorsOrdered {
|
||||
export interface FindOperatorsOrdered {
|
||||
delete(): OrderedBulkOperation;
|
||||
deleteOne(): OrderedBulkOperation;
|
||||
replaceOne(doc: Object): OrderedBulkOperation;
|
||||
@@ -926,7 +934,7 @@ declare module "mongodb" {
|
||||
}
|
||||
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/UnorderedBulkOperation.html
|
||||
export class UnorderedBulkOperation {
|
||||
export interface UnorderedBulkOperation {
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/UnorderedBulkOperation.html#execute
|
||||
execute(callback: MongoCallback<BulkWriteResult>): void;
|
||||
execute(options: FSyncOptions): Promise<BulkWriteResult>;
|
||||
@@ -938,7 +946,7 @@ declare module "mongodb" {
|
||||
}
|
||||
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/FindOperatorsUnordered.html
|
||||
export class FindOperatorsUnordered {
|
||||
export interface FindOperatorsUnordered {
|
||||
length: number;
|
||||
remove(): UnorderedBulkOperation;
|
||||
removeOne(): UnorderedBulkOperation;
|
||||
@@ -1044,7 +1052,7 @@ declare module "mongodb" {
|
||||
export type CursorResult = any | void | boolean;
|
||||
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html
|
||||
export class Cursor extends EventEmitter implements Readable {
|
||||
export interface Cursor extends Readable, NodeJS.EventEmitter {
|
||||
|
||||
sortValue: string;
|
||||
timeout: boolean;
|
||||
@@ -1161,7 +1169,7 @@ declare module "mongodb" {
|
||||
export type AggregationCursorResult = any | void;
|
||||
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html
|
||||
export class AggregationCursor extends EventEmitter implements Readable {
|
||||
export interface AggregationCursor extends Readable, NodeJS.EventEmitter {
|
||||
// http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#batchSize
|
||||
batchSize(value: number): AggregationCursor;
|
||||
// http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#clone
|
||||
@@ -1225,7 +1233,7 @@ declare module "mongodb" {
|
||||
}
|
||||
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html
|
||||
export class CommandCursor extends EventEmitter implements Readable {
|
||||
export interface CommandCursor extends Readable, NodeJS.EventEmitter {
|
||||
// http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#batchSize
|
||||
batchSize(value: number): CommandCursor;
|
||||
// http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#clone
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/// <reference path="node-sass-middleware.d.ts" />
|
||||
|
||||
import * as express from "express";
|
||||
import * as sassMiddleware from "node-sass-middleware";
|
||||
import * as path from "path";
|
||||
var app = express();
|
||||
app.use(sassMiddleware({
|
||||
/* Options */
|
||||
src: __dirname,
|
||||
dest: path.join(__dirname, 'public'),
|
||||
debug: true,
|
||||
outputStyle: 'compressed',
|
||||
prefix: '/prefix' // Where prefix is at <link rel="stylesheets" href="prefix/style.css"/>
|
||||
}));
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
// Type definitions for node-sass-middleware
|
||||
// Project: https://github.com/sass/node-sass-middleware
|
||||
// Definitions by: Pascal Garber <http://www.jumplink.eu>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
/// <reference path="../node-sass/node-sass.d.ts" />
|
||||
|
||||
declare module "node-sass-middleware" {
|
||||
|
||||
import * as sass from "node-sass";
|
||||
import * as express from "express";
|
||||
|
||||
interface Options extends sass.Options {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
src: string;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
dest?: string;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
root?: string;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
prefix?: string;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
force?: boolean;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
debug?: boolean;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
indentedSyntax?: boolean;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
response?: boolean;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
error?: () => void;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
function nodeSassMiddleware(options: Options): express.RequestHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
namespace nodeSassMiddleware { }
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export = nodeSassMiddleware;
|
||||
}
|
||||
Generated
+43
-37
@@ -13,9 +13,9 @@
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz"
|
||||
},
|
||||
"bluebird": {
|
||||
"version": "2.10.2",
|
||||
"from": "bluebird@>=2.10.1 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz"
|
||||
"version": "3.1.5",
|
||||
"from": "bluebird@>=3.1.2 <4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.1.5.tgz"
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.2",
|
||||
@@ -33,19 +33,25 @@
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
|
||||
},
|
||||
"definition-header": {
|
||||
"version": "0.1.0",
|
||||
"from": "definition-header@>=0.1.0 <0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/definition-header/-/definition-header-0.1.0.tgz"
|
||||
"version": "0.3.0",
|
||||
"from": "definition-header@>=0.3.0 <0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/definition-header/-/definition-header-0.3.0.tgz"
|
||||
},
|
||||
"definition-tester": {
|
||||
"version": "0.3.0",
|
||||
"from": "definition-tester@0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/definition-tester/-/definition-tester-0.3.0.tgz"
|
||||
"version": "0.4.0",
|
||||
"from": "definition-tester@0.4.0"
|
||||
},
|
||||
"findup-sync": {
|
||||
"version": "0.3.0",
|
||||
"from": "findup-sync@>=0.3.0 <0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz"
|
||||
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz",
|
||||
"dependencies": {
|
||||
"glob": {
|
||||
"version": "5.0.15",
|
||||
"from": "glob@>=5.0.0 <5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"git-wrapper": {
|
||||
"version": "0.1.1",
|
||||
@@ -53,14 +59,14 @@
|
||||
"resolved": "https://registry.npmjs.org/git-wrapper/-/git-wrapper-0.1.1.tgz"
|
||||
},
|
||||
"glob": {
|
||||
"version": "5.0.15",
|
||||
"from": "glob@>=5.0.14 <6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz"
|
||||
"version": "6.0.4",
|
||||
"from": "glob@>=6.0.4 <7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz"
|
||||
},
|
||||
"hoek": {
|
||||
"version": "2.16.3",
|
||||
"from": "hoek@>=2.2.0 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz"
|
||||
"version": "3.0.4",
|
||||
"from": "hoek@>=3.0.0 <4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-3.0.4.tgz"
|
||||
},
|
||||
"inflight": {
|
||||
"version": "1.0.4",
|
||||
@@ -78,18 +84,18 @@
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
|
||||
},
|
||||
"isemail": {
|
||||
"version": "1.2.0",
|
||||
"from": "isemail@>=1.0.0 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz"
|
||||
"version": "2.1.0",
|
||||
"from": "isemail@>=2.0.0 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isemail/-/isemail-2.1.0.tgz"
|
||||
},
|
||||
"joi": {
|
||||
"version": "4.9.0",
|
||||
"from": "joi@>=4.0.0 <5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/joi/-/joi-4.9.0.tgz"
|
||||
"version": "7.2.2",
|
||||
"from": "joi@>=7.2.2 <8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/joi/-/joi-7.2.2.tgz"
|
||||
},
|
||||
"joi-assert": {
|
||||
"version": "0.0.3",
|
||||
"from": "joi-assert@0.0.3",
|
||||
"from": "joi-assert@>=0.0.3 <0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/joi-assert/-/joi-assert-0.0.3.tgz"
|
||||
},
|
||||
"jsonparse": {
|
||||
@@ -130,9 +136,9 @@
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz"
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.10.6",
|
||||
"version": "2.11.1",
|
||||
"from": "moment@>=2.0.0 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.10.6.tgz"
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.11.1.tgz"
|
||||
},
|
||||
"once": {
|
||||
"version": "1.3.3",
|
||||
@@ -145,9 +151,9 @@
|
||||
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz"
|
||||
},
|
||||
"parsimmon": {
|
||||
"version": "0.5.1",
|
||||
"from": "parsimmon@>=0.5.0 <0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/parsimmon/-/parsimmon-0.5.1.tgz"
|
||||
"version": "0.7.0",
|
||||
"from": "parsimmon@>=0.7.0 <0.8.0",
|
||||
"resolved": "https://registry.npmjs.org/parsimmon/-/parsimmon-0.7.0.tgz"
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.0",
|
||||
@@ -180,9 +186,9 @@
|
||||
"resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz"
|
||||
},
|
||||
"topo": {
|
||||
"version": "1.1.0",
|
||||
"from": "topo@>=1.0.0 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz"
|
||||
"version": "2.0.0",
|
||||
"from": "topo@>=2.0.0 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/topo/-/topo-2.0.0.tgz"
|
||||
},
|
||||
"type-detect": {
|
||||
"version": "0.1.2",
|
||||
@@ -190,9 +196,9 @@
|
||||
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.2.tgz"
|
||||
},
|
||||
"typescript": {
|
||||
"version": "1.7.3",
|
||||
"from": "typescript@1.7.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-1.7.3.tgz"
|
||||
"version": "1.7.5",
|
||||
"from": "typescript@1.7.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-1.7.5.tgz"
|
||||
},
|
||||
"wordwrap": {
|
||||
"version": "0.0.3",
|
||||
@@ -205,9 +211,9 @@
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz"
|
||||
},
|
||||
"xregexp": {
|
||||
"version": "2.0.0",
|
||||
"from": "xregexp@>=2.0.0 <2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz"
|
||||
"version": "3.0.0",
|
||||
"from": "xregexp@>=3.0.0 <4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/xregexp/-/xregexp-3.0.0.tgz"
|
||||
},
|
||||
"xtend": {
|
||||
"version": "3.0.0",
|
||||
|
||||
+2
-2
@@ -35,7 +35,7 @@
|
||||
"dependencies": {
|
||||
},
|
||||
"devDependencies": {
|
||||
"definition-tester": "0.3.0",
|
||||
"typescript": "1.7.3"
|
||||
"definition-tester": "0.4.0",
|
||||
"typescript": "1.7.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/// <reference path="pi-spi" />
|
||||
|
||||
import * as piSPI from 'pi-spi';
|
||||
|
||||
var spi:piSPI.SPI = piSPI.initialize("test");
|
||||
var b:Buffer = new Buffer("Hello, World!");
|
||||
var cb = function(error:Error, data:Buffer):void { };
|
||||
|
||||
spi.bitOrder(piSPI.order.LSB_FIRST);
|
||||
spi.bitOrder(piSPI.order.MSB_FIRST);
|
||||
console.log(spi.bitOrder());
|
||||
|
||||
|
||||
spi.dataMode(piSPI.mode.CPHA);
|
||||
spi.dataMode(piSPI.mode.CPOL);
|
||||
console.log(spi.dataMode());
|
||||
|
||||
|
||||
spi.clockSpeed(4e6);
|
||||
console.log(spi.clockSpeed());
|
||||
|
||||
|
||||
spi.write(b, cb);
|
||||
spi.read(13, cb);
|
||||
|
||||
spi.transfer(b, cb);
|
||||
spi.transfer(b, 13, cb);
|
||||
|
||||
spi.close();
|
||||
Vendored
+46
@@ -0,0 +1,46 @@
|
||||
// Type definitions for pi-spi
|
||||
// Project: https://github.com/natevw/pi-spi
|
||||
// Definitions by: Marcel Ernst <https://github.com/marcel-ernst>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare namespace __PI_SPI {
|
||||
|
||||
enum mode {
|
||||
CPHA = 0x01,
|
||||
CPOL = 0x02
|
||||
}
|
||||
|
||||
enum order {
|
||||
MSB_FIRST = 0,
|
||||
LSB_FIRST = 1
|
||||
}
|
||||
|
||||
function initialize(device:string):__PI_SPI.SPI;
|
||||
|
||||
class SPI {
|
||||
clockSpeed():number;
|
||||
clockSpeed(speed:number):void;
|
||||
|
||||
dataMode():number;
|
||||
dataMode(mode:mode):void;
|
||||
|
||||
bitOrder():number;
|
||||
bitOrder(order:order):void;
|
||||
|
||||
|
||||
write(writebuf:Buffer, cb:(error:Error,data:Buffer) => void):void;
|
||||
read(readcount:number, cb:(error:Error,data:Buffer) => void):void;
|
||||
|
||||
transfer(writebuf:Buffer, cb:(error:Error,data:Buffer) => void ):void;
|
||||
transfer(writebuf:Buffer, readcount:number, cb:(error:Error,data:Buffer) => void ):void;
|
||||
|
||||
close():void;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
declare module "pi-spi" {
|
||||
export = __PI_SPI;
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
/// <reference path="../redis/redis.d.ts" />
|
||||
/// <reference path="./ratelimiter.d.ts" />
|
||||
|
||||
import redis = require('redis');
|
||||
import Limiter = require('ratelimiter');
|
||||
import * as redis from 'redis';
|
||||
import * as Limiter from 'ratelimiter';
|
||||
|
||||
let id: string;
|
||||
let db: redis.RedisClient;
|
||||
|
||||
Vendored
+2
@@ -55,5 +55,7 @@ declare module "ratelimiter" {
|
||||
get(fn: (err: any, info: LimiterInfo) => void): void;
|
||||
}
|
||||
|
||||
namespace Limiter {}
|
||||
|
||||
export = Limiter;
|
||||
}
|
||||
|
||||
Vendored
+15
-10
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-router v1.0.0
|
||||
// Type definitions for react-router v2.0.0-rc5
|
||||
// Project: https://github.com/rackt/react-router
|
||||
// Definitions by: Sergey Buturlakin <http://github.com/sergey-buturlakin>, Yuichi Murata <https://github.com/mrk21>, Václav Ostrožlík <https://github.com/vasek17>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -110,17 +110,22 @@ declare namespace ReactRouter {
|
||||
const IndexLink: Link
|
||||
|
||||
|
||||
interface RoutingContextProps extends React.Props<RoutingContext> {
|
||||
history: H.History
|
||||
interface RouterContextProps extends React.Props<RouterContext> {
|
||||
history?: H.History
|
||||
router: Router
|
||||
createElement: (component: RouteComponent, props: Object) => any
|
||||
location: H.Location
|
||||
routes: RouteConfig
|
||||
params: Params
|
||||
components?: RouteComponent[]
|
||||
}
|
||||
interface RoutingContext extends React.ComponentClass<RoutingContextProps> {}
|
||||
interface RoutingContextElement extends React.ReactElement<RoutingContextProps> {}
|
||||
const RoutingContext: RoutingContext
|
||||
interface RouterContext extends React.ComponentClass<RouterContextProps> {}
|
||||
interface RouterContextElement extends React.ReactElement<RouterContextProps> {
|
||||
history?: H.History
|
||||
location: H.Location
|
||||
router?: Router
|
||||
}
|
||||
const RouterContext: RouterContext
|
||||
|
||||
|
||||
/* components (configuration) */
|
||||
@@ -335,9 +340,9 @@ declare module "react-router/lib/RouteUtils" {
|
||||
}
|
||||
|
||||
|
||||
declare module "react-router/lib/RoutingContext" {
|
||||
declare module "react-router/lib/RouterContext" {
|
||||
|
||||
export default ReactRouter.RoutingContext
|
||||
export default ReactRouter.RouterContext
|
||||
|
||||
}
|
||||
|
||||
@@ -418,7 +423,7 @@ declare module "react-router" {
|
||||
|
||||
import { formatPattern } from "react-router/lib/PatternUtils"
|
||||
|
||||
import RoutingContext from "react-router/lib/RoutingContext"
|
||||
import RouterContext from "react-router/lib/RouterContext"
|
||||
|
||||
import PropTypes from "react-router/lib/PropTypes"
|
||||
|
||||
@@ -459,7 +464,7 @@ declare module "react-router" {
|
||||
useRoutes,
|
||||
createRoutes,
|
||||
formatPattern,
|
||||
RoutingContext,
|
||||
RouterContext,
|
||||
PropTypes,
|
||||
match
|
||||
}
|
||||
|
||||
Vendored
+2
@@ -515,6 +515,8 @@ declare namespace __React {
|
||||
*/
|
||||
backgroundBlendMode?: any;
|
||||
|
||||
backgroundColor?: any;
|
||||
|
||||
backgroundComposite?: any;
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+3
@@ -359,6 +359,9 @@ declare module "redis" {
|
||||
eval(...args:any[]): boolean;
|
||||
evalsha(args:any[], callback?:ResCallbackT<any>): boolean;
|
||||
evalsha(...args:any[]): boolean;
|
||||
script(args:any[], callback?:ResCallbackT<any>): boolean;
|
||||
script(...args: any[]): boolean;
|
||||
script(key: string, callback?: ResCallbackT<any>): boolean;
|
||||
quit(args:any[], callback?:ResCallbackT<any>): boolean;
|
||||
quit(...args:any[]): boolean;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
/// <reference path="ss-utils.d.ts" />
|
||||
|
||||
declare var EventSource : sse.IEventSourceStatic;
|
||||
|
||||
declare module sse {
|
||||
interface IEventSourceStatic extends EventTarget {
|
||||
new (url: string, eventSourceInitDict?: IEventSourceInit):IEventSourceStatic;
|
||||
url: string;
|
||||
}
|
||||
|
||||
interface IEventSourceInit {
|
||||
withCredentials?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
function test_ssutils() {
|
||||
$.ss.eventReceivers = { "document": document };
|
||||
|
||||
var source = new EventSource("/event-stream?channels=home,work");
|
||||
$(source).handleServerEvents({
|
||||
handlers: {
|
||||
onConnect: function(connect:ssutils.SSEConnect) {},
|
||||
onHeartbeat: function(msg:ssutils.SSEHeartbeat, e:MessageEvent){},
|
||||
onJoin: function(msg:ssutils.SSEJoin) {},
|
||||
onLeave: function(msg:ssutils.SSELeave) {}
|
||||
},
|
||||
receivers: {
|
||||
tv: {
|
||||
watch: function(){}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).bindHandlers({
|
||||
announce: function (msg:string) {}
|
||||
})
|
||||
.on('customEvent', function (e, msg, msgEvent) { });
|
||||
|
||||
$.ss.handlers["changeChannel"]("home");
|
||||
}
|
||||
|
||||
function test_jQuery_functions(){
|
||||
$("document").setFieldError("name","message");
|
||||
var map = $("form").serializeMap();
|
||||
$("form").applyErrors({errorCode:"",message:"",stackTrace:"",errors:[]});
|
||||
$("form").clearErrors();
|
||||
$("form").bindForm({
|
||||
overrideMessages: true,
|
||||
messages: {"NotFound": "Not Found"},
|
||||
errorFilter: function(errorMsg, errorCode, type){}
|
||||
});
|
||||
$("form").applyValues({
|
||||
"Key": "Value"
|
||||
});
|
||||
$("form").bindHandlers({
|
||||
"test": function() {}
|
||||
});
|
||||
}
|
||||
|
||||
function test_ssutils_Static(){
|
||||
$.ss.handlers["key"] = () => 0;
|
||||
$.ss.onSubmitDisable = "class";
|
||||
$.ss.validation.messages["Code"] = "Message";
|
||||
$.ss.clearAdjacentError();
|
||||
var date:Date = $.ss.todate("2001-01-01");
|
||||
var dateFmt:String = $.ss.todfmt("2001-01-01");
|
||||
dateFmt = $.ss.dfmt(new Date(2001,1,1));
|
||||
dateFmt = $.ss.dfmthm(new Date(2001,1,1));
|
||||
dateFmt = $.ss.tfmt12(new Date(2001,1,1));
|
||||
var parts:string[] = $.ss.splitOnFirst("A,B,C");
|
||||
parts = $.ss.splitOnLast("A,B,C");
|
||||
var selectedText = $.ss.getSelection();
|
||||
var qs:{ [index: string]: string } = $.ss.queryString("http://google.com?a=b&c=d");
|
||||
var relativePath = $.ss.createUrl("/path/to/{File}", {File:"file.js"});
|
||||
var readableText = $.ss.humanize("TheVariableName");
|
||||
|
||||
$.ss.listenOn = "click onmousedown";
|
||||
$.ss.eventReceivers = { "document": document };
|
||||
$.ss.handlers["changeChannel"]("home");
|
||||
}
|
||||
Vendored
+122
@@ -0,0 +1,122 @@
|
||||
// Type definitions for ServiceStack Utils v0.0.1
|
||||
// Project: https://servicestack.net/
|
||||
// Definitions by: Demis Bellot <https://github.com/mythz/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
|
||||
declare namespace ssutils {
|
||||
|
||||
interface Static {
|
||||
handlers: { [index: string]: Function };
|
||||
onSubmitDisable: string;
|
||||
validation: Validation;
|
||||
clearAdjacentError: () => void;
|
||||
todate: (s: string) => Date;
|
||||
todfmt: (s: string) => string;
|
||||
dfmt: (d: Date) => string;
|
||||
dfmthm: (d: Date) => string;
|
||||
tfmt12: (d: Date) => string;
|
||||
splitOnFirst: (s: string) => string[];
|
||||
splitOnLast: (s: string) => string[];
|
||||
getSelection: () => string;
|
||||
queryString: (url: string) => { [index: string]: string };
|
||||
createUrl: (route: string, args?: any) => string;
|
||||
humanize: (s: string) => string;
|
||||
|
||||
listenOn: string;
|
||||
eventReceivers: any;
|
||||
reconnectServerEvents: (opt: ReconnectServerEventsOptions) => any;
|
||||
}
|
||||
|
||||
interface Validation {
|
||||
overrideMessages: boolean;
|
||||
messages: { [index: string]: string };
|
||||
errorFilter: (errorMsg: string, errorCode: string, type: string) => void;
|
||||
}
|
||||
|
||||
interface ValidationOptional {
|
||||
overrideMessages?: boolean;
|
||||
messages?: { [index: string]: string };
|
||||
errorFilter?: (errorMsg: string, errorCode: string, type: string) => void;
|
||||
}
|
||||
|
||||
interface ApplyErrorsOptions extends ValidationOptional {
|
||||
}
|
||||
|
||||
interface BindFormOptions {
|
||||
validation?: ValidationOptional;
|
||||
validate?: (form: HTMLFormElement) => boolean;
|
||||
onSubmitDisable?: string;
|
||||
complete?: (...args: any[]) => void;
|
||||
error?: (...args: any[]) => void;
|
||||
}
|
||||
|
||||
interface HandleServerEventsOptions {
|
||||
handlers?: { [index: string]: Function };
|
||||
validate?: (op?: string, target?: string, msg?: string, json?: string) => boolean;
|
||||
heartbeatUrl?: string;
|
||||
heartbeatIntervalMs?: number;
|
||||
unRegisterUrl?: string;
|
||||
receivers?: { [index: string]: any };
|
||||
success?: (selector: string, msg: string, e: any) => void;
|
||||
}
|
||||
|
||||
interface ResponseStatus {
|
||||
errorCode: string;
|
||||
message: string;
|
||||
stackTrace: string;
|
||||
errors: ResponseError[];
|
||||
}
|
||||
interface ResponseError {
|
||||
errorCode: string;
|
||||
fieldName: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
interface SSECommand {
|
||||
userId: string;
|
||||
displayName: string;
|
||||
channels: string;
|
||||
profileUrl: string;
|
||||
}
|
||||
|
||||
interface SSEHeartbeat extends SSECommand { }
|
||||
interface SSEJoin extends SSECommand { }
|
||||
interface SSELeave extends SSECommand { }
|
||||
|
||||
interface SSEConnect extends SSECommand {
|
||||
id: string;
|
||||
unRegisterUrl: string;
|
||||
heartbeatUrl: string;
|
||||
heartbeatIntervalMs: number;
|
||||
idleTimeoutMs: number;
|
||||
}
|
||||
|
||||
interface ReconnectServerEventsOptions {
|
||||
url?: string;
|
||||
onerror?: (...args: any[]) => void;
|
||||
onmessage?: (...args: any[]) => void;
|
||||
errorArgs: any[];
|
||||
}
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
setFieldError: (name: string, msg: string) => void;
|
||||
serializeMap: () => { [index: string]: any };
|
||||
applyErrors: (status: ssutils.ResponseStatus, opt?: ssutils.ApplyErrorsOptions) => JQuery;
|
||||
clearErrors: () => JQuery;
|
||||
bindForm: (opt?: ssutils.ApplyErrorsOptions) => JQuery;
|
||||
applyValues: (values: { [index: string]: string }) => JQuery;
|
||||
bindHandlers: (handlers: { [index: string]: Function }) => JQuery;
|
||||
setActiveLinks: () => JQuery;
|
||||
handleServerEvents: (opt?: ssutils.HandleServerEventsOptions) => void;
|
||||
}
|
||||
|
||||
interface JQueryStatic {
|
||||
ss: ssutils.Static;
|
||||
}
|
||||
|
||||
declare module "ss-utils" {
|
||||
export = ssutils;
|
||||
}
|
||||
Vendored
+2
-2
@@ -1410,9 +1410,9 @@ declare module THREE {
|
||||
*/
|
||||
scale: Vector3;
|
||||
|
||||
modelViewMatrix: { value: Matrix4 };
|
||||
modelViewMatrix: Matrix4;
|
||||
|
||||
normalMatrix: { value: Matrix3 };
|
||||
normalMatrix: Matrix3;
|
||||
|
||||
/**
|
||||
* When this is set, then the rotationMatrix gets calculated every frame.
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/// <reference path="traverse.d.ts" />
|
||||
|
||||
import traverse = require('traverse');
|
||||
|
||||
function testForEach(){
|
||||
var obj = [ 5, 6, -3, [ 7, 8, -2, 1 ], { f : 10, g : -13 } ];
|
||||
|
||||
traverse(obj).forEach(function (x) {
|
||||
if (x < 0) this.update(x + 128);
|
||||
});
|
||||
|
||||
console.dir(obj);
|
||||
}
|
||||
|
||||
function testReduce(){
|
||||
var obj = {
|
||||
a : [1,2,3],
|
||||
b : 4,
|
||||
c : [5,6],
|
||||
d : { e : [7,8], f : 9 },
|
||||
};
|
||||
|
||||
var leaves = traverse(obj).reduce(function (acc, x) {
|
||||
if (this.isLeaf) acc.push(x);
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
console.dir(leaves);
|
||||
}
|
||||
|
||||
function testMap(){
|
||||
var c: any[] = [3, 4];
|
||||
var obj = { a : 1, b : 2, c : c };
|
||||
obj.c.push(obj);
|
||||
|
||||
var scrubbed = traverse(obj).map(function (x) {
|
||||
if (this.circular) this.remove()
|
||||
});
|
||||
console.dir(scrubbed);
|
||||
}
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
// Type definitions for traverse 0.6.6
|
||||
// Project: https://github.com/substack/js-traverse
|
||||
// Definitions by: newclear <https://github.com/newclear>
|
||||
// Definitions: https://github.com/newclear/DefinitelyTyped
|
||||
|
||||
declare module "traverse" {
|
||||
interface Traverse {
|
||||
get(paths: string[]): any;
|
||||
has(paths: string[]): boolean;
|
||||
set(paths: string[], value: any): any;
|
||||
map(cb: (v: any) => void): any;
|
||||
forEach(cb: (v: any) => void): any;
|
||||
reduce(cb: (acc: any, v: any) => void, init?: any): any;
|
||||
paths(): string[];
|
||||
nodes(): any[];
|
||||
clone(): any;
|
||||
}
|
||||
|
||||
function traverse(obj: any): Traverse;
|
||||
|
||||
export = traverse;
|
||||
}
|
||||
+2
-1
@@ -7,5 +7,6 @@
|
||||
|
||||
declare module "vinyl-source-stream" {
|
||||
function vinylSourceStream(filename: string): NodeJS.ReadWriteStream;
|
||||
namespace vinylSourceStream {}
|
||||
export = vinylSourceStream;
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
@@ -174,6 +174,9 @@ interface NavigatorGetUserMedia {
|
||||
errorCallback: (error: MediaStreamError) => void): void;
|
||||
}
|
||||
|
||||
// to use with adapter.js, see: https://github.com/webrtc/adapter
|
||||
declare var getUserMedia: NavigatorGetUserMedia;
|
||||
|
||||
interface Navigator {
|
||||
getUserMedia: NavigatorGetUserMedia;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/// <reference path="MediaStream.d.ts" />
|
||||
/// <reference path="MediaStream.d.ts" />
|
||||
/// <reference path="RTCPeerConnection.d.ts" />
|
||||
|
||||
var config: RTCConfiguration =
|
||||
{ iceServers: [{ url: "stun.l.google.com:19302" }] };
|
||||
{ iceServers: [{ urls: "stun.l.google.com:19302" }] };
|
||||
var constraints: RTCMediaConstraints =
|
||||
{ mandatory: { offerToReceiveAudio: true, offerToReceiveVideo: true } };
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -29,7 +29,7 @@ declare var RTCConfiguration: {
|
||||
};
|
||||
|
||||
interface RTCIceServer {
|
||||
url: string;
|
||||
urls: string;
|
||||
credential?: string;
|
||||
}
|
||||
declare var RTCIceServer: {
|
||||
|
||||
Vendored
+19
-2
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Winreg v0.0.15
|
||||
// Type definitions for Winreg v0.0.16
|
||||
// Project: https://github.com/fresc81/node-winreg/
|
||||
// Definitions by: RX14 <https://github.com/RX14>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -122,6 +122,12 @@ interface Winreg {
|
||||
*/
|
||||
path: string;
|
||||
|
||||
/**
|
||||
* Architecture this key belongs to.
|
||||
* @readonly
|
||||
*/
|
||||
arch: string;
|
||||
|
||||
/**
|
||||
* A new Winreg instance of the parent key.
|
||||
* @readonly
|
||||
@@ -198,7 +204,12 @@ declare namespace Winreg {
|
||||
/**
|
||||
* Optional key, default is the root key.
|
||||
*/
|
||||
key?: String;
|
||||
key?: string;
|
||||
|
||||
/**
|
||||
* Optional architecture of the registry.
|
||||
*/
|
||||
arch?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -240,6 +251,12 @@ declare namespace Winreg {
|
||||
* @readonly
|
||||
*/
|
||||
value: string;
|
||||
|
||||
/**
|
||||
* Architecture this value belongs to.
|
||||
* @readonly
|
||||
*/
|
||||
arch: string;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user