SQL Operations Studio Public Preview 1 (0.23) release source code

This commit is contained in:
Karl Burtram
2017-11-09 14:30:27 -08:00
parent b88ecb8d93
commit 3cdac41339
8829 changed files with 759707 additions and 286 deletions
+9
View File
@@ -0,0 +1,9 @@
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
// All OSS in this folder is development time only
[{
"name": "definitelytyped",
"repositoryURL": "https://github.com/DefinitelyTyped/DefinitelyTyped",
"license": "MIT",
"isDev": true
}]
+5
View File
@@ -0,0 +1,5 @@
declare module 'ansi-regex' {
function result(): RegExp;
module result { }
export = result;
}
+66
View File
@@ -0,0 +1,66 @@
/**
* The singleton meta class for the default client of the client. This class is used to setup/start and configure
* the auto-collection behavior of the application insights module.
*/
declare module ApplicationInsights {
var client: any;
/**
* Initializes a client with the given instrumentation key, if this is not specified, the value will be
* read from the environment variable APPINSIGHTS_INSTRUMENTATIONKEY
* @returns {ApplicationInsights/Client} a new client
*/
function getClient(instrumentationKey?: string): any /*Client*/;
/**
* Initializes the default client of the client and sets the default configuration
* @param instrumentationKey the instrumentation key to use. Optional, if this is not specified, the value will be
* read from the environment variable APPINSIGHTS_INSTRUMENTATIONKEY
* @returns {ApplicationInsights} this class
*/
function setup(instrumentationKey?: string): typeof ApplicationInsights;
/**
* Starts automatic collection of telemetry. Prior to calling start no telemetry will be collected
* @returns {ApplicationInsights} this class
*/
function start(): typeof ApplicationInsights;
/**
* Sets the state of console tracking (enabled by default)
* @param value if true console activity will be sent to Application Insights
* @returns {ApplicationInsights} this class
*/
function setAutoCollectConsole(value: boolean): typeof ApplicationInsights;
/**
* Sets the state of exception tracking (enabled by default)
* @param value if true uncaught exceptions will be sent to Application Insights
* @returns {ApplicationInsights} this class
*/
function setAutoCollectExceptions(value: boolean): typeof ApplicationInsights;
/**
* Sets the state of performance tracking (enabled by default)
* @param value if true performance counters will be collected every second and sent to Application Insights
* @returns {ApplicationInsights} this class
*/
function setAutoCollectPerformance(value: boolean): typeof ApplicationInsights;
/**
* Sets the state of request tracking (enabled by default)
* @param value if true requests will be sent to Application Insights
* @returns {ApplicationInsights} this class
*/
function setAutoCollectRequests(value: boolean): typeof ApplicationInsights;
/**
* Sets the state of enabling offline mode to cache event when client is offline (disabled by default)
* @param value if true events that happen while client is offline will be cahced on disk,
* client will retry to send events when back online
* @returns {ApplicationInsights} this class
*/
function setOfflineMode(value: boolean): typeof ApplicationInsights;
/**
* Enables verbose debug logging
* @returns {ApplicationInsights} this class
*/
function enableVerboseLogging(): typeof ApplicationInsights;
}
declare module 'applicationinsights' {
export = ApplicationInsights;
}
+124
View File
@@ -0,0 +1,124 @@
// Generated by typings
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/e94e9a86308b7306bb74a973c4e18f37895f7298/bootstrap/index.d.ts
interface ModalOptions {
backdrop?: boolean|string;
keyboard?: boolean;
show?: boolean;
remote?: string;
}
interface ModalOptionsBackdropString {
backdrop?: string; // for "static"
keyboard?: boolean;
show?: boolean;
remote?: string;
}
interface ScrollSpyOptions {
offset?: number;
target?: string;
}
interface TooltipOptions {
animation?: boolean;
html?: boolean;
placement?: string | Function;
selector?: string;
title?: string | Function;
trigger?: string;
template?: string;
delay?: number | Object;
container?: string | boolean;
viewport?: string | Function | Object;
}
interface PopoverOptions {
animation?: boolean;
html?: boolean;
placement?: string | Function;
selector?: string;
trigger?: string;
title?: string | Function;
template?: string;
content?: any;
delay?: number | Object;
container?: string | boolean;
viewport?: string | Function | Object;
}
interface CollapseOptions {
parent?: any;
toggle?: boolean;
}
interface CarouselOptions {
interval?: number;
pause?: string;
wrap?: boolean;
keybord?: boolean;
}
interface TypeaheadOptions {
source?: any;
items?: number;
minLength?: number;
matcher?: (item: any) => boolean;
sorter?: (items: any[]) => any[];
updater?: (item: any) => any;
highlighter?: (item: any) => string;
}
interface AffixOptions {
offset?: number | Function | Object;
target?: any;
}
interface TransitionEventNames {
end: string;
}
interface JQuery {
modal(options?: ModalOptions): JQuery;
modal(options?: ModalOptionsBackdropString): JQuery;
modal(command: string): JQuery;
dropdown(): JQuery;
dropdown(command: string): JQuery;
scrollspy(command: string): JQuery;
scrollspy(options?: ScrollSpyOptions): JQuery;
tab(): JQuery;
tab(command: string): JQuery;
tooltip(options?: TooltipOptions): JQuery;
tooltip(command: string): JQuery;
popover(options?: PopoverOptions): JQuery;
popover(command: string): JQuery;
alert(): JQuery;
alert(command: string): JQuery;
button(): JQuery;
button(command: string): JQuery;
collapse(options?: CollapseOptions): JQuery;
collapse(command: string): JQuery;
carousel(options?: CarouselOptions): JQuery;
carousel(command: string): JQuery;
typeahead(options?: TypeaheadOptions): JQuery;
affix(options?: AffixOptions): JQuery;
emulateTransitionEnd(duration: number): JQuery;
}
interface JQuerySupport {
transition: boolean | TransitionEventNames;
}
declare module "bootstrap" {
}
+88
View File
@@ -0,0 +1,88 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'chokidar' {
/**
* takes paths to be watched recursively and options
*/
export function watch(paths: string, options: IOptions): FSWatcher;
export interface IOptions {
/**
* (regexp or function) files to be ignored. This function or regexp is tested against the whole path, not just filename.
* If it is a function with two arguments, it gets called twice per path - once with a single argument (the path), second time with two arguments (the path and the fs.Stats object of that path).
*/
ignored?: any;
/**
* (default: false). Indicates whether the process should continue to run as long as files are being watched.
*/
persistent?: boolean;
/**
* (default: false). Indicates whether to watch files that don't have read permissions.
*/
ignorePermissionErrors?: boolean;
/**
* (default: false). Indicates whether chokidar should ignore the initial add events or not.
*/
ignoreInitial?: boolean;
/**
* (default: 100). Interval of file system polling.
*/
interval?: number;
/**
* (default: 300). Interval of file system polling for binary files (see extensions in src/is-binary).
*/
binaryInterval?: number;
/**
* (default: false on Windows, true on Linux and OS X). Whether to use fs.watchFile (backed by polling), or fs.watch. If polling leads to high CPU utilization, consider setting this to false.
*/
usePolling?: boolean;
/**
* (default: true on OS X). Whether to use the fsevents watching interface if available. When set to true explicitly and fsevents is available this supercedes the usePolling setting. When set to false on OS X, usePolling: true becomes the default.
*/
useFsEvents?: boolean;
/**
* (default: true). When false, only the symlinks themselves will be watched for changes instead of following the link references and bubbling events through the link's path.
*/
followSymlinks?: boolean;
/**
* (default: false). If set to true then the strings passed to .watch() and .add() are treated as literal path names, even if they look like globs.
*/
disableGlobbing?: boolean;
}
export interface FSWatcher {
add(fileDirOrGlob: string): void;
add(filesDirsOrGlobs: Array<string>): void;
unwatch(fileDirOrGlob: string): void;
unwatch(filesDirsOrGlobs: Array<string>): void;
/**
* Listen for an FS event. Available events: add, addDir, change, unlink, unlinkDir, error. Additionally all is available which gets emitted for every non-error event.
*/
on(event: string, clb: (type: string, path: string) => void): void;
on(event: string, clb: (error: Error) => void): void;
/**
* Removes all listeners from watched files.
*/
close(): void;
options: IOptions;
}
}
+10
View File
@@ -0,0 +1,10 @@
// Type definitions for comment-json 1.1
// Project: https://github.com/kaelzhang/node-comment-json
// Definitions by: Jason Dent <https://github.com/Jason3S>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "comment-json" {
export type Reviver = (k: number | string, v: any) => any;
export function parse(json: string, reviver?: Reviver, removes_comments?: boolean): any;
export function stringify(value: any, replacer?: any, space?: string | number): string;
}
+6038
View File
File diff suppressed because it is too large Load Diff
+8
View File
@@ -0,0 +1,8 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'error-ex' {
export function errorEx(name) : void;
}
+7
View File
@@ -0,0 +1,7 @@
declare module "fast-plist" {
/**
* A very fast plist parser
*/
export function parse(content: string): any;
}
+19
View File
@@ -0,0 +1,19 @@
declare module 'gc-signals' {
export interface GCSignal {
}
/**
* Create a new GC signal. When being garbage collected the passed
* value is stored for later consumption.
*/
export const GCSignal: {
new (id: number): GCSignal;
};
/**
* Consume ids of garbage collected signals.
*/
export function consumeSignals(): number[];
export function onDidGarbageCollectSignals(callback: (ids: number[]) => any): {
dispose(): void;
};
export function trackGarbageCollection(obj: any, id: number): number;
}
+12
View File
@@ -0,0 +1,12 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module getmac {
export function getMac(callback: (error: Error, macAddress: string) => void): void;
}
declare module 'getmac' {
export = getmac;
}
File diff suppressed because it is too large Load Diff
+8
View File
@@ -0,0 +1,8 @@
{
"resolution": "main",
"tree": {
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/3c56e866d6edd234416a92c3d35c15ccd7fe6b72/core-js/index.d.ts",
"raw": "registry:dt/core-js#0.9.7+20161130133742",
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/3c56e866d6edd234416a92c3d35c15ccd7fe6b72/core-js/index.d.ts"
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,8 @@
{
"resolution": "main",
"tree": {
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/ead8376ca80553332af7872f9fe723c6fbb4e412/jqueryui/index.d.ts",
"raw": "registry:dt/jqueryui#1.11.0+20161214061125",
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/ead8376ca80553332af7872f9fe723c6fbb4e412/jqueryui/index.d.ts"
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,8 @@
{
"resolution": "main",
"tree": {
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/5607f54defce88bc52a0440288f434cafffdb5ce/slickgrid/index.d.ts",
"raw": "registry:dt/slickgrid#2.1.0+20160818215330",
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/5607f54defce88bc52a0440288f434cafffdb5ce/slickgrid/index.d.ts"
}
}
+335
View File
@@ -0,0 +1,335 @@
// Generated by typings
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/968736e629cc8052c98c8d5e892e73e0679bec6c/systemjs/index.d.ts
declare namespace SystemJSLoader {
type ModulesList = { [bundleName: string]: Array<string> };
type PackageList<T> = { [packageName: string]: T };
/**
* The following module formats are supported:
*
* - esm: ECMAScript Module (previously referred to as es6)
* - cjs: CommonJS
* - amd: Asynchronous Module Definition
* - global: Global shim module format
* - register: System.register or System.registerDynamic compatibility module format
*
*/
type ModuleFormat = "esm" | "cjs" | "amd" | "global" | "register";
/**
* Sets the module name of the transpiler to be used for loading ES6 modules.
* Represents a module name for System.import that must resolve to either Traceur, Babel or TypeScript.
* When set to traceur, babel or typescript, loading will be automatically configured as far as possible.
*/
type Transpiler = "plugin-traceur" | "plugin-babel" | "plugin-typescript" | "traceur" | "babel" | "typescript" | boolean;
type ConfigMap = PackageList<string>;
type ConfigMeta = PackageList<MetaConfig>;
interface MetaConfig {
/**
* Sets in what format the module is loaded.
*/
format?: ModuleFormat;
/**
* For the global format, when automatic detection of exports is not enough, a custom exports meta value can be set.
* This tells the loader what global name to use as the module's export value.
*/
exports?: string;
/**
* Dependencies to load before this module. Goes through regular paths and map normalization.
* Only supported for the cjs, amd and global formats.
*/
deps?: Array<string>;
/**
* A map of global names to module names that should be defined only for the execution of this module.
* Enables use of legacy code that expects certain globals to be present.
* Referenced modules automatically becomes dependencies. Only supported for the cjs and global formats.
*/
globals?: string;
/**
* Set a loader for this meta path.
*/
loader?: string;
/**
* For plugin transpilers to set the source map of their transpilation.
*/
sourceMap?: any;
/**
* Load the module using <script> tag injection.
*/
scriptLoad?: boolean;
/**
* The nonce attribute to use when loading the script as a way to enable CSP.
* This should correspond to the "nonce-" attribute set in the Content-Security-Policy header.
*/
nonce?: string;
/**
* The subresource integrity attribute corresponding to the script integrity,
* describing the expected hash of the final code to be executed.
* For example, System.config({ meta: { 'src/example.js': { integrity: 'sha256-e3b0c44...' }});
* would throw an error if the translated source of src/example.js doesn't match the expected hash.
*/
integrity?: string;
/**
* When scripts are loaded from a different domain (e.g. CDN) the global error handler (window.onerror)
* has very limited information about errors to prevent unintended leaking. In order to mitigate this,
* the <script> tags need to set crossorigin attribute and the server needs to enable CORS.
* The valid values are "anonymous" and "use-credentials".
*/
crossOrigin?: string;
/**
* When loading a module that is not an ECMAScript Module, we set the module as the default export,
* but then also iterate the module object and copy named exports for it a well.
* Use this option to disable this iteration and copying of the exports.
*/
esmExports?: boolean;
/**
* To ignore resources that shouldn't be traced as part of the build.
* Use with the SystemJS Builder. (https://github.com/systemjs/builder#ignore-resources)
*/
build?: boolean;
}
interface PackageConfig {
/**
* The main entry point of the package (so import 'local/package' is equivalent to import 'local/package/index.js')
*/
main?: string;
/**
* The module format of the package. See Module Formats.
*/
format?: ModuleFormat;
/**
* The default extension to add to modules requested within the package. Takes preference over defaultJSExtensions.
* Can be set to defaultExtension: false to optionally opt-out of extension-adding when defaultJSExtensions is enabled.
*/
defaultExtension?: boolean | string;
/**
* Local and relative map configurations scoped to the package. Apply for subpaths as well.
*/
map?: ConfigMap;
/**
* Module meta provides an API for SystemJS to understand how to load modules correctly.
* Package-scoped meta configuration with wildcard support. Modules are subpaths within the package path.
* This also provides an opt-out mechanism for defaultExtension, by adding modules here that should skip extension adding.
*/
meta?: ConfigMeta;
}
interface TraceurOptions {
properTailCalls?: boolean;
symbols?: boolean;
arrayComprehension?: boolean;
asyncFunctions?: boolean;
asyncGenerators?: any;
forOn?: boolean;
generatorComprehension?: boolean;
}
interface Config {
/**
* For custom config names
*/
[customName: string]: any;
/**
* The baseURL provides a special mechanism for loading modules relative to a standard reference URL.
*/
baseURL?: string;
/**
* Set the Babel transpiler options when System.transpiler is set to babel.
*/
//TODO: Import BabelCore.TransformOptions
babelOptions?: any;
/**
* undles allow a collection of modules to be downloaded together as a package whenever any module from that collection is requested.
* Useful for splitting an application into sub-modules for production. Use with the SystemJS Builder.
*/
bundles?: ModulesList;
/**
* Backwards-compatibility mode for the loader to automatically add '.js' extensions when not present to module requests.
* This allows code written for SystemJS 0.16 or less to work easily in the latest version:
*/
defaultJSExtensions?: boolean;
/**
* An alternative to bundling providing a solution to the latency issue of progressively loading dependencies.
* When a module specified in depCache is loaded, asynchronous loading of its pre-cached dependency list begins in parallel.
*/
depCache?: ModulesList;
/**
* The map option is similar to paths, but acts very early in the normalization process.
* It allows you to map a module alias to a location or package:
*/
map?: ConfigMap;
/**
* Module meta provides an API for SystemJS to understand how to load modules correctly.
* Meta is how we set the module format of a module, or know how to shim dependencies of a global script.
*/
meta?: ConfigMeta;
/**
* Packages provide a convenience for setting meta and map configuration that is specific to a common path.
* In addition packages allow for setting contextual map configuration which only applies within the package itself.
* This allows for full dependency encapsulation without always needing to have all dependencies in a global namespace.
*/
packages?: PackageList<PackageConfig>;
/**
* The ES6 Module Loader paths implementation, applied after normalization and supporting subpaths via wildcards.
* It is usually advisable to use map configuration over paths unless you need strict control over normalized module names.
*/
paths?: PackageList<string>;
/**
* Set the Traceur compilation options.
*/
traceurOptions?: TraceurOptions;
/**
* Sets the module name of the transpiler to be used for loading ES6 modules.
*/
transpiler?: Transpiler;
trace?: boolean;
/**
* Sets the TypeScript transpiler options.
*/
//TODO: Import Typescript.CompilerOptions
typescriptOptions?: any;
}
interface SystemJSSystemFields {
env: string;
loaderErrorStack: boolean;
packageConfigPaths: Array<string>;
pluginFirst: boolean;
version: string;
warnings: boolean;
}
interface System extends Config, SystemJSSystemFields {
/**
* For backwards-compatibility with AMD environments, set window.define = System.amdDefine.
*/
amdDefine: Function;
/**
* For backwards-compatibility with AMD environments, set window.require = System.amdRequire.
*/
amdRequire: Function;
/**
* SystemJS configuration helper function.
* Once SystemJS has loaded, configuration can be set on SystemJS by using the configuration function System.config.
*/
config(config: Config): void;
/**
* This represents the System base class, which can be extended or reinstantiated to create a custom System instance.
*/
constructor: new () => System;
/**
* Deletes a module from the registry by normalized name.
*/
delete(moduleName: string): void;
/**
* Returns a module from the registry by normalized name.
*/
get(moduleName: string): any;
get<TModule>(moduleName: string): TModule;
/**
* Returns whether a given module exists in the registry by normalized module name.
*/
has(moduleName: string): boolean;
/**
* Loads a module by name taking an optional normalized parent name argument.
* Promise resolves to the module value.
*/
import(moduleName: string, normalizedParentName?: string): Promise<any>;
import<TModule>(moduleName: string, normalizedParentName?: string): Promise<TModule>;
/**
* Given a plain JavaScript object, return an equivalent Module object.
* Useful when writing a custom instantiate hook or using System.set.
*/
newModule(object: any): any;
newModule<TModule>(object: any): TModule;
/**
* Declaration function for defining modules of the System.register polyfill module format.
*/
register(name: string, deps: Array<string>, declare: Function): void;
register(deps: Array<string>, declare: Function): void;
/**
* Companion module format to System.register for non-ES6 modules.
* Provides a <script>-injection-compatible module format that any CommonJS or Global module can be converted into for CSP compatibility.
*/
registerDynamic(name: string, deps: Array<string>, executingRequire: boolean, declare: Function): void;
registerDynamic(deps: Array<string>, executingRequire: boolean, declare: Function): void;
/**
* Sets a module into the registry directly and synchronously.
* Typically used along with System.newModule to create a valid Module object:
*/
set(moduleName: string, module: any): void;
/**
* In CommonJS environments, SystemJS will substitute the global require as needed by the module format being
* loaded to ensure the correct detection paths in loaded code.
* The CommonJS require can be recovered within these modules from System._nodeRequire.
*/
_nodeRequire: Function;
/**
* Modules list available only with trace=true
*/
loads: PackageList<any>;
}
}
declare var SystemJS: SystemJSLoader.System;
declare var __moduleName: string;
/**
* @deprecated use SystemJS https://github.com/systemjs/systemjs/releases/tag/0.19.10
*/
declare var System: SystemJSLoader.System;
declare module "systemjs" {
import systemJSLoader = SystemJSLoader;
let system: systemJSLoader.System;
export = system;
}
@@ -0,0 +1,8 @@
{
"resolution": "main",
"tree": {
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/968736e629cc8052c98c8d5e892e73e0679bec6c/systemjs/index.d.ts",
"raw": "registry:dt/systemjs#0.19.29+20161215140219",
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/968736e629cc8052c98c8d5e892e73e0679bec6c/systemjs/index.d.ts"
}
}
+635
View File
@@ -0,0 +1,635 @@
// Generated by typings
// Source: node_modules/typemoq/typemoq.node.d.ts
declare module 'typemoq' {
namespace TypeMoqIntern {
class Consts {
static IMATCH_ID_VALUE: string;
static IMATCH_ID_NAME: string;
static IMATCH_MATCHES_NAME: string;
}
}
namespace TypeMoqIntern {
class CurrentInterceptContext<T> {
call: proxy.IProxyCall<T>;
}
}
namespace TypeMoqIntern {
enum GlobalType {
Class = 0,
Function = 1,
Value = 2,
}
class GlobalMock<T> implements IGlobalMock<T> {
mock: Mock<T>;
private _name;
private _type;
container: Object;
constructor(mock: Mock<T>, _name: string, _type: GlobalType, container: Object);
static ofInstance<U>(instance: U, globalName?: string, container?: Object, behavior?: MockBehavior): GlobalMock<U>;
static ofType<U>(ctor: Ctor<U>, globalName?: string, container?: Object, behavior?: MockBehavior): GlobalMock<U>;
object: T;
name: string;
behavior: MockBehavior;
callBase: boolean;
type: GlobalType;
setup<TResult>(expression: IFunc2<T, TResult>): MethodCallReturn<T, TResult>;
verify<TResult>(expression: IFunc2<T, TResult>, times: Times): void;
verifyAll(): void;
reset(): void;
}
}
namespace TypeMoqIntern.Api {
interface ICallback<T, TResult> {
callback(action: IAction): IReturnsThrows<T, TResult>;
callback(action: IAction1<T>): IReturnsThrows<T, TResult>;
}
}
namespace TypeMoqIntern.Api {
interface IReturns<T, TResult> {
returns(valueFunction: IFuncN<any, TResult>): IReturnsResult<T>;
callBase(): IReturnsResult<T>;
}
interface IReturnsResult<T> extends IVerifies {
}
interface IReturnsThrows<T, TResult> extends IReturns<T, TResult>, IThrows {
}
}
namespace TypeMoqIntern.Api {
interface ISetup<T, TResult> extends ICallback<T, TResult>, IReturnsThrows<T, TResult>, IVerifies {
}
}
namespace TypeMoqIntern.Api {
interface IThrows {
throws<T extends error.Exception>(exception: T): IThrowsResult;
}
interface IThrowsResult extends IVerifies {
}
}
namespace TypeMoqIntern.Api {
interface IUsingResult {
with(action: IAction): void;
}
}
namespace TypeMoqIntern.Api {
interface IVerifies {
verifiable(times?: Times): void;
}
}
namespace TypeMoqIntern {
type Ctor<T> = {
new (): T;
prototype: Object;
};
type CtorWithArgs<T> = {
new (...ctorArgs: any[]): T;
prototype: Object;
};
}
namespace TypeMoqIntern {
type IAction = () => void;
type IAction1<T> = (x: T) => void;
type IActionN<T> = (...x: T[]) => void;
type IFunc1<TResult> = () => TResult;
type IFunc2<T, TResult> = (x: T) => TResult;
type IFuncN<T, TResult> = (...x: T[]) => TResult;
}
namespace TypeMoqIntern {
class PropertyRetriever {
static getOwnEnumerables(obj: any): {
name: string;
desc: PropertyDescriptor;
}[];
static getOwnNonenumerables(obj: any): {
name: string;
desc: PropertyDescriptor;
}[];
static getOwnEnumerablesAndNonenumerables(obj: any): {
name: string;
desc: PropertyDescriptor;
}[];
static getPrototypeEnumerables(obj: any): {
name: string;
desc: PropertyDescriptor;
}[];
static getPrototypeNonenumerables(obj: any): {
name: string;
desc: PropertyDescriptor;
}[];
static getPrototypeEnumerablesAndNonenumerables(obj: any): {
name: string;
desc: PropertyDescriptor;
}[];
static getOwnAndPrototypeEnumerables(obj: any): {
name: string;
desc: PropertyDescriptor;
}[];
static getOwnAndPrototypeNonenumerables(obj: any): {
name: string;
desc: PropertyDescriptor;
}[];
static getOwnAndPrototypeEnumerablesAndNonenumerables(obj: any): {
name: string;
desc: PropertyDescriptor;
}[];
private static _enumerable(obj, prop);
private static _notEnumerable(obj, prop);
private static _enumerableAndNotEnumerable(obj, prop);
private static _getPropertyNames(obj, iterateSelfBool, iteratePrototypeBool, includePropCb);
}
}
namespace TypeMoqIntern {
class Utils {
static getUUID(): string;
static functionName(fun: Object): string;
static conthunktor<U>(ctor: CtorWithArgs<U>, args: any[]): U;
}
}
namespace TypeMoqIntern.Error {
class Exception implements Error {
name: string;
message: string;
constructor(name: string, message?: string);
toString(): string;
}
}
namespace TypeMoqIntern.Error {
enum MockExceptionReason {
NoSetup,
MoreThanOneSetup,
InvalidSetup,
InvalidMatcher,
InvalidProxyArg,
UnknownGlobalType,
VerificationFailed,
}
class MockException extends Exception {
reason: MockExceptionReason;
ctx: any;
constructor(reason: MockExceptionReason, ctx: any, name?: string, message?: string);
toString(): string;
}
}
namespace TypeMoqIntern.Match {
interface IMatch {
___id: string;
___matches(object: Object): boolean;
}
}
namespace TypeMoqIntern.Match {
class MatchAnyObject<T> implements IMatch {
private _ctor;
___id: string;
constructor(_ctor: Ctor<T>);
___matches(object: Object): boolean;
}
class MatchAny implements IMatch {
___id: string;
___matches(object: Object): boolean;
}
class MatchAnyString implements IMatch {
___id: string;
___matches(object: Object): boolean;
}
class MatchAnyNumber implements IMatch {
___id: string;
___matches(object: Object): boolean;
}
}
namespace TypeMoqIntern.Match {
class MatchPred<T> implements IMatch {
private _pred;
___id: string;
constructor(_pred: IFunc2<T, boolean>);
___matches(object: Object): boolean;
}
}
namespace TypeMoqIntern.Match {
class MatchValue<T> implements IMatch {
private _value;
___id: string;
constructor(_value: T);
___matches(object: any): boolean;
}
}
namespace TypeMoqIntern.Proxy {
interface ICallContext {
args: IArguments;
property: IPropertyInfo;
returnValue: any;
invokeBase(): void;
}
}
namespace TypeMoqIntern.Proxy {
interface ICallInterceptor {
intercept(context: ICallContext): void;
}
}
namespace TypeMoqIntern.Proxy {
class MethodInvocation implements ICallContext {
private _property;
private _args;
returnValue: any;
constructor(_property: MethodInfo, _args?: IArguments);
args: IArguments;
property: PropertyInfo;
invokeBase(): void;
}
class ValueGetterInvocation implements ICallContext {
private _property;
returnValue: any;
constructor(_property: PropertyInfo, value: any);
args: IArguments;
property: PropertyInfo;
invokeBase(): void;
}
class ValueSetterInvocation implements ICallContext {
private _property;
private _args;
returnValue: any;
constructor(_property: PropertyInfo, _args: IArguments);
args: IArguments;
property: PropertyInfo;
invokeBase(): void;
}
class MethodGetterInvocation implements ICallContext {
private _property;
private _getter;
returnValue: any;
constructor(_property: PropertyInfo, _getter: () => any);
args: IArguments;
property: PropertyInfo;
invokeBase(): void;
}
class MethodSetterInvocation implements ICallContext {
private _property;
private _setter;
private _args;
returnValue: any;
constructor(_property: PropertyInfo, _setter: (v: any) => void, _args: IArguments);
args: IArguments;
property: PropertyInfo;
invokeBase(): void;
}
class MethodInfo implements IPropertyInfo {
obj: any;
name: string;
constructor(obj: any, name: string);
toFunc: Function;
}
class PropertyInfo implements IPropertyInfo {
obj: Object;
name: string;
constructor(obj: Object, name: string);
}
interface IPropertyInfo {
obj: Object;
name: string;
}
}
namespace TypeMoqIntern.Proxy {
interface IProxyCall<T> {
id: string;
setupExpression: IAction1<T>;
setupCall: proxy.ICallContext;
isVerifiable: boolean;
expectedCallCount: Times;
isInvoked: boolean;
callCount: number;
evaluatedSuccessfully(): void;
matches(call: proxy.ICallContext): boolean;
execute(call: proxy.ICallContext): void;
}
}
namespace TypeMoqIntern.Proxy {
interface IProxyFactory {
createProxy<T>(interceptor: ICallInterceptor, instance: T): T;
}
}
namespace TypeMoqIntern.Proxy {
class Proxy<T> {
constructor(interceptor: ICallInterceptor, instance: T);
static of<U>(instance: U, interceptor: ICallInterceptor): any;
private static check<U>(instance);
private check<U>(instance);
private static checkNotNull<U>(instance);
private static isPrimitiveObject(obj);
private defineMethodProxy(that, interceptor, instance, propName, propDesc?);
private static methodProxyValue<U>(interceptor, instance, propName);
private defineValuePropertyProxy(that, interceptor, instance, propName, propValue, propDesc?);
private defineGetSetPropertyProxy(that, interceptor, instance, propName, get?, set?, propDesc?);
private defineProperty(obj, name, desc);
}
}
namespace TypeMoqIntern.Proxy {
class ProxyFactory implements IProxyFactory {
createProxy<T>(interceptor: ICallInterceptor, instance: T): T;
}
}
import api = TypeMoqIntern.Api;
import error = TypeMoqIntern.Error;
import match = TypeMoqIntern.Match;
import proxy = TypeMoqIntern.Proxy;
namespace TypeMoqIntern {
class GlobalScope implements api.IUsingResult {
private _args;
constructor(_args: IGlobalMock<any>[]);
static using(...args: IGlobalMock<any>[]): api.IUsingResult;
with(action: IAction): void;
}
}
namespace TypeMoqIntern {
interface IGlobalMock<T> extends IMock<T> {
mock: Mock<T>;
type: GlobalType;
container: Object;
}
}
namespace TypeMoqIntern {
interface IMock<T> {
object: T;
name: string;
behavior: MockBehavior;
callBase: boolean;
setup<TResult>(expression: IFunc2<T, TResult>): MethodCallReturn<T, TResult>;
verify<TResult>(expression: IFunc2<T, TResult>, times: Times): void;
verifyAll(): void;
reset(): void;
}
}
namespace TypeMoqIntern {
enum InterceptionAction {
Continue = 0,
Stop = 1,
}
interface IInterceptStrategy<T> {
handleIntercept(invocation: proxy.ICallContext, ctx: InterceptorContext<T>, localCtx: CurrentInterceptContext<T>): InterceptionAction;
}
class InterceptorContext<T> {
behavior: MockBehavior;
mock: IMock<T>;
private _actualInvocations;
private _orderedCalls;
constructor(behavior: MockBehavior, mock: IMock<T>);
addInvocation(invocation: proxy.ICallContext): void;
actualInvocations(): proxy.ICallContext[];
clearInvocations(): void;
addOrderedCall(call: proxy.IProxyCall<T>): void;
removeOrderedCall(call: proxy.IProxyCall<T>): void;
orderedCalls(): proxy.IProxyCall<T>[];
}
}
namespace TypeMoqIntern {
class InterceptorExecute<T> implements Proxy.ICallInterceptor {
private _interceptorContext;
constructor(behavior: MockBehavior, mock: IMock<T>);
interceptorContext: InterceptorContext<T>;
intercept(invocation: proxy.ICallContext): void;
addCall(call: proxy.IProxyCall<T>): void;
verifyCall<T>(call: proxy.IProxyCall<T>, times: Times): void;
verify(): void;
private interceptionStrategies();
private throwVerifyCallException(call, times);
}
}
namespace TypeMoqIntern {
class InterceptorSetup<T> implements Proxy.ICallInterceptor {
private _interceptedCall;
interceptedCall: proxy.ICallContext;
intercept(invocation: proxy.ICallContext): void;
}
}
namespace TypeMoqIntern {
class AddActualInvocation<T> implements IInterceptStrategy<T> {
handleIntercept(invocation: proxy.ICallContext, ctx: InterceptorContext<T>, localCtx: CurrentInterceptContext<T>): InterceptionAction;
}
class ExtractProxyCall<T> implements IInterceptStrategy<T> {
handleIntercept(invocation: proxy.ICallContext, ctx: InterceptorContext<T>, localCtx: CurrentInterceptContext<T>): InterceptionAction;
}
class ExecuteCall<T> implements IInterceptStrategy<T> {
private _ctx;
handleIntercept(invocation: proxy.ICallContext, ctx: InterceptorContext<T>, localCtx: CurrentInterceptContext<T>): InterceptionAction;
}
class InvokeBase<T> implements IInterceptStrategy<T> {
handleIntercept(invocation: proxy.ICallContext, ctx: InterceptorContext<T>, localCtx: CurrentInterceptContext<T>): InterceptionAction;
}
class HandleMockRecursion<T> implements IInterceptStrategy<T> {
handleIntercept(invocation: proxy.ICallContext, ctx: InterceptorContext<T>, localCtx: CurrentInterceptContext<T>): InterceptionAction;
}
}
namespace TypeMoqIntern {
class It {
static isValue<T>(x: T): T;
static isAnyObject<T>(x: Ctor<T>): T;
static isAny(): any;
static isAnyString(): string;
static isAnyNumber(): number;
static is<T>(predicate: IFunc2<T, boolean>): T;
}
}
namespace TypeMoqIntern {
class MethodCall<T, TResult> implements proxy.IProxyCall<T>, api.IVerifies {
mock: Mock<T>;
private _setupExpression;
protected _id: string;
protected _setupCall: proxy.ICallContext;
protected _setupCallback: IAction;
protected _isVerifiable: boolean;
protected _expectedCallCount: Times;
protected _isInvoked: boolean;
protected _callCount: number;
protected _thrownException: error.Exception;
protected _evaluatedSuccessfully: boolean;
constructor(mock: Mock<T>, _setupExpression: IFunc2<T, TResult>);
private generateId();
private transformToMatchers(args);
id: string;
setupExpression: IAction1<T>;
setupCall: proxy.ICallContext;
isVerifiable: boolean;
expectedCallCount: Times;
isInvoked: boolean;
callCount: number;
evaluatedSuccessfully(): void;
matches(call: proxy.ICallContext): boolean;
execute(call: proxy.ICallContext): void;
verifiable(times?: Times): void;
}
}
namespace TypeMoqIntern {
class MethodCallReturn<T, TResult> extends MethodCall<T, TResult> implements api.ISetup<T, TResult>, api.IReturnsResult<T> {
protected _returnValueFunc: IFuncN<any, TResult>;
hasReturnValue: boolean;
protected _callBase: boolean;
constructor(mock: Mock<T>, setupExpression: IFunc2<T, TResult>);
execute(call: proxy.ICallContext): void;
callback(action: IActionN<any>): api.IReturnsThrows<T, TResult>;
throws(exception: Error): api.IThrowsResult;
returns(valueFunc: IFuncN<any, TResult>): api.IReturnsResult<T>;
callBase(): api.IReturnsResult<T>;
}
}
namespace TypeMoqIntern {
enum MockBehavior {
Loose = 0,
Strict = 1,
}
class Mock<T> implements IMock<T> {
instance: T;
private _behavior;
static proxyFactory: proxy.IProxyFactory;
private _id;
private _name;
private _interceptor;
private _proxy;
private _callBase;
constructor(instance: T, _behavior?: MockBehavior);
private init();
static ofInstance<U>(instance: U, behavior?: MockBehavior): Mock<U>;
static ofType<U>(ctor: CtorWithArgs<U>, behavior?: MockBehavior, ...ctorArgs: any[]): Mock<U>;
static ofType2<U>(ctor: CtorWithArgs<U>, ctorArgs: any[], behavior?: MockBehavior): Mock<U>;
object: T;
name: string;
behavior: MockBehavior;
callBase: boolean;
private generateId();
private getNameOf(instance);
setup<TResult>(expression: IFunc2<T, TResult>): MethodCallReturn<T, TResult>;
verify<TResult>(expression: IFunc2<T, TResult>, times: Times): void;
verifyAll(): void;
reset(): void;
}
}
namespace TypeMoqIntern {
class Times {
private _condition;
private _from;
private _to;
private static NO_MATCHING_CALLS_EXACTLY_N_TIMES;
private static NO_MATCHING_CALLS_AT_LEAST_ONCE;
private static NO_MATCHING_CALLS_AT_MOST_ONCE;
private _lastCallCount;
private _failMessage;
constructor(_condition: IFunc2<number, boolean>, _from: number, _to: number, failMessage: string);
failMessage: string;
verify(callCount: number): boolean;
static exactly(n: number): Times;
static never(): Times;
static once(): Times;
static atLeastOnce(): Times;
static atMostOnce(): Times;
}
}
interface ITypeMoq {
Mock: typeof TypeMoqIntern.Mock;
MockBehavior: typeof TypeMoqIntern.MockBehavior;
It: typeof TypeMoqIntern.It;
Times: typeof TypeMoqIntern.Times;
GlobalMock: typeof TypeMoqIntern.GlobalMock;
GlobalScope: typeof TypeMoqIntern.GlobalScope;
MockException: typeof TypeMoqIntern.Error.MockException;
}
module TypeMoq {
export import Mock = TypeMoqIntern.Mock;
export import MockBehavior = TypeMoqIntern.MockBehavior;
export import It = TypeMoqIntern.It;
export import Times = TypeMoqIntern.Times;
export import GlobalMock = TypeMoqIntern.GlobalMock;
export import GlobalScope = TypeMoqIntern.GlobalScope;
export import MockException = TypeMoqIntern.Error.MockException;
}
let typemoq: ITypeMoq;
//# sourceMappingURL=output.d.ts.map
export = TypeMoq;
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,8 @@
{
"resolution": "main",
"tree": {
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7f8c53f300bb183bd496427f0f955638b1311133/underscore/underscore.d.ts",
"raw": "registry:dt/underscore#1.8.3+20161123125004",
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7f8c53f300bb183bd496427f0f955638b1311133/underscore/underscore.d.ts"
}
}
+343
View File
@@ -0,0 +1,343 @@
// Generated by typings
// Source: node_modules/zone.js/dist/zone.js.d.ts
interface Zone {
/**
*
* @returns {Zone} The parent Zone.
*/
parent: Zone;
/**
* @returns {string} The Zone name (useful for debugging)
*/
name: string;
/**
* Returns a value associated with the `key`.
*
* If the current zone does not have a key, the request is delegated to the parent zone. Use
* [ZoneSpec.properties] to configure the set of properties associated with the current zone.
*
* @param key The key to retrieve.
* @returns {any} The value for the key, or `undefined` if not found.
*/
get(key: string): any;
/**
* Returns a Zone which defines a `key`.
*
* Recursively search the parent Zone until a Zone which has a property `key` is found.
*
* @param key The key to use for identification of the returned zone.
* @returns {Zone} The Zone which defines the `key`, `null` if not found.
*/
getZoneWith(key: string): Zone;
/**
* Used to create a child zone.
*
* @param zoneSpec A set of rules which the child zone should follow.
* @returns {Zone} A new child zone.
*/
fork(zoneSpec: ZoneSpec): Zone;
/**
* Wraps a callback function in a new function which will properly restore the current zone upon
* invocation.
*
* The wrapped function will properly forward `this` as well as `arguments` to the `callback`.
*
* Before the function is wrapped the zone can intercept the `callback` by declaring
* [ZoneSpec.onIntercept].
*
* @param callback the function which will be wrapped in the zone.
* @param source A unique debug location of the API being wrapped.
* @returns {function(): *} A function which will invoke the `callback` through [Zone.runGuarded].
*/
wrap(callback: Function, source: string): Function;
/**
* Invokes a function in a given zone.
*
* The invocation of `callback` can be intercepted be declaring [ZoneSpec.onInvoke].
*
* @param callback The function to invoke.
* @param applyThis
* @param applyArgs
* @param source A unique debug location of the API being invoked.
* @returns {any} Value from the `callback` function.
*/
run<T>(callback: Function, applyThis?: any, applyArgs?: any[], source?: string): T;
/**
* Invokes a function in a given zone and catches any exceptions.
*
* Any exceptions thrown will be forwarded to [Zone.HandleError].
*
* The invocation of `callback` can be intercepted be declaring [ZoneSpec.onInvoke]. The
* handling of exceptions can intercepted by declaring [ZoneSpec.handleError].
*
* @param callback The function to invoke.
* @param applyThis
* @param applyArgs
* @param source A unique debug location of the API being invoked.
* @returns {any} Value from the `callback` function.
*/
runGuarded<T>(callback: Function, applyThis?: any, applyArgs?: any[], source?: string): T;
/**
* Execute the Task by restoring the [Zone.currentTask] in the Task's zone.
*
* @param callback
* @param applyThis
* @param applyArgs
* @returns {*}
*/
runTask(task: Task, applyThis?: any, applyArgs?: any): any;
scheduleMicroTask(source: string, callback: Function, data?: TaskData, customSchedule?: (task: Task) => void): MicroTask;
scheduleMacroTask(source: string, callback: Function, data: TaskData, customSchedule: (task: Task) => void, customCancel: (task: Task) => void): MacroTask;
scheduleEventTask(source: string, callback: Function, data: TaskData, customSchedule: (task: Task) => void, customCancel: (task: Task) => void): EventTask;
/**
* Allows the zone to intercept canceling of scheduled Task.
*
* The interception is configured using [ZoneSpec.onCancelTask]. The default canceler invokes
* the [Task.cancelFn].
*
* @param task
* @returns {any}
*/
cancelTask(task: Task): any;
}
interface ZoneType {
/**
* @returns {Zone} Returns the current [Zone]. Returns the current zone. The only way to change
* the current zone is by invoking a run() method, which will update the current zone for the
* duration of the run method callback.
*/
current: Zone;
/**
* @returns {Task} The task associated with the current execution.
*/
currentTask: Task;
/**
* Verify that Zone has been correctly patched. Specifically that Promise is zone aware.
*/
assertZonePatched(): any;
}
/**
* Provides a way to configure the interception of zone events.
*
* Only the `name` property is required (all other are optional).
*/
interface ZoneSpec {
/**
* The name of the zone. Usefull when debugging Zones.
*/
name: string;
/**
* A set of properties to be associated with Zone. Use [Zone.get] to retrive them.
*/
properties?: {
[key: string]: any;
};
/**
* Allows the interception of zone forking.
*
* When the zone is being forked, the request is forwarded to this method for interception.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has beed declared.
* @param targetZone The [Zone] which originally received the request.
* @param zoneSpec The argument passed into the `fork` method.
*/
onFork?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, zoneSpec: ZoneSpec) => Zone;
/**
* Allows interception of the wrapping of the callback.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has beed declared.
* @param targetZone The [Zone] which originally received the request.
* @param delegate The argument passed into the `warp` method.
* @param source The argument passed into the `warp` method.
*/
onIntercept?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, delegate: Function, source: string) => Function;
/**
* Allows interception of the callback invocation.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has beed declared.
* @param targetZone The [Zone] which originally received the request.
* @param delegate The argument passed into the `run` method.
* @param applyThis The argument passed into the `run` method.
* @param applyArgs The argument passed into the `run` method.
* @param source The argument passed into the `run` method.
*/
onInvoke?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, delegate: Function, applyThis: any, applyArgs: any[], source: string) => any;
/**
* Allows interception of the error handling.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has beed declared.
* @param targetZone The [Zone] which originally received the request.
* @param error The argument passed into the `handleError` method.
*/
onHandleError?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, error: any) => boolean;
/**
* Allows interception of task scheduling.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has beed declared.
* @param targetZone The [Zone] which originally received the request.
* @param task The argument passed into the `scheduleTask` method.
*/
onScheduleTask?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, task: Task) => Task;
onInvokeTask?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, task: Task, applyThis: any, applyArgs: any) => any;
/**
* Allows interception of task cancelation.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has beed declared.
* @param targetZone The [Zone] which originally received the request.
* @param task The argument passed into the `cancelTask` method.
*/
onCancelTask?: (parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, task: Task) => any;
/**
* Notifies of changes to the task queue empty status.
*
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
* @param currentZone The current [Zone] where the current interceptor has beed declared.
* @param targetZone The [Zone] which originally received the request.
* @param isEmpty
*/
onHasTask?: (delegate: ZoneDelegate, current: Zone, target: Zone, hasTaskState: HasTaskState) => void;
}
/**
* A delegate when intercepting zone operations.
*
* A ZoneDelegate is needed because a child zone can't simply invoke a method on a parent zone. For
* example a child zone wrap can't just call parent zone wrap. Doing so would create a callback
* which is bound to the parent zone. What we are interested is intercepting the callback before it
* is bound to any zone. Furthermore, we also need to pass the targetZone (zone which received the
* original request) to the delegate.
*
* The ZoneDelegate methods mirror those of Zone with an addition of extra targetZone argument in
* the method signature. (The original Zone which received the request.) Some methods are renamed
* to prevent confusion, because they have slightly different semantics and arguments.
*
* - `wrap` => `intercept`: The `wrap` method delegates to `intercept`. The `wrap` method returns
* a callback which will run in a given zone, where as intercept allows wrapping the callback
* so that additional code can be run before and after, but does not associated the callback
* with the zone.
* - `run` => `invoke`: The `run` method delegates to `invoke` to perform the actual execution of
* the callback. The `run` method switches to new zone; saves and restores the `Zone.current`;
* and optionally performs error handling. The invoke is not responsible for error handling,
* or zone management.
*
* Not every method is usually overwritten in the child zone, for this reason the ZoneDelegate
* stores the closest zone which overwrites this behavior along with the closest ZoneSpec.
*
* NOTE: We have tried to make this API analogous to Event bubbling with target and current
* properties.
*
* Note: The ZoneDelegate treats ZoneSpec as class. This allows the ZoneSpec to use its `this` to
* store internal state.
*/
interface ZoneDelegate {
zone: Zone;
fork(targetZone: Zone, zoneSpec: ZoneSpec): Zone;
intercept(targetZone: Zone, callback: Function, source: string): Function;
invoke(targetZone: Zone, callback: Function, applyThis: any, applyArgs: any[], source: string): any;
handleError(targetZone: Zone, error: any): boolean;
scheduleTask(targetZone: Zone, task: Task): Task;
invokeTask(targetZone: Zone, task: Task, applyThis: any, applyArgs: any): any;
cancelTask(targetZone: Zone, task: Task): any;
hasTask(targetZone: Zone, isEmpty: HasTaskState): void;
}
declare type HasTaskState = {
microTask: boolean;
macroTask: boolean;
eventTask: boolean;
change: TaskType;
};
/**
* Task type: `microTask`, `macroTask`, `eventTask`.
*/
declare type TaskType = string;
/**
*/
interface TaskData {
/**
* A periodic [MacroTask] is such which get automatically rescheduled after it is executed.
*/
isPeriodic?: boolean;
/**
* Delay in milliseconds when the Task will run.
*/
delay?: number;
/**
* identifier returned by the native setTimeout.
*/
handleId?: number;
}
/**
* Represents work which is executed with a clean stack.
*
* Tasks are used in Zones to mark work which is performed on clean stack frame. There are three
* kinds of task. [MicroTask], [MacroTask], and [EventTask].
*
* A JS VM can be modeled as a [MicroTask] queue, [MacroTask] queue, and [EventTask] set.
*
* - [MicroTask] queue represents a set of tasks which are executing right after the current stack
* frame becomes clean and before a VM yield. All [MicroTask]s execute in order of insertion
* before VM yield and the next [MacroTask] is executed.
* - [MacroTask] queue represents a set of tasks which are executed one at a time after each VM
* yield. The queue is order by time, and insertions can happen in any location.
* - [EventTask] is a set of tasks which can at any time be inserted to the end of the [MacroTask]
* queue. This happens when the event fires.
*
*/
interface Task {
/**
* Task type: `microTask`, `macroTask`, `eventTask`.
*/
type: TaskType;
/**
* Debug string representing the API which requested the scheduling of the task.
*/
source: string;
/**
* The Function to be used by the VM on entering the [Task]. This function will delegate to
* [Zone.runTask] and delegate to `callback`.
*/
invoke: Function;
/**
* Function which needs to be executed by the Task after the [Zone.currentTask] has been set to
* the current task.
*/
callback: Function;
/**
* Task specific options associated with the current task. This is passed to the `scheduleFn`.
*/
data: TaskData;
/**
* Represents the default work which needs to be done to schedule the Task by the VM.
*
* A zone may chose to intercept this function and perform its own scheduling.
*/
scheduleFn: (task: Task) => void;
/**
* Represents the default work which needs to be done to un-schedule the Task from the VM. Not all
* Tasks are cancelable, and therefore this method is optional.
*
* A zone may chose to intercept this function and perform its own scheduling.
*/
cancelFn: (task: Task) => void;
/**
* @type {Zone} The zone which will be used to invoke the `callback`. The Zone is captured
* at the time of Task creation.
*/
zone: Zone;
/**
* Number of times the task has been executed, or -1 if canceled.
*/
runCount: number;
}
interface MicroTask extends Task {
}
interface MacroTask extends Task {
}
interface EventTask extends Task {
}
declare const Zone: ZoneType;
+6
View File
@@ -0,0 +1,6 @@
{
"resolution": "main",
"tree": {
"src": "npm:zone.js\\dist\\zone.js.d.ts"
}
}
+8
View File
@@ -0,0 +1,8 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'graceful-fs' {
export function gracefulify(fsModule: any): void;
}
+20
View File
@@ -0,0 +1,20 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'http-proxy-agent' {
interface IHttpProxyAgentOptions {
host: string;
port: number;
auth?: string;
}
class HttpProxyAgent {
constructor(proxy: string);
constructor(opts: IHttpProxyAgentOptions);
}
export = HttpProxyAgent;
}
+24
View File
@@ -0,0 +1,24 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'https-proxy-agent' {
import * as tls from 'tls';
interface IHttpsProxyAgentOptions extends tls.ConnectionOptions {
host: string;
port: number;
auth?: string;
secureProxy?: boolean;
secureEndpoint?: boolean;
}
class HttpsProxyAgent {
constructor(proxy: string);
constructor(opts: IHttpsProxyAgentOptions);
}
export = HttpsProxyAgent;
}
+18
View File
@@ -0,0 +1,18 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// <reference path='./node.d.ts'/>
declare module 'iconv-lite' {
export function decode(buffer: NodeBuffer, encoding: string, options?: any): string;
export function encode(content: string, encoding: string, options?: any): NodeBuffer;
export function encodingExists(encoding: string): boolean;
export function decodeStream(encoding: string): NodeJS.ReadWriteStream;
export function encodeStream(encoding: string): NodeJS.ReadWriteStream;
}
+18
View File
@@ -0,0 +1,18 @@
/// <reference path="globals/core-js/index.d.ts" />
/// <reference path="globals/jqueryui/index.d.ts" />
/// <reference path="globals/slickgrid/index.d.ts" />
/// <reference path="globals/systemjs/index.d.ts" />
/// <reference path="globals/underscore/index.d.ts" />
/// <reference path="globals/zone.js/index.d.ts" />
/// <reference path="modules/@angular/common/index.d.ts" />
/// <reference path="modules/@angular/compiler/index.d.ts" />
/// <reference path="modules/@angular/core/index.d.ts" />
/// <reference path="modules/@angular/forms/index.d.ts" />
/// <reference path="modules/@angular/platform-browser-dynamic/index.d.ts" />
/// <reference path="modules/@angular/platform-browser/index.d.ts" />
/// <reference path="modules/@angular/router/index.d.ts" />
/// <reference path="modules/angular2-grid/index.d.ts" />
/// <reference path="modules/angular2-slickgrid/index.d.ts" />
/// <reference path="modules/html-query-plan/index.d.ts" />
/// <reference path="modules/ng2-charts/index.d.ts" />
/// <reference path="modules/rxjs/index.d.ts" />
+3756
View File
File diff suppressed because it is too large Load Diff
+11
View File
@@ -0,0 +1,11 @@
declare module 'jschardet' {
export interface IDetectedMap {
encoding: string,
confidence: number
}
export function detect(buffer: NodeBuffer): IDetectedMap;
export const Constants: {
MINIMUM_THRESHOLD: number,
}
}
+48
View File
@@ -0,0 +1,48 @@
// Type definitions for keytar 4.0.2
// Project: http://atom.github.io/node-keytar/
// Definitions by: Milan Burda <https://github.com/miniak/>, Brendan Forster <https://github.com/shiftkey/>, Hari Juturu <https://github.com/juturu/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'keytar' {
/**
* Get the stored password for the service and account.
*
* @param service The string service name.
* @param account The string account name.
*
* @returns A promise for the password string.
*/
export function getPassword(service: string, account: string): Promise<string | null>;
/**
* Add the password for the service and account to the keychain.
*
* @param service The string service name.
* @param account The string account name.
* @param password The string password.
*
* @returns A promise for the set password completion.
*/
export function setPassword(service: string, account: string, password: string): Promise<void>;
/**
* Delete the stored password for the service and account.
*
* @param service The string service name.
* @param account The string account name.
*
* @returns A promise for the deletion status. True on success.
*/
export function deletePassword(service: string, account: string): Promise<boolean>;
/**
* Find a password for the service in the keychain.
*
* @param service The string service name.
*
* @returns A promise for the password string.
*/
export function findPassword(service: string): Promise<string | null>;
}
+9
View File
@@ -0,0 +1,9 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
interface ArrayConstructor {
isArray(arg: any): arg is Array<any>;
isArray<T>(arg: any): arg is Array<T>;
}
+35
View File
@@ -0,0 +1,35 @@
// Type definitions for minimist 1.1.3
// Project: https://github.com/substack/minimist
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Necroskillz <https://github.com/Necroskillz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'minimist' {
function minimist(args?: string[], opts?: minimist.Opts): minimist.ParsedArgs;
namespace minimist {
export interface Opts {
// a string or array of strings argument names to always treat as strings
string?: string | string[];
// a string or array of strings to always treat as booleans
boolean?: boolean | string | string[];
// an object mapping string names to strings or arrays of string argument names to use
alias?: { [key: string]: string | string[] };
// an object mapping string argument names to default values
default?: { [key: string]: any };
// when true, populate argv._ with everything after the first non-option
stopEarly?: boolean;
// a function which is invoked with a command line parameter not defined in the opts configuration object.
// If the function returns false, the unknown option is not added to argv
unknown?: (arg: string) => boolean;
// when true, populate argv._ with everything before the -- and argv['--'] with everything after the --
'--'?: boolean;
}
export interface ParsedArgs {
[arg: string]: any;
_: string[];
}
}
export = minimist;
}
+234
View File
@@ -0,0 +1,234 @@
// Type definitions for mocha 2.2.5
// Project: http://mochajs.org/
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>, otiai10 <https://github.com/otiai10>, jt000 <https://github.com/jt000>, Vadim Macagon <https://github.com/enlight>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface MochaSetupOptions {
//milliseconds to wait before considering a test slow
slow?: number;
// timeout in milliseconds
timeout?: number;
// ui name "bdd", "tdd", "exports" etc
ui?: string;
//array of accepted globals
globals?: any[];
// reporter instance (function or string), defaults to `mocha.reporters.Spec`
reporter?: any;
// bail on the first test failure
bail?: boolean;
// ignore global leaks
ignoreLeaks?: boolean;
// grep string or regexp to filter tests with
grep?: any;
}
declare var mocha: Mocha;
declare var describe: Mocha.IContextDefinition;
declare var xdescribe: Mocha.IContextDefinition;
// alias for `describe`
declare var context: Mocha.IContextDefinition;
// alias for `describe`
declare var suite: Mocha.IContextDefinition;
declare var it: Mocha.ITestDefinition;
declare var xit: Mocha.ITestDefinition;
// alias for `it`
declare var test: Mocha.ITestDefinition;
declare var specify: Mocha.ITestDefinition;
// Used with the --delay flag; see https://mochajs.org/#hooks
declare function run(): void;
interface MochaDone {
(error?: any): any;
}
declare function setup(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
declare function teardown(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
declare function suiteSetup(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void;
declare function suiteTeardown(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void;
declare function before(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void;
declare function before(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void;
declare function after(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void;
declare function after(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void;
declare function beforeEach(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
declare function beforeEach(description: string, callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
declare function afterEach(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
declare function afterEach(description: string, callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
declare class Mocha {
currentTest: Mocha.ITestDefinition;
constructor(options?: {
grep?: RegExp;
ui?: string;
reporter?: string;
timeout?: number;
reporterOptions?: any;
slow?: number;
bail?: boolean;
});
/** Setup mocha with the given options. */
setup(options: MochaSetupOptions): Mocha;
bail(value?: boolean): Mocha;
addFile(file: string): Mocha;
/** Sets reporter by name, defaults to "spec". */
reporter(name: string): Mocha;
/** Sets reporter constructor, defaults to mocha.reporters.Spec. */
reporter(reporter: (runner: Mocha.IRunner, options: any) => any): Mocha;
ui(value: string): Mocha;
grep(value: string): Mocha;
grep(value: RegExp): Mocha;
invert(): Mocha;
ignoreLeaks(value: boolean): Mocha;
checkLeaks(): Mocha;
/**
* Function to allow assertion libraries to throw errors directly into mocha.
* This is useful when running tests in a browser because window.onerror will
* only receive the 'message' attribute of the Error.
*/
throwError(error: Error): void;
/** Enables growl support. */
growl(): Mocha;
globals(value: string): Mocha;
globals(values: string[]): Mocha;
useColors(value: boolean): Mocha;
useInlineDiffs(value: boolean): Mocha;
timeout(value: number): Mocha;
slow(value: number): Mocha;
enableTimeouts(value: boolean): Mocha;
asyncOnly(value: boolean): Mocha;
noHighlighting(value: boolean): Mocha;
/** Runs tests and invokes `onComplete()` when finished. */
run(onComplete?: (failures: number) => void): Mocha.IRunner;
}
// merge the Mocha class declaration with a module
declare namespace Mocha {
interface ISuiteCallbackContext {
timeout(ms: number): this;
retries(n: number): this;
slow(ms: number): this;
}
interface IHookCallbackContext {
skip(): this;
timeout(ms: number): this;
[index: string]: any;
}
interface ITestCallbackContext {
skip(): this;
timeout(ms: number): this;
retries(n: number): this;
slow(ms: number): this;
[index: string]: any;
}
/** Partial interface for Mocha's `Runnable` class. */
interface IRunnable {
title: string;
fn: Function;
async: boolean;
sync: boolean;
timedOut: boolean;
timeout(n: number): this;
}
/** Partial interface for Mocha's `Suite` class. */
interface ISuite {
parent: ISuite;
title: string;
fullTitle(): string;
}
/** Partial interface for Mocha's `Test` class. */
interface ITest extends IRunnable {
parent: ISuite;
pending: boolean;
state: 'failed'|'passed'|undefined;
fullTitle(): string;
}
interface IBeforeAndAfterContext extends IHookCallbackContext {
currentTest: ITest;
}
/** Partial interface for Mocha's `Runner` class. */
interface IRunner { }
interface IContextDefinition {
(description: string, callback: (this: ISuiteCallbackContext) => void): ISuite;
only(description: string, callback: (this: ISuiteCallbackContext) => void): ISuite;
skip(description: string, callback: (this: ISuiteCallbackContext) => void): void;
timeout(ms: number): void;
}
interface ITestDefinition {
(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest;
only(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest;
skip(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): void;
timeout(ms: number): void;
state: "failed" | "passed";
}
export module reporters {
export class Base {
stats: {
suites: number;
tests: number;
passes: number;
pending: number;
failures: number;
};
constructor(runner: IRunner);
}
export class Doc extends Base { }
export class Dot extends Base { }
export class HTML extends Base { }
export class HTMLCov extends Base { }
export class JSON extends Base { }
export class JSONCov extends Base { }
export class JSONStream extends Base { }
export class Landing extends Base { }
export class List extends Base { }
export class Markdown extends Base { }
export class Min extends Base { }
export class Nyan extends Base { }
export class Progress extends Base {
/**
* @param options.open String used to indicate the start of the progress bar.
* @param options.complete String used to indicate a complete test on the progress bar.
* @param options.incomplete String used to indicate an incomplete test on the progress bar.
* @param options.close String used to indicate the end of the progress bar.
*/
constructor(runner: IRunner, options?: {
open?: string;
complete?: string;
incomplete?: string;
close?: string;
});
}
export class Spec extends Base { }
export class TAP extends Base { }
export class XUnit extends Base {
constructor(runner: IRunner, options?: any);
}
}
}
declare module "mocha" {
export = Mocha;
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,6 @@
{
"resolution": "main",
"tree": {
"src": "npm:@angular/common/common.d.ts"
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,6 @@
{
"resolution": "main",
"tree": {
"src": "npm:@angular/compiler/compiler.d.ts"
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,6 @@
{
"resolution": "main",
"tree": {
"src": "npm:@angular/core/core.d.ts"
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,6 @@
{
"resolution": "main",
"tree": {
"src": "npm:@angular/forms/forms.d.ts"
}
}
@@ -0,0 +1,113 @@
// Generated by typings
// Source: node_modules/@angular/platform-browser-dynamic/src/platform_providers.d.ts
declare module '~@angular/platform-browser-dynamic/src/platform_providers' {
import { Provider } from '@angular/core';
export const INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: Provider[];
}
declare module '@angular/platform-browser-dynamic/src/platform_providers' {
export * from '~@angular/platform-browser-dynamic/src/platform_providers';
}
// Generated by typings
// Source: node_modules/@angular/platform-browser-dynamic/src/resource_loader/resource_loader_impl.d.ts
declare module '~@angular/platform-browser-dynamic/src/resource_loader/resource_loader_impl' {
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { ResourceLoader } from '@angular/compiler';
export class ResourceLoaderImpl extends ResourceLoader {
get(url: string): Promise<string>;
}
}
declare module '@angular/platform-browser-dynamic/src/resource_loader/resource_loader_impl' {
export * from '~@angular/platform-browser-dynamic/src/resource_loader/resource_loader_impl';
}
// Generated by typings
// Source: node_modules/@angular/platform-browser-dynamic/src/private_export.d.ts
declare module '~@angular/platform-browser-dynamic/src/private_export' {
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
export { INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS } from '~@angular/platform-browser-dynamic/src/platform_providers';
export { ResourceLoaderImpl as ɵResourceLoaderImpl } from '~@angular/platform-browser-dynamic/src/resource_loader/resource_loader_impl';
}
declare module '@angular/platform-browser-dynamic/src/private_export' {
export * from '~@angular/platform-browser-dynamic/src/private_export';
}
// Generated by typings
// Source: node_modules/@angular/platform-browser-dynamic/src/version.d.ts
declare module '~@angular/platform-browser-dynamic/src/version' {
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the common package.
*/
import { Version } from '@angular/core';
/**
* @stable
*/
export const VERSION: Version;
}
declare module '@angular/platform-browser-dynamic/src/version' {
export * from '~@angular/platform-browser-dynamic/src/version';
}
// Generated by typings
// Source: node_modules/@angular/platform-browser-dynamic/src/platform-browser-dynamic.d.ts
declare module '~@angular/platform-browser-dynamic/src/platform-browser-dynamic' {
import { PlatformRef, Provider } from '@angular/core';
export * from '~@angular/platform-browser-dynamic/src/private_export';
export { VERSION } from '~@angular/platform-browser-dynamic/src/version';
/**
* @experimental
*/
export const RESOURCE_CACHE_PROVIDER: Provider[];
/**
* @stable
*/
export const platformBrowserDynamic: (extraProviders?: Provider[] | undefined) => PlatformRef;
}
declare module '@angular/platform-browser-dynamic/src/platform-browser-dynamic' {
export * from '~@angular/platform-browser-dynamic/src/platform-browser-dynamic';
}
// Generated by typings
// Source: node_modules/@angular/platform-browser-dynamic/platform-browser-dynamic.d.ts
declare module '~@angular/platform-browser-dynamic/platform-browser-dynamic' {
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @module
* @description
* Entry point for all public APIs of the platform-browser-dynamic package.
*/
export * from '~@angular/platform-browser-dynamic/src/platform-browser-dynamic';
}
declare module '@angular/platform-browser-dynamic/platform-browser-dynamic' {
export * from '~@angular/platform-browser-dynamic/platform-browser-dynamic';
}
declare module '@angular/platform-browser-dynamic' {
export * from '~@angular/platform-browser-dynamic/platform-browser-dynamic';
}
@@ -0,0 +1,6 @@
{
"resolution": "main",
"tree": {
"src": "npm:@angular/platform-browser-dynamic/platform-browser-dynamic.d.ts"
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,6 @@
{
"resolution": "main",
"tree": {
"src": "npm:@angular/platform-browser/platform-browser.d.ts"
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,6 @@
{
"resolution": "main",
"tree": {
"src": "npm:@angular/router/router.d.ts"
}
}
+369
View File
@@ -0,0 +1,369 @@
// Generated by typings
// Source: node_modules/angular2-grid/directives/NgGrid.d.ts
declare module '~angular2-grid/directives/NgGrid' {
import { ElementRef, Renderer, EventEmitter, ComponentFactoryResolver, KeyValueDiffers, OnInit, OnDestroy, DoCheck, ViewContainerRef } from '@angular/core';
import { NgGridConfig, NgGridItemEvent, NgGridItemPosition, NgGridItemSize } from '~angular2-grid/interfaces/INgGrid';
import { NgGridItem } from '~angular2-grid/directives/NgGridItem';
export class NgGrid implements OnInit, DoCheck, OnDestroy {
private _differs;
private _ngEl;
private _renderer;
private componentFactoryResolver;
private _containerRef;
onDragStart: EventEmitter<NgGridItem>;
onDrag: EventEmitter<NgGridItem>;
onDragStop: EventEmitter<NgGridItem>;
onResizeStart: EventEmitter<NgGridItem>;
onResize: EventEmitter<NgGridItem>;
onResizeStop: EventEmitter<NgGridItem>;
onItemChange: EventEmitter<Array<NgGridItemEvent>>;
colWidth: number;
rowHeight: number;
minCols: number;
minRows: number;
marginTop: number;
marginRight: number;
marginBottom: number;
marginLeft: number;
isDragging: boolean;
isResizing: boolean;
autoStyle: boolean;
resizeEnable: boolean;
dragEnable: boolean;
cascade: string;
minWidth: number;
minHeight: number;
private _items;
private _draggingItem;
private _resizingItem;
private _resizeDirection;
private _itemGrid;
private _containerWidth;
private _containerHeight;
private _maxCols;
private _maxRows;
private _visibleCols;
private _visibleRows;
private _setWidth;
private _setHeight;
private _posOffset;
private _adding;
private _placeholderRef;
private _fixToGrid;
private _autoResize;
private _differ;
private _destroyed;
private _maintainRatio;
private _aspectRatio;
private _preferNew;
private _zoomOnDrag;
private _limitToScreen;
private _curMaxRow;
private _curMaxCol;
private _dragReady;
private _resizeReady;
private static CONST_DEFAULT_CONFIG;
private _config;
config: NgGridConfig;
constructor(_differs: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer, componentFactoryResolver: ComponentFactoryResolver, _containerRef: ViewContainerRef);
ngOnInit(): void;
ngOnDestroy(): void;
setConfig(config: NgGridConfig): void;
getItemPosition(index: number): NgGridItemPosition;
getItemSize(index: number): NgGridItemSize;
ngDoCheck(): boolean;
setMargins(margins: Array<string>): void;
enableDrag(): void;
disableDrag(): void;
enableResize(): void;
disableResize(): void;
addItem(ngItem: NgGridItem): void;
removeItem(ngItem: NgGridItem): void;
updateItem(ngItem: NgGridItem): void;
triggerCascade(): void;
triggerResize(): void;
resizeEventHandler(e: any): void;
mouseDownEventHandler(e: MouseEvent): void;
mouseUpEventHandler(e: any): void;
mouseMoveEventHandler(e: any): void;
private updatePositionsAfterMaxChange();
private _calculateColWidth();
private _calculateRowHeight();
private _updateRatio();
private _applyChanges(changes);
private _resizeStart(e);
private _dragStart(e);
private _zoomOut();
private _resetZoom();
private _drag(e);
private _resize(e);
private _dragStop(e);
private _resizeStop(e);
private _maxGridSize(w, h);
private _calculateGridSize(width, height);
private _calculateGridPosition(left, top);
private _hasGridCollision(pos, dims);
private _getCollisions(pos, dims);
private _fixGridCollisions(pos, dims);
private _cascadeGrid(pos?, dims?);
private _fixGridPosition(pos, dims);
private _isWithinBoundsX(pos, dims);
private _fixPosToBoundsX(pos, dims);
private _fixSizeToBoundsX(pos, dims);
private _isWithinBoundsY(pos, dims);
private _fixPosToBoundsY(pos, dims);
private _fixSizeToBoundsY(pos, dims);
private _isWithinBounds(pos, dims);
private _fixPosToBounds(pos, dims);
private _fixSizeToBounds(pos, dims);
private _addToGrid(item);
private _removeFromGrid(item);
private _filterGrid();
private _updateSize();
private _getMaxRow();
private _getMaxCol();
private _getMousePosition(e);
private _getAbsoluteMousePosition(e);
private _getContainerColumns();
private _getContainerRows();
private _getItemFromPosition(position);
private _createPlaceholder(item);
private _emitOnItemChange();
}
}
declare module 'angular2-grid/directives/NgGrid' {
export * from '~angular2-grid/directives/NgGrid';
}
// Generated by typings
// Source: node_modules/angular2-grid/directives/NgGridItem.d.ts
declare module '~angular2-grid/directives/NgGridItem' {
import { NgGrid } from '~angular2-grid/directives/NgGrid';
import { NgGridItemConfig, NgGridItemEvent, NgGridItemPosition, NgGridItemSize, NgGridRawPosition, NgGridItemDimensions } from '~angular2-grid/interfaces/INgGrid';
import { ElementRef, Renderer, EventEmitter, KeyValueDiffers, OnInit, OnDestroy, ViewContainerRef } from '@angular/core';
export class NgGridItem implements OnInit, OnDestroy {
private _differs;
private _ngEl;
private _renderer;
private _ngGrid;
containerRef: ViewContainerRef;
onItemChange: EventEmitter<NgGridItemEvent>;
onDragStart: EventEmitter<NgGridItemEvent>;
onDrag: EventEmitter<NgGridItemEvent>;
onDragStop: EventEmitter<NgGridItemEvent>;
onDragAny: EventEmitter<NgGridItemEvent>;
onResizeStart: EventEmitter<NgGridItemEvent>;
onResize: EventEmitter<NgGridItemEvent>;
onResizeStop: EventEmitter<NgGridItemEvent>;
onResizeAny: EventEmitter<NgGridItemEvent>;
onChangeStart: EventEmitter<NgGridItemEvent>;
onChange: EventEmitter<NgGridItemEvent>;
onChangeStop: EventEmitter<NgGridItemEvent>;
onChangeAny: EventEmitter<NgGridItemEvent>;
ngGridItemChange: EventEmitter<NgGridItemConfig>;
private static CONST_DEFAULT_CONFIG;
isFixed: boolean;
isDraggable: boolean;
isResizable: boolean;
minWidth: number;
minHeight: number;
private _payload;
private _currentPosition;
private _size;
private _config;
private _dragHandle;
private _resizeHandle;
private _borderSize;
private _elemWidth;
private _elemHeight;
private _elemLeft;
private _elemTop;
private _added;
private _differ;
private _cascadeMode;
private _maxCols;
private _minCols;
private _maxRows;
private _minRows;
config: NgGridItemConfig;
readonly sizex: number;
readonly sizey: number;
readonly col: number;
readonly row: number;
readonly currentCol: number;
readonly currentRow: number;
constructor(_differs: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer, _ngGrid: NgGrid, containerRef: ViewContainerRef);
onResizeStartEvent(): void;
onResizeEvent(): void;
onResizeStopEvent(): void;
onDragStartEvent(): void;
onDragEvent(): void;
onDragStopEvent(): void;
onCascadeEvent(): void;
ngOnInit(): void;
canDrag(e: any): boolean;
findHandle(handleSelector: string, startElement: HTMLElement): boolean;
canResize(e: any): string;
onMouseMove(e: any): void;
ngOnDestroy(): void;
getElement(): ElementRef;
getDragHandle(): string;
getResizeHandle(): string;
getDimensions(): NgGridItemDimensions;
getSize(): NgGridItemSize;
getPosition(): NgGridRawPosition;
getGridPosition(): NgGridItemPosition;
setConfig(config: NgGridItemConfig): void;
ngDoCheck(): boolean;
setSize(newSize: NgGridItemSize, update?: boolean): void;
setGridPosition(gridPosition: NgGridItemPosition, update?: boolean): void;
getEventOutput(): NgGridItemEvent;
setPosition(x: number, y: number): void;
setCascadeMode(cascade: string): void;
setDimensions(w: number, h: number): void;
startMoving(): void;
stopMoving(): void;
recalculateSelf(): void;
fixResize(newSize: NgGridItemSize): NgGridItemSize;
private elementMatches(element, selector);
private _recalculatePosition();
private _recalculateDimensions();
private _getMousePosition(e);
private _applyChanges(changes);
}
}
declare module 'angular2-grid/directives/NgGridItem' {
export * from '~angular2-grid/directives/NgGridItem';
}
// Generated by typings
// Source: node_modules/angular2-grid/components/NgGridPlaceholder.d.ts
declare module '~angular2-grid/components/NgGridPlaceholder' {
import { NgGrid } from '~angular2-grid/directives/NgGrid';
import { NgGridItemPosition, NgGridItemSize } from '~angular2-grid/interfaces/INgGrid';
import { ElementRef, Renderer, OnInit } from '@angular/core';
export class NgGridPlaceholder implements OnInit {
private _ngEl;
private _renderer;
private _size;
private _position;
private _ngGrid;
private _cascadeMode;
constructor(_ngEl: ElementRef, _renderer: Renderer);
registerGrid(ngGrid: NgGrid): void;
ngOnInit(): void;
setSize(newSize: NgGridItemSize): void;
setGridPosition(newPosition: NgGridItemPosition): void;
setCascadeMode(cascade: string): void;
private _setDimensions(w, h);
private _setPosition(x, y);
private _recalculatePosition();
private _recalculateDimensions();
}
}
declare module 'angular2-grid/components/NgGridPlaceholder' {
export * from '~angular2-grid/components/NgGridPlaceholder';
}
// Generated by typings
// Source: node_modules/angular2-grid/interfaces/INgGrid.d.ts
declare module '~angular2-grid/interfaces/INgGrid' {
export interface NgGridConfig {
margins?: number[];
draggable?: boolean;
resizable?: boolean;
max_cols?: number;
max_rows?: number;
visible_cols?: number;
visible_rows?: number;
min_cols?: number;
min_rows?: number;
col_width?: number;
row_height?: number;
cascade?: string;
min_width?: number;
min_height?: number;
fix_to_grid?: boolean;
auto_style?: boolean;
auto_resize?: boolean;
maintain_ratio?: boolean;
prefer_new?: boolean;
zoom_on_drag?: boolean;
limit_to_screen?: boolean;
}
export interface NgGridItemConfig {
payload?: any;
col?: number;
row?: number;
sizex?: number;
sizey?: number;
dragHandle?: string;
resizeHandle?: string;
fixed?: boolean;
draggable?: boolean;
resizable?: boolean;
borderSize?: number;
maxCols?: number;
minCols?: number;
maxRows?: number;
minRows?: number;
minWidth?: number;
minHeight?: number;
}
export interface NgGridItemEvent {
payload: any;
col: number;
row: number;
sizex: number;
sizey: number;
width: number;
height: number;
left: number;
top: number;
}
export interface NgGridItemSize {
x: number;
y: number;
}
export interface NgGridItemPosition {
col: number;
row: number;
}
export interface NgGridRawPosition {
left: number;
top: number;
}
export interface NgGridItemDimensions {
width: number;
height: number;
}
}
declare module 'angular2-grid/interfaces/INgGrid' {
export * from '~angular2-grid/interfaces/INgGrid';
}
// Generated by typings
// Source: node_modules/angular2-grid/modules/NgGrid.module.d.ts
declare module '~angular2-grid/modules/NgGrid.module' {
export class NgGridModule {
}
}
declare module 'angular2-grid/modules/NgGrid.module' {
export * from '~angular2-grid/modules/NgGrid.module';
}
// Generated by typings
// Source: node_modules/angular2-grid/main.d.ts
declare module '~angular2-grid/main' {
export * from '~angular2-grid/directives/NgGrid';
export * from '~angular2-grid/directives/NgGridItem';
export * from '~angular2-grid/components/NgGridPlaceholder';
export * from '~angular2-grid/interfaces/INgGrid';
export * from '~angular2-grid/modules/NgGrid.module';
}
declare module 'angular2-grid/main' {
export * from '~angular2-grid/main';
}
declare module 'angular2-grid' {
export * from '~angular2-grid/main';
}
@@ -0,0 +1,8 @@
{
"resolution": "main",
"tree": {
"src": "D:\\code\\carbon\\node_modules\\angular2-grid\\main.d.ts",
"raw": "npm:angular2-grid/main.d.ts",
"typings": "D:\\code\\carbon\\node_modules\\angular2-grid\\main.d.ts"
}
}
+305
View File
@@ -0,0 +1,305 @@
// Generated by typings
// Source: node_modules/angular2-slickgrid/components/js/gridsync.service.d.ts
declare module '~angular2-slickgrid/components/js/gridsync.service' {
import { Observable } from 'rxjs/Rx';
import { SelectionModel } from '~angular2-slickgrid/components/js/selectionmodel';
export class GridSyncService {
columnMinWidthPX: number;
private _scrollLeftPX;
private _scrollBarWidthPX;
private _columnWidthPXs;
private _rowNumberColumnWidthPX;
private _updated;
private _typeDropdownOffset;
private _selectionModel;
private _initialColumnWidthPXsOnResize;
private _isGridReadOnly;
initialColumnResize(): void;
resizeColumn(index: number, deltaWidthPX: number): void;
openTypeDropdown(columnIndex: number): void;
private setColumnWidthPX(index, widthPX);
underlyingSelectionModel: any;
readonly updated: Observable<string>;
readonly typeDropdownOffset: Observable<[number, number]>;
scrollLeftPX: number;
scrollBarWidthPX: number;
columnWidthPXs: number[];
rowNumberColumnWidthPX: number;
readonly selectionModel: SelectionModel;
isGridReadOnly: boolean;
private notifyUpdates(propertyName);
}
}
declare module 'angular2-slickgrid/components/js/gridsync.service' {
export * from '~angular2-slickgrid/components/js/gridsync.service';
}
// Generated by typings
// Source: node_modules/angular2-slickgrid/components/js/interfaces.d.ts
declare module '~angular2-slickgrid/components/js/interfaces' {
import { Observable } from 'rxjs/Rx';
export enum NotificationType {
Error = 0,
UpdateAvailable = 1,
UpdateDownloaded = 2,
}
export interface ISelectionRange {
startRow: number;
endRow: number;
startColumn: number;
endColumn: number;
}
export enum CollectionChange {
ItemsReplaced = 0,
}
export interface IObservableCollection<T> {
getLength(): number;
at(index: number): T;
getRange(start: number, end: number): T[];
setCollectionChangedCallback(callback: (change: CollectionChange, startIndex: number, count: number) => void): void;
}
export class CancellationToken {
private _isCanceled;
private _canceled;
cancel(): void;
readonly isCanceled: boolean;
readonly canceled: Observable<any>;
}
export enum FieldType {
String = 0,
Boolean = 1,
Integer = 2,
Decimal = 3,
Date = 4,
Unknown = 5,
}
export interface IColumnDefinition {
id?: string;
name: string;
type: FieldType;
asyncPostRender?: (cellRef: string, row: number, dataContext: JSON, colDef: any) => void;
formatter?: (row: number, cell: any, value: any, columnDef: any, dataContext: any) => string;
isEditable?: boolean;
}
export interface IGridColumnDefinition {
id: string;
type: number;
}
export interface IGridDataRow {
row?: number;
values: any[];
}
}
declare module 'angular2-slickgrid/components/js/interfaces' {
export * from '~angular2-slickgrid/components/js/interfaces';
}
// Generated by typings
// Source: node_modules/angular2-slickgrid/components/js/selectionmodel.d.ts
declare module '~angular2-slickgrid/components/js/selectionmodel' {
import { ISelectionRange } from '~angular2-slickgrid/components/js/interfaces';
export class SelectionModel implements ISlickSelectionModel {
private _rowSelectionModel;
private _handler;
private _onSelectedRangesChanged;
private _slickRangeFactory;
constructor(_rowSelectionModel: ISlickSelectionModel, _handler: ISlickEventHandler, _onSelectedRangesChanged: ISlickEvent, _slickRangeFactory: (fromRow: number, fromCell: number, toRow: number, toCell: number) => ISlickRange);
readonly range: ISlickRange[];
readonly onSelectedRangesChanged: ISlickEvent;
init(grid: ISlickGrid): void;
destroy(): void;
setSelectedRanges(ranges: ISlickRange[]): void;
getSelectedRanges(): ISlickRange[];
changeSelectedRanges(selections: ISelectionRange[]): void;
toggleSingleColumnSelection(columnId: string): void;
setSingleColumnSelection(columnId: string): void;
toggleMultiColumnSelection(columnId: string): void;
extendMultiColumnSelection(columnId: string): void;
clearSelection(): void;
private _grid;
private _ranges;
private _lastSelectedColumnIndexSequence;
private static areRangesIdentical(lhs, rhs);
private getColumnRange(columnId);
private getColumnRangeByIndex(columnIndex);
private readonly isColumnSelectionCurrently;
private updateSelectedRanges(ranges);
}
export interface ISlickSelectionModel {
range: ISlickRange[];
onSelectedRangesChanged: any;
init(grid: any): void;
destroy(): void;
setSelectedRanges(ranges: ISlickRange[]): void;
getSelectedRanges(): ISlickRange[];
}
export interface ISlickEventHandler {
subscribe(event: any, handler: any): void;
unsubscribeAll(): void;
}
export interface ISlickEvent {
notify(eventData: ISlickRange[]): void;
subscribe(handler: (e: any, args: any) => void): void;
}
export interface ISlickRange {
fromCell: number;
fromRow: number;
toCell: number;
toRow: number;
}
export interface ISlickGrid {
getActiveCellNode(): any;
getCanvasNode(): any;
resetActiveCell(): void;
focus(): void;
getColumnIndex(columnId: string): number;
getDataLength(): number;
}
}
declare module 'angular2-slickgrid/components/js/selectionmodel' {
export * from '~angular2-slickgrid/components/js/selectionmodel';
}
// Generated by typings
// Source: node_modules/angular2-slickgrid/components/js/slickgrid.d.ts
declare module '~angular2-slickgrid/components/js/slickgrid' {
import { OnChanges, OnInit, OnDestroy, SimpleChange, EventEmitter, AfterViewInit } from '@angular/core';
import { Observable } from 'rxjs/Rx';
import { IObservableCollection, IGridDataRow, IColumnDefinition } from '~angular2-slickgrid/components/js/interfaces';
import { ISlickRange, ISlickEvent } from '~angular2-slickgrid/components/js/selectionmodel';
export class SlickGrid implements OnChanges, OnInit, OnDestroy, AfterViewInit {
private _el;
private _gridSyncService;
columnDefinitions: IColumnDefinition[];
dataRows: IObservableCollection<IGridDataRow>;
resized: Observable<any>;
highlightedCells: {
row: number;
column: number;
}[];
blurredColumns: string[];
contextColumns: string[];
columnsLoading: string[];
showHeader: boolean;
showDataTypeIcon: boolean;
enableColumnReorder: boolean;
enableAsyncPostRender: boolean;
selectionModel: string;
plugins: string[];
enableEditing: boolean;
topRowNumber: number;
overrideCellFn: (rowNumber, columnId, value?, data?) => string;
isColumnEditable: (column: number) => boolean;
isCellEditValid: (row: number, column: number, newValue: any) => boolean;
loadFinished: EventEmitter<void>;
editingFinished: EventEmitter<any>;
contextMenu: EventEmitter<any>;
topRowNumberChange: EventEmitter<number>;
cellEditBegin: EventEmitter<{
row: number;
column: number;
}>;
cellEditExit: EventEmitter<{
row: number;
column: number;
newValue: any;
}>;
rowEditBegin: EventEmitter<{
row: number;
}>;
rowEditExit: EventEmitter<{
row: number;
}>;
onFocus(): void;
private _grid;
private _gridColumns;
private _columnNameToIndex;
private _gridData;
private _rowHeight;
private _resizeSubscription;
private _gridSyncSubscription;
private _topRow;
private _leftPx;
private _activeEditingRow;
private _activeEditingRowHasChanges;
constructor(_el: any, _gridSyncService: any);
ngOnChanges(changes: {
[propName: string]: SimpleChange;
}): void;
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
enterEditSession(): void;
endEditSession(): void;
readonly onSelectedRowsChanged: ISlickEvent;
getSelectedRows(): number[];
getColumnIndex(name: string): number;
getSelectedRanges(): ISlickRange[];
registerPlugin(plugin: string): void;
setActive(): void;
selection: ISlickRange[] | boolean;
subscribeToContextMenu(): void;
private initGrid();
private changeEditSession(enabled);
private handleEditorCellChange(rowNumber);
private static getDataWithSchema(data, columns);
private onResize();
private invalidateRange(start, end);
private getColumnEditor;
private getFormatter;
private subscribeToScroll();
private subscribeToCellChanged();
private subscribeToBeforeEditCell();
private subscribeToActiveCellChanged();
private updateColumnWidths();
private updateSchema();
private getImagePathForDataType(type);
private setCallbackOnDataRowsChanged();
private renderGridDataRowsRange(startIndex, count);
}
}
declare module 'angular2-slickgrid/components/js/slickgrid' {
export * from '~angular2-slickgrid/components/js/slickgrid';
}
// Generated by typings
// Source: node_modules/angular2-slickgrid/components/js/virtualizedcollection.d.ts
declare module '~angular2-slickgrid/components/js/virtualizedcollection' {
import { IObservableCollection, CollectionChange } from '~angular2-slickgrid/components/js/interfaces';
export class VirtualizedCollection<TData> implements IObservableCollection<TData> {
private _placeHolderGenerator;
private _length;
private _windowSize;
private _bufferWindowBefore;
private _window;
private _bufferWindowAfter;
private collectionChangedCallback;
constructor(windowSize: number, length: number, loadFn: (offset: number, count: number) => Promise<TData[]>, _placeHolderGenerator: (index: number) => TData);
setCollectionChangedCallback(callback: (change: CollectionChange, startIndex: number, count: number) => void): void;
getLength(): number;
at(index: number): TData;
getRange(start: number, end: number): TData[];
private getRangeFromCurrent(start, end);
private getDataFromCurrent(index);
private resetWindowsAroundIndex(index);
}
}
declare module 'angular2-slickgrid/components/js/virtualizedcollection' {
export * from '~angular2-slickgrid/components/js/virtualizedcollection';
}
// Generated by typings
// Source: node_modules/angular2-slickgrid/index.d.ts
declare module '~angular2-slickgrid/index' {
export * from '~angular2-slickgrid/components/js/gridsync.service';
export * from '~angular2-slickgrid/components/js/interfaces';
export * from '~angular2-slickgrid/components/js/selectionmodel';
export * from '~angular2-slickgrid/components/js/slickgrid';
export * from '~angular2-slickgrid/components/js/virtualizedcollection';
}
declare module 'angular2-slickgrid/index' {
export * from '~angular2-slickgrid/index';
}
declare module 'angular2-slickgrid' {
export * from '~angular2-slickgrid/index';
}
@@ -0,0 +1,6 @@
{
"resolution": "main",
"tree": {
"src": "npm:angular2-slickgrid/index.d.ts"
}
}
+54
View File
@@ -0,0 +1,54 @@
// Generated by typings
// Source: node_modules/html-query-plan/dist/interfaces.d.ts
declare module '~html-query-plan/dist/interfaces' {
export interface IQpOptions {
jsTooltips?: boolean;
}
export interface ICoordinate {
x: number;
y: number;
}
}
declare module 'html-query-plan/dist/interfaces' {
export * from '~html-query-plan/dist/interfaces';
}
// Generated by typings
// Source: node_modules/html-query-plan/dist/svgLines.d.ts
declare module '~html-query-plan/dist/svgLines' {
/**
*
* @param container
*/
export function drawSvgLines(container: HTMLElement): void;
}
declare module 'html-query-plan/dist/svgLines' {
export * from '~html-query-plan/dist/svgLines';
}
// Generated by typings
// Source: node_modules/html-query-plan/dist/index.d.ts
declare module '~html-query-plan/dist/index' {
import { IQpOptions } from '~html-query-plan/dist/interfaces';
export { drawSvgLines } from '~html-query-plan/dist/svgLines';
export * from '~html-query-plan/dist/interfaces';
/**
*
* @param container
* @param planXml
* @param options
*/
export function showPlan(container: HTMLElement, planXml: string, options: IQpOptions): void;
/**
*
* @param options
* @param defaults
*/
export function setDefaults<T>(options: any, defaults: any): T;
}
declare module 'html-query-plan/dist/index' {
export * from '~html-query-plan/dist/index';
}
declare module 'html-query-plan' {
export * from '~html-query-plan/dist/index';
}
@@ -0,0 +1,6 @@
{
"resolution": "main",
"tree": {
"src": "npm:html-query-plan"
}
}
+82
View File
@@ -0,0 +1,82 @@
// Generated by typings
// Source: node_modules/ng2-charts/charts/charts.d.ts
declare module '~ng2-charts/charts/charts' {
import { OnDestroy, OnInit, OnChanges, EventEmitter, ElementRef, SimpleChanges } from '@angular/core';
export class BaseChartDirective implements OnDestroy, OnChanges, OnInit {
static defaultColors: Array<number[]>;
data: number[] | any[];
datasets: any[];
labels: Array<any>;
options: any;
chartType: string;
colors: Array<any>;
legend: boolean;
chartClick: EventEmitter<any>;
chartHover: EventEmitter<any>;
ctx: any;
chart: any;
private cvs;
private initFlag;
private element;
constructor(element: ElementRef);
ngOnInit(): any;
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): any;
getChartBuilder(ctx: any): any;
private updateChartData(newDataValues);
private getDatasets();
private refresh();
}
export interface Color {
backgroundColor?: string | string[];
borderWidth?: number | number[];
borderColor?: string | string[];
borderCapStyle?: string;
borderDash?: number[];
borderDashOffset?: number;
borderJoinStyle?: string;
pointBorderColor?: string | string[];
pointBackgroundColor?: string | string[];
pointBorderWidth?: number | number[];
pointRadius?: number | number[];
pointHoverRadius?: number | number[];
pointHitRadius?: number | number[];
pointHoverBackgroundColor?: string | string[];
pointHoverBorderColor?: string | string[];
pointHoverBorderWidth?: number | number[];
pointStyle?: string | string[];
hoverBackgroundColor?: string | string[];
hoverBorderColor?: string | string[];
hoverBorderWidth?: number;
}
export interface Colors extends Color {
data?: number[];
label?: string;
}
export class ChartsModule {
}
}
declare module 'ng2-charts/charts/charts' {
export * from '~ng2-charts/charts/charts';
}
// Generated by typings
// Source: node_modules/ng2-charts/index.d.ts
declare module '~ng2-charts/index' {
export * from '~ng2-charts/charts/charts';
}
declare module 'ng2-charts/index' {
export * from '~ng2-charts/index';
}
// Generated by typings
// Source: node_modules/ng2-charts/ng2-charts.d.ts
declare module '~ng2-charts/ng2-charts' {
export * from '~ng2-charts/index';
}
declare module 'ng2-charts/ng2-charts' {
export * from '~ng2-charts/ng2-charts';
}
declare module 'ng2-charts' {
export * from '~ng2-charts/ng2-charts';
}
@@ -0,0 +1,6 @@
{
"resolution": "main",
"tree": {
"src": "npm:ng2-charts/ng2-charts.d.ts"
}
}
File diff suppressed because it is too large Load Diff
+6
View File
@@ -0,0 +1,6 @@
{
"resolution": "main",
"tree": {
"src": "npm:rxjs/Rx.d.ts"
}
}
+71
View File
@@ -0,0 +1,71 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'native-keymap' {
export interface IWindowsKeyMapping {
vkey: string;
value: string;
withShift: string;
withAltGr: string;
withShiftAltGr: string;
}
export interface IWindowsKeyboardMapping {
[code: string]: IWindowsKeyMapping;
}
export interface ILinuxKeyMapping {
value: string;
withShift: string;
withAltGr: string;
withShiftAltGr: string;
}
export interface ILinuxKeyboardMapping {
[code: string]: ILinuxKeyMapping;
}
export interface IMacKeyMapping {
value: string;
withShift: string;
withAltGr: string;
withShiftAltGr: string;
valueIsDeadKey: boolean;
withShiftIsDeadKey: boolean;
withAltGrIsDeadKey: boolean;
withShiftAltGrIsDeadKey: boolean;
}
export interface IMacKeyboardMapping {
[code: string]: IMacKeyMapping;
}
export type IKeyboardMapping = IWindowsKeyboardMapping | ILinuxKeyboardMapping | IMacKeyboardMapping;
export function getKeyMap(): IKeyboardMapping;
export interface IWindowsKeyboardLayoutInfo {
name: string;
id: string;
text: string;
}
export interface ILinuxKeyboardLayoutInfo {
model: string;
layout: string;
variant: string;
options: string;
rules: string;
}
export interface IMacKeyboardLayoutInfo {
id: string;
lang: string;
}
export type IKeyboardLayoutInfo = IWindowsKeyboardLayoutInfo | ILinuxKeyboardLayoutInfo | IMacKeyboardLayoutInfo;
export function getCurrentKeyboardLayout(): IKeyboardLayoutInfo;
export function onDidChangeKeyboardLayout(callback: () => void): void;
export function isISOKeyboard(): boolean;
}
+12
View File
@@ -0,0 +1,12 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'native-watchdog' {
export function start(timeout: number): void;
export function exit(exitCode: number): void;
}
+27
View File
@@ -0,0 +1,27 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'node-pty' {
export function fork(file: string, args: string[], options: any): Terminal;
export function spawn(file: string, args: string[], options: any): Terminal;
export function createTerminal(file: string, args: string[], options: any): Terminal;
export interface Terminal {
pid: number;
/**
* The title of the active process.
*/
process: string;
on(event: string, callback: (data: any) => void): void;
resize(columns: number, rows: number): void;
write(data: string): void;
kill(): void;
}
}
+4134
View File
File diff suppressed because it is too large Load Diff
+19
View File
@@ -0,0 +1,19 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare namespace NodeJS {
export interface Process {
/**
* The lazy enviroment is a promise that resolves to `process.env`
* once the process is resolved. The use-case is VS Code running
* on Linux/macOS when being launched via a launcher. Then the env
* (as defined in .bashrc etc) isn't properly set and needs to be
* resolved lazy.
*/
lazyEnv: Thenable<typeof process.env> | undefined;
}
}
+40
View File
@@ -0,0 +1,40 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'nsfw' {
interface NsfwWatcher {
start(): any;
stop(): any;
}
interface NsfwWatchingPromise {
then(): void;
}
interface NsfwStartWatchingPromise {
then(fn: (watcher: NsfwWatcher) => void): NsfwWatchingPromise;
}
interface NsfwEvent {
action: number;
directory: string;
file?: string;
newFile?: string;
oldFile?: string;
}
interface NsfwFunction {
(dir: string, eventHandler: (events: NsfwEvent[]) => void, options?: any): NsfwStartWatchingPromise;
actions: {
CREATED: number;
DELETED: number;
MODIFIED: number;
RENAMED: number;
}
}
var nsfw: NsfwFunction;
export = nsfw;
}
+10
View File
@@ -0,0 +1,10 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'original-fs' {
import * as fs from 'fs';
export = fs;
}
+11
View File
@@ -0,0 +1,11 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'pretty-data' {
export interface PrettyData {
xml(input: string): string;
}
export var pd: PrettyData;
}
+23
View File
@@ -0,0 +1,23 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'pty.js' {
export function fork(file: string, args: string[], options: any): Terminal;
export function spawn(file: string, args: string[], options: any): Terminal;
export function createTerminal(file: string, args: string[], options: any): Terminal;
export interface Terminal {
/**
* The title of the active process.
*/
process: string;
on(event: string, callback: (data: any) => void): void;
resize(columns: number, rows: number): void;
write(data: string): void;
}
}
+9
View File
@@ -0,0 +1,9 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'rangy' {
export function createRange(): any;
export function getSelection(): any;
}
+23
View File
@@ -0,0 +1,23 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare var define: {
(moduleName: string, dependencies: string[], callback: (...args: any[]) => any): any;
(moduleName: string, dependencies: string[], definition: any): any;
(moduleName: string, callback: (...args: any[]) => any): any;
(moduleName: string, definition: any): any;
(dependencies: string[], callback: (...args: any[]) => any): any;
(dependencies: string[], definition: any): any;
};
declare var require: {
toUrl(path: string): string;
(moduleName: string): any;
(dependencies: string[], callback: (...args: any[]) => any, errorback?: (err: any) => void): any;
config(data: any): any;
onError: Function;
__$__nodeRequire<T>(moduleName: string): T;
};
+125
View File
@@ -0,0 +1,125 @@
// Type definitions for semver v2.2.1
// Project: https://github.com/isaacs/node-semver
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module SemVerModule {
/**
* Return the parsed version, or null if it's not valid.
*/
function valid(v: string, loose?: boolean): string;
/**
* Return the version incremented by the release type (major, minor, patch, or prerelease), or null if it's not valid.
*/
function inc(v: string, release: string, loose?: boolean): string;
// Comparison
/**
* v1 > v2
*/
function gt(v1: string, v2: string, loose?: boolean): boolean;
/**
* v1 >= v2
*/
function gte(v1: string, v2: string, loose?: boolean): boolean;
/**
* v1 < v2
*/
function lt(v1: string, v2: string, loose?: boolean): boolean;
/**
* v1 <= v2
*/
function lte(v1: string, v2: string, loose?: boolean): boolean;
/**
* v1 == v2 This is true if they're logically equivalent, even if they're not the exact same string. You already know how to compare strings.
*/
function eq(v1: string, v2: string, loose?: boolean): boolean;
/**
* v1 != v2 The opposite of eq.
*/
function neq(v1: string, v2: string, loose?: boolean): boolean;
/**
* Pass in a comparison string, and it'll call the corresponding semver comparison function. "===" and "!==" do simple string comparison, but are included for completeness. Throws if an invalid comparison string is provided.
*/
function cmp(v1: string, comparator: any, v2: string, loose?: boolean): boolean;
/**
* Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if v2 is greater. Sorts in ascending order if passed to Array.sort().
*/
function compare(v1: string, v2: string, loose?: boolean): number;
/**
* The reverse of compare. Sorts an array of versions in descending order when passed to Array.sort().
*/
function rcompare(v1: string, v2: string, loose?: boolean): number;
// Ranges
/**
* Return the valid range or null if it's not valid
*/
function validRange(range: string, loose?: boolean): string;
/**
* Return true if the version satisfies the range.
*/
function satisfies(version: string, range: string, loose?: boolean): boolean;
/**
* Return the highest version in the list that satisfies the range, or null if none of them do.
*/
function maxSatisfying(versions: string[], range: string, loose?: boolean): string;
/**
* Return true if version is greater than all the versions possible in the range.
*/
function gtr(version: string, range: string, loose?: boolean): boolean;
/**
* Return true if version is less than all the versions possible in the range.
*/
function ltr(version: string, range: string, loose?: boolean): boolean;
/**
* Return true if the version is outside the bounds of the range in either the high or low direction. The hilo argument must be either the string '>' or '<'. (This is the function called by gtr and ltr.)
*/
function outside(version: string, range: string, hilo: string, loose?: boolean): boolean;
class SemVerBase {
raw: string;
loose: boolean;
format(): string;
inspect(): string;
toString(): string;
}
class SemVer extends SemVerBase {
constructor(version: string, loose?: boolean);
major: number;
minor: number;
patch: number;
version: string;
build: string[];
prerelease: string[];
compare(other: SemVer): number;
compareMain(other: SemVer): number;
comparePre(other: SemVer): number;
inc(release: string): SemVer;
}
class Comparator extends SemVerBase {
constructor(comp: string, loose?: boolean);
semver: SemVer;
operator: string;
value: boolean;
parse(comp: string): void;
test(version: SemVer): boolean;
}
class Range extends SemVerBase {
constructor(range: string, loose?: boolean);
set: Comparator[][];
parseRange(range: string): Comparator[];
test(version: SemVer): boolean;
}
}
declare module "semver" {
export = SemVerModule;
}
+448
View File
@@ -0,0 +1,448 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Type definitions for Sinon 1.16.0
// Project: http://sinonjs.org/
// Definitions by: William Sears <https://github.com/mrbigdog2u>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module '~sinon/lib/sinon' {
module Sinon {
export interface SinonSpyCallApi {
// Properties
thisValue: any;
args: any[];
exception: any;
returnValue: any;
// Methods
calledOn(obj: any): boolean;
calledWith(...args: any[]): boolean;
calledWithExactly(...args: any[]): boolean;
calledWithMatch(...args: any[]): boolean;
notCalledWith(...args: any[]): boolean;
notCalledWithMatch(...args: any[]): boolean;
returned(value: any): boolean;
threw(): boolean;
threw(type: string): boolean;
threw(obj: any): boolean;
callArg(pos: number): void;
callArgOn(pos: number, obj: any, ...args: any[]): void;
callArgWith(pos: number, ...args: any[]): void;
callArgOnWith(pos: number, obj: any, ...args: any[]): void;
yield(...args: any[]): void;
yieldOn(obj: any, ...args: any[]): void;
yieldTo(property: string, ...args: any[]): void;
yieldToOn(property: string, obj: any, ...args: any[]): void;
}
export interface SinonSpyCall extends SinonSpyCallApi {
calledBefore(call: SinonSpyCall): boolean;
calledAfter(call: SinonSpyCall): boolean;
calledWithNew(call: SinonSpyCall): boolean;
}
export interface SinonSpy extends SinonSpyCallApi {
// Properties
callCount: number;
called: boolean;
notCalled: boolean;
calledOnce: boolean;
calledTwice: boolean;
calledThrice: boolean;
firstCall: SinonSpyCall;
secondCall: SinonSpyCall;
thirdCall: SinonSpyCall;
lastCall: SinonSpyCall;
thisValues: any[];
args: any[][];
exceptions: any[];
returnValues: any[];
// Methods
(...args: any[]): any;
calledBefore(anotherSpy: SinonSpy): boolean;
calledAfter(anotherSpy: SinonSpy): boolean;
calledWithNew(spy: SinonSpy): boolean;
withArgs(...args: any[]): SinonSpy;
alwaysCalledOn(obj: any): boolean;
alwaysCalledWith(...args: any[]): boolean;
alwaysCalledWithExactly(...args: any[]): boolean;
alwaysCalledWithMatch(...args: any[]): boolean;
neverCalledWith(...args: any[]): boolean;
neverCalledWithMatch(...args: any[]): boolean;
alwaysThrew(): boolean;
alwaysThrew(type: string): boolean;
alwaysThrew(obj: any): boolean;
alwaysReturned(): boolean;
invokeCallback(...args: any[]): void;
getCall(n: number): SinonSpyCall;
getCalls(): SinonSpyCall[];
reset(): void;
printf(format: string, ...args: any[]): string;
restore(): void;
}
export interface SinonSpyStatic {
(): SinonSpy;
(func: any): SinonSpy;
(obj: any, method: string): SinonSpy;
}
export interface SinonStatic {
spy: SinonSpyStatic;
}
export interface SinonStub extends SinonSpy {
resetBehavior(): void;
returns(obj: any): SinonStub;
returnsArg(index: number): SinonStub;
returnsThis(): SinonStub;
throws(type?: string): SinonStub;
throws(obj: any): SinonStub;
callsArg(index: number): SinonStub;
callsArgOn(index: number, context: any): SinonStub;
callsArgWith(index: number, ...args: any[]): SinonStub;
callsArgOnWith(index: number, context: any, ...args: any[]): SinonStub;
callsArgAsync(index: number): SinonStub;
callsArgOnAsync(index: number, context: any): SinonStub;
callsArgWithAsync(index: number, ...args: any[]): SinonStub;
callsArgOnWithAsync(index: number, context: any, ...args: any[]): SinonStub;
onCall(n: number): SinonStub;
onFirstCall(): SinonStub;
onSecondCall(): SinonStub;
onThirdCall(): SinonStub;
yields(...args: any[]): SinonStub;
yieldsOn(context: any, ...args: any[]): SinonStub;
yieldsTo(property: string, ...args: any[]): SinonStub;
yieldsToOn(property: string, context: any, ...args: any[]): SinonStub;
yieldsAsync(...args: any[]): SinonStub;
yieldsOnAsync(context: any, ...args: any[]): SinonStub;
yieldsToAsync(property: string, ...args: any[]): SinonStub;
yieldsToOnAsync(property: string, context: any, ...args: any[]): SinonStub;
withArgs(...args: any[]): SinonStub;
}
export interface SinonStubStatic {
(): SinonStub;
(obj: any): SinonStub;
(obj: any, method: string): SinonStub;
(obj: any, method: string, func: any): SinonStub;
}
export interface SinonStatic {
stub: SinonStubStatic;
}
export interface SinonExpectation extends SinonStub {
atLeast(n: number): SinonExpectation;
atMost(n: number): SinonExpectation;
never(): SinonExpectation;
once(): SinonExpectation;
twice(): SinonExpectation;
thrice(): SinonExpectation;
exactly(n: number): SinonExpectation;
withArgs(...args: any[]): SinonExpectation;
withExactArgs(...args: any[]): SinonExpectation;
on(obj: any): SinonExpectation;
verify(): SinonExpectation;
restore(): void;
}
export interface SinonExpectationStatic {
create(methodName?: string): SinonExpectation;
}
export interface SinonMock {
expects(method: string): SinonExpectation;
restore(): void;
verify(): void;
}
export interface SinonMockStatic {
(): SinonExpectation;
(obj: any): SinonMock;
}
export interface SinonStatic {
expectation: SinonExpectationStatic;
mock: SinonMockStatic;
}
export interface SinonFakeTimers {
now: number;
create(now: number): SinonFakeTimers;
setTimeout(callback: (...args: any[]) => void, timeout: number, ...args: any[]): number;
clearTimeout(id: number): void;
setInterval(callback: (...args: any[]) => void, timeout: number, ...args: any[]): number;
clearInterval(id: number): void;
tick(ms: number): number;
reset(): void;
Date(): Date;
Date(year: number): Date;
Date(year: number, month: number): Date;
Date(year: number, month: number, day: number): Date;
Date(year: number, month: number, day: number, hour: number): Date;
Date(year: number, month: number, day: number, hour: number, minute: number): Date;
Date(year: number, month: number, day: number, hour: number, minute: number, second: number): Date;
Date(year: number, month: number, day: number, hour: number, minute: number, second: number, ms: number): Date;
restore(): void;
/**
* Simulate the user changing the system clock while your program is running. It changes the 'now' timestamp
* without affecting timers, intervals or immediates.
* @param now The new 'now' in unix milliseconds
*/
setSystemTime(now: number): void;
/**
* Simulate the user changing the system clock while your program is running. It changes the 'now' timestamp
* without affecting timers, intervals or immediates.
* @param now The new 'now' as a JavaScript Date
*/
setSystemTime(date: Date): void;
}
export interface SinonFakeTimersStatic {
(): SinonFakeTimers;
(...timers: string[]): SinonFakeTimers;
(now: number, ...timers: string[]): SinonFakeTimers;
}
export interface SinonStatic {
useFakeTimers: SinonFakeTimersStatic;
clock: SinonFakeTimers;
}
export interface SinonFakeUploadProgress {
eventListeners: {
progress: any[];
load: any[];
abort: any[];
error: any[];
};
addEventListener(event: string, listener: (e: Event) => any): void;
removeEventListener(event: string, listener: (e: Event) => any): void;
dispatchEvent(event: Event): void;
}
export interface SinonFakeXMLHttpRequest {
// Properties
onCreate: (xhr: SinonFakeXMLHttpRequest) => void;
url: string;
method: string;
requestHeaders: any;
requestBody: string;
status: number;
statusText: string;
async: boolean;
username: string;
password: string;
withCredentials: boolean;
upload: SinonFakeUploadProgress;
responseXML: Document;
getResponseHeader(header: string): string;
getAllResponseHeaders(): any;
// Methods
restore(): void;
useFilters: boolean;
addFilter(filter: (method: string, url: string, async: boolean, username: string, password: string) => boolean): void;
setResponseHeaders(headers: any): void;
setResponseBody(body: string): void;
respond(status: number, headers: any, body: string): void;
autoRespond(ms: number): void;
}
export interface SinonFakeXMLHttpRequestStatic {
(): SinonFakeXMLHttpRequest;
}
export interface SinonStatic {
useFakeXMLHttpRequest: SinonFakeXMLHttpRequestStatic;
FakeXMLHttpRequest: SinonFakeXMLHttpRequest;
}
export interface SinonFakeServer {
// Properties
autoRespond: boolean;
autoRespondAfter: number;
fakeHTTPMethods: boolean;
getHTTPMethod: (request: SinonFakeXMLHttpRequest) => string;
requests: SinonFakeXMLHttpRequest[];
respondImmediately: boolean;
// Methods
respondWith(body: string): void;
respondWith(response: any[]): void;
respondWith(fn: (xhr: SinonFakeXMLHttpRequest) => void): void;
respondWith(url: string, body: string): void;
respondWith(url: string, response: any[]): void;
respondWith(url: string, fn: (xhr: SinonFakeXMLHttpRequest) => void): void;
respondWith(method: string, url: string, body: string): void;
respondWith(method: string, url: string, response: any[]): void;
respondWith(method: string, url: string, fn: (xhr: SinonFakeXMLHttpRequest) => void): void;
respondWith(url: RegExp, body: string): void;
respondWith(url: RegExp, response: any[]): void;
respondWith(url: RegExp, fn: (xhr: SinonFakeXMLHttpRequest) => void): void;
respondWith(method: string, url: RegExp, body: string): void;
respondWith(method: string, url: RegExp, response: any[]): void;
respondWith(method: string, url: RegExp, fn: (xhr: SinonFakeXMLHttpRequest) => void): void;
respond(): void;
restore(): void;
}
export interface SinonFakeServerStatic {
create(): SinonFakeServer;
}
export interface SinonStatic {
fakeServer: SinonFakeServerStatic;
fakeServerWithClock: SinonFakeServerStatic;
}
export interface SinonExposeOptions {
prefix?: string;
includeFail?: boolean;
}
export interface SinonAssert {
// Properties
failException: string;
fail: (message?: string) => void; // Overridable
pass: (assertion: any) => void; // Overridable
// Methods
notCalled(spy: SinonSpy): void;
called(spy: SinonSpy): void;
calledOnce(spy: SinonSpy): void;
calledTwice(spy: SinonSpy): void;
calledThrice(spy: SinonSpy): void;
callCount(spy: SinonSpy, count: number): void;
callOrder(...spies: SinonSpy[]): void;
calledOn(spy: SinonSpy, obj: any): void;
alwaysCalledOn(spy: SinonSpy, obj: any): void;
calledWith(spy: SinonSpy, ...args: any[]): void;
alwaysCalledWith(spy: SinonSpy, ...args: any[]): void;
neverCalledWith(spy: SinonSpy, ...args: any[]): void;
calledWithExactly(spy: SinonSpy, ...args: any[]): void;
alwaysCalledWithExactly(spy: SinonSpy, ...args: any[]): void;
calledWithMatch(spy: SinonSpy, ...args: any[]): void;
alwaysCalledWithMatch(spy: SinonSpy, ...args: any[]): void;
neverCalledWithMatch(spy: SinonSpy, ...args: any[]): void;
threw(spy: SinonSpy): void;
threw(spy: SinonSpy, exception: string): void;
threw(spy: SinonSpy, exception: any): void;
alwaysThrew(spy: SinonSpy): void;
alwaysThrew(spy: SinonSpy, exception: string): void;
alwaysThrew(spy: SinonSpy, exception: any): void;
expose(obj: any, options?: SinonExposeOptions): void;
}
export interface SinonStatic {
assert: SinonAssert;
}
export interface SinonMatcher {
and(expr: SinonMatcher): SinonMatcher;
or(expr: SinonMatcher): SinonMatcher;
}
export interface SinonMatch {
(value: number): SinonMatcher;
(value: string): SinonMatcher;
(expr: RegExp): SinonMatcher;
(obj: any): SinonMatcher;
(callback: (value: any) => boolean): SinonMatcher;
any: SinonMatcher;
defined: SinonMatcher;
truthy: SinonMatcher;
falsy: SinonMatcher;
bool: SinonMatcher;
number: SinonMatcher;
string: SinonMatcher;
object: SinonMatcher;
func: SinonMatcher;
array: SinonMatcher;
regexp: SinonMatcher;
date: SinonMatcher;
same(obj: any): SinonMatcher;
typeOf(type: string): SinonMatcher;
instanceOf(type: any): SinonMatcher;
has(property: string, expect?: any): SinonMatcher;
hasOwn(property: string, expect?: any): SinonMatcher;
}
export interface SinonStatic {
match: SinonMatch;
}
export interface SinonSandboxConfig {
injectInto?: any;
properties?: string[];
useFakeTimers?: any;
useFakeServer?: any;
}
export interface SinonSandbox {
clock: SinonFakeTimers;
requests: SinonFakeXMLHttpRequest;
server: SinonFakeServer;
spy: SinonSpyStatic;
stub: SinonStubStatic;
mock: SinonMockStatic;
useFakeTimers: SinonFakeTimersStatic;
useFakeXMLHttpRequest: SinonFakeXMLHttpRequestStatic;
useFakeServer(): SinonFakeServer;
restore(): void;
}
export interface SinonSandboxStatic {
create(): SinonSandbox;
create(config: SinonSandboxConfig): SinonSandbox;
}
export interface SinonStatic {
sandbox: SinonSandboxStatic;
}
export interface SinonTestConfig {
injectIntoThis?: boolean;
injectInto?: any;
properties?: string[];
useFakeTimers?: boolean;
useFakeServer?: boolean;
}
export interface SinonTestWrapper extends SinonSandbox {
(...args: any[]): any;
}
export interface SinonStatic {
config: SinonTestConfig;
test(fn: (...args: any[]) => any): SinonTestWrapper;
testCase(tests: any): any;
}
// Utility overridables
export interface SinonStatic {
createStubInstance(constructor: any): SinonStub;
format(obj: any): string;
log(message: string): void;
restore(object: any): void;
}
}
var Sinon: Sinon.SinonStatic;
export = Sinon;
}
declare module 'sinon/lib/sinon' {
import main = require('~sinon/lib/sinon');
export = main;
}
declare module 'sinon' {
import main = require('~sinon/lib/sinon');
export = main;
}
+8
View File
@@ -0,0 +1,8 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare function hideSplash(): void;
declare const splash: Electron.BrowserWindow;
+21
View File
@@ -0,0 +1,21 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/**
* Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise,
* and others. This API makes no assumption about what promise libary is being used which
* enables reusing existing code without migrating to a specific promise implementation. Still,
* we recommend the use of native promises which are available in VS Code.
*/
interface Thenable<T> {
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
}
+3
View File
@@ -0,0 +1,3 @@
declare module 'vscode-ripgrep' {
export const rgPath: string;
}
+167
View File
@@ -0,0 +1,167 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module "vscode-textmate" {
/**
* A single theme setting.
*/
export interface IRawThemeSetting {
readonly name?: string;
readonly scope?: string | string[];
readonly settings: {
readonly fontStyle?: string;
readonly foreground?: string;
readonly background?: string;
};
}
/**
* A TextMate theme.
*/
export interface IRawTheme {
readonly name?: string;
readonly settings: IRawThemeSetting[];
}
/**
* A registry helper that can locate grammar file paths given scope names.
*/
export interface RegistryOptions {
theme?: IRawTheme;
getFilePath(scopeName: string): string;
getInjections?(scopeName: string): string[];
}
/**
* A map from scope name to a language id. Please do not use language id 0.
*/
export interface IEmbeddedLanguagesMap {
[scopeName: string]: number;
}
export const enum StandardTokenType {
Other = 0,
Comment = 1,
String = 2,
RegEx = 4,
}
/**
* The registry that will hold all grammars.
*/
export class Registry {
private readonly _locator;
private readonly _syncRegistry;
constructor(locator?: RegistryOptions);
/**
* Change the theme. Once called, no previous `ruleStack` should be used anymore.
*/
setTheme(theme: IRawTheme): void;
/**
* Returns a lookup array for color ids.
*/
getColorMap(): string[];
/**
* Load the grammar for `scopeName` and all referenced included grammars asynchronously.
* Please do not use language id 0.
*/
loadGrammarWithEmbeddedLanguages(initialScopeName: string, initialLanguage: number, embeddedLanguages: IEmbeddedLanguagesMap, callback: (err: any, grammar: IGrammar) => void): void;
/**
* Load the grammar for `scopeName` and all referenced included grammars asynchronously.
*/
loadGrammar(initialScopeName: string, callback: (err: any, grammar: IGrammar) => void): void;
private _loadGrammar(initialScopeName, callback);
/**
* Load the grammar at `path` synchronously.
*/
loadGrammarFromPathSync(path: string, initialLanguage?: number, embeddedLanguages?: IEmbeddedLanguagesMap): IGrammar;
/**
* Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `loadGrammarFromPathSync`.
*/
grammarForScopeName(scopeName: string, initialLanguage?: number, embeddedLanguages?: IEmbeddedLanguagesMap): IGrammar;
}
/**
* A grammar
*/
export interface IGrammar {
/**
* Tokenize `lineText` using previous line state `prevState`.
*/
tokenizeLine(lineText: string, prevState: StackElement): ITokenizeLineResult;
/**
* Tokenize `lineText` using previous line state `prevState`.
* The result contains the tokens in binary format, resolved with the following information:
* - language
* - token type (regex, string, comment, other)
* - font style
* - foreground color
* - background color
* e.g. for getting the languageId: `(metadata & MetadataConsts.LANGUAGEID_MASK) >>> MetadataConsts.LANGUAGEID_OFFSET`
*/
tokenizeLine2(lineText: string, prevState: StackElement): ITokenizeLineResult2;
}
export interface ITokenizeLineResult {
readonly tokens: IToken[];
/**
* The `prevState` to be passed on to the next line tokenization.
*/
readonly ruleStack: StackElement;
}
/**
* Helpers to manage the "collapsed" metadata of an entire StackElement stack.
* The following assumptions have been made:
* - languageId < 256 => needs 8 bits
* - unique color count < 512 => needs 9 bits
*
* The binary format is:
* - -------------------------------------------
* 3322 2222 2222 1111 1111 1100 0000 0000
* 1098 7654 3210 9876 5432 1098 7654 3210
* - -------------------------------------------
* xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
* bbbb bbbb bfff ffff ffFF FTTT LLLL LLLL
* - -------------------------------------------
* - L = LanguageId (8 bits)
* - T = StandardTokenType (3 bits)
* - F = FontStyle (3 bits)
* - f = foreground color (9 bits)
* - b = background color (9 bits)
*/
export const enum MetadataConsts {
LANGUAGEID_MASK = 255,
TOKEN_TYPE_MASK = 1792,
FONT_STYLE_MASK = 14336,
FOREGROUND_MASK = 8372224,
BACKGROUND_MASK = 4286578688,
LANGUAGEID_OFFSET = 0,
TOKEN_TYPE_OFFSET = 8,
FONT_STYLE_OFFSET = 11,
FOREGROUND_OFFSET = 14,
BACKGROUND_OFFSET = 23,
}
export interface ITokenizeLineResult2 {
/**
* The tokens in binary format. Each token occupies two array indices. For token i:
* - at offset 2*i => startIndex
* - at offset 2*i + 1 => metadata
*
*/
readonly tokens: Uint32Array;
/**
* The `prevState` to be passed on to the next line tokenization.
*/
readonly ruleStack: StackElement;
}
export interface IToken {
startIndex: number;
readonly endIndex: number;
readonly scopes: string[];
}
/**
* **IMPORTANT** - Immutable!
*/
export interface StackElement {
_stackElementBrand: void;
readonly depth: number;
clone(): StackElement;
equals(other: StackElement): boolean;
}
export const INITIAL: StackElement;
}
+10
View File
@@ -0,0 +1,10 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'windows-foreground-love' {
export function allowSetForegroundWindow(pid?: number): boolean;
}
+12
View File
@@ -0,0 +1,12 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'windows-mutex' {
export class Mutex {
constructor(name: string);
isActive(): boolean;
release(): void;
}
}
+14
View File
@@ -0,0 +1,14 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'windows-process-tree' {
interface ProcessTreeNode {
pid: number,
name: string,
children: ProcessTreeNode[]
}
function get(rootPid: number, callback: (tree: ProcessTreeNode) => void): void;
export = get;
}
+338
View File
@@ -0,0 +1,338 @@
// Type definitions for Winreg v1.2.0
// Project: http://fresc81.github.io/node-winreg/
// Definitions by: RX14 <https://github.com/RX14>, BobBuehler <https://github.com/BobBuehler>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare var Winreg: WinregStatic;
interface WinregStatic {
/**
* Creates a registry object, which provides access to a single registry key.
* Note: This class is returned by a call to ```require('winreg')```.
*
* @public
* @class
*
* @param {@link Options} options - the options
*
* @example
* var Registry = require('winreg')
* , autoStartCurrentUser = new Registry({
* hive: Registry.HKCU,
* key: '\\Software\\Microsoft\\Windows\\CurrentVersion\\Run'
* });
*/
new (options: Winreg.Options): Winreg.Registry;
/**
* Registry hive key HKEY_LOCAL_MACHINE.
* Note: For writing to this hive your program has to run with admin privileges.
*/
HKLM: string;
/**
* Registry hive key HKEY_CURRENT_USER.
*/
HKCU: string;
/**
* Registry hive key HKEY_CLASSES_ROOT.
* Note: For writing to this hive your program has to run with admin privileges.
*/
HKCR: string;
/**
* Registry hive key HKEY_USERS.
* Note: For writing to this hive your program has to run with admin privileges.
*/
HKU: string;
/**
* Registry hive key HKEY_CURRENT_CONFIG.
* Note: For writing to this hive your program has to run with admin privileges.
*/
HKCC: string;
/**
* Collection of available registry hive keys.
*/
HIVES: Array<string>;
/**
* Registry value type STRING.
*
* Values of this type contain a string.
*/
REG_SZ: string;
/**
* Registry value type MULTILINE_STRING.
*
* Values of this type contain a multiline string.
*/
REG_MULTI_SZ: string;
/**
* Registry value type EXPANDABLE_STRING.
*
* Values of this type contain an expandable string.
*/
REG_EXPAND_SZ: string;
/**
* Registry value type DOUBLE_WORD.
*
* Values of this type contain a double word (32 bit integer).
*/
REG_DWORD: string;
/**
* Registry value type QUAD_WORD.
*
* Values of this type contain a quad word (64 bit integer).
*/
REG_QWORD: string;
/**
* Registry value type BINARY.
*
* Values of this type contain a binary value.
*/
REG_BINARY: string;
/**
* Registry value type UNKNOWN.
*
* Values of this type contain a value of an unknown type.
*/
REG_NONE: string;
/**
* Collection of available registry value types.
*/
REG_TYPES: Array<string>;
/**
* The name of the default value. May be used instead of the empty string literal for better readability.
*/
DEFAULT_VALUE: string;
}
declare namespace Winreg {
export interface Options {
/**
* Optional hostname, must start with '\\' sequence.
*/
host?: string;
/**
* Optional hive ID, default is HKLM.
*/
hive?: string;
/**
* Optional key, default is the root key.
*/
key?: string;
/**
* Optional registry hive architecture ('x86' or 'x64'; only valid on Windows 64 Bit Operating Systems).
*/
arch?: string;
}
/**
* A registry object, which provides access to a single registry key.
*/
export interface Registry {
/**
* The hostname.
* @readonly
*/
host: string;
/**
* The hive id.
* @readonly
*/
hive: string;
/**
* The registry key name.
* @readonly
*/
key: string;
/**
* The full path to the registry key.
* @readonly
*/
path: string;
/**
* The registry hive architecture ('x86' or 'x64').
* @readonly
*/
arch: string;
/**
* Creates a new {@link Registry} instance that points to the parent registry key.
* @readonly
*/
parent: Registry;
/**
* Retrieve all values from this registry key.
* @param {valuesCallback} cb - callback function
* @param {error=} cb.err - error object or null if successful
* @param {array=} cb.items - an array of {@link RegistryItem} objects
* @returns {Registry} this registry key object
*/
values(cb: (err: Error, result: Array<Winreg.RegistryItem>) => void): Registry;
/**
* Retrieve all subkeys from this registry key.
* @param {function (err, items)} cb - callback function
* @param {error=} cb.err - error object or null if successful
* @param {array=} cb.items - an array of {@link Registry} objects
* @returns {Registry} this registry key object
*/
keys(cb: (err: Error, result: Array<Registry>) => void): Registry;
/**
* Gets a named value from this registry key.
* @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value
* @param {function (err, item)} cb - callback function
* @param {error=} cb.err - error object or null if successful
* @param {RegistryItem=} cb.item - the retrieved registry item
* @returns {Registry} this registry key object
*/
get(name: string, cb: (err: Error, result: Winreg.RegistryItem) => void): Registry;
/**
* Sets a named value in this registry key, overwriting an already existing value.
* @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value
* @param {string} type - the value type
* @param {string} value - the value
* @param {function (err)} cb - callback function
* @param {error=} cb.err - error object or null if successful
* @returns {Registry} this registry key object
*/
set(name: string, type: string, value: string, cb: (err: Error) => void): Registry;
/**
* Remove a named value from this registry key. If name is empty, sets the default value of this key.
* Note: This key must be already existing.
* @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value
* @param {function (err)} cb - callback function
* @param {error=} cb.err - error object or null if successful
* @returns {Registry} this registry key object
*/
remove(name: string, cb: (err: Error) => void): Registry;
/**
* Remove all subkeys and values (including the default value) from this registry key.
* @param {function (err)} cb - callback function
* @param {error=} cb.err - error object or null if successful
* @returns {Registry} this registry key object
*/
clear(cb: (err: Error) => void): Registry;
/**
* Alias for the clear method to keep it backward compatible.
* @method
* @deprecated Use {@link Registry#clear} or {@link Registry#destroy} in favour of this method.
* @param {function (err)} cb - callback function
* @param {error=} cb.err - error object or null if successful
* @returns {Registry} this registry key object
*/
erase(cb: (err: Error) => void): Registry;
/**
* Delete this key and all subkeys from the registry.
* @param {function (err)} cb - callback function
* @param {error=} cb.err - error object or null if successful
* @returns {Registry} this registry key object
*/
destroy(cb: (err: Error) => void): Registry;
/**
* Create this registry key. Note that this is a no-op if the key already exists.
* @param {function (err)} cb - callback function
* @param {error=} cb.err - error object or null if successful
* @returns {Registry} this registry key object
*/
create(cb: (err: Error) => void): Registry;
/**
* Checks if this key already exists.
* @param {function (err, exists)} cb - callback function
* @param {error=} cb.err - error object or null if successful
* @param {boolean=} cb.exists - true if a registry key with this name already exists
* @returns {Registry} this registry key object
*/
keyExists(cb: (err: Error, exists: boolean) => void): Registry;
/**
* Checks if a value with the given name already exists within this key.
* @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value
* @param {function (err, exists)} cb - callback function
* @param {error=} cb.err - error object or null if successful
* @param {boolean=} cb.exists - true if a value with the given name was found in this key
* @returns {Registry} this registry key object
*/
valueExists(name: string, cb: (err: Error, exists: boolean) => void): Registry;
}
/**
* A single registry value record.
* Objects of this type are created internally and returned by methods of {@link Registry} objects.
*/
export interface RegistryItem {
/**
* The hostname.
* @readonly
*/
host: string;
/**
* The hive id.
* @readonly
*/
hive: string;
/**
* The registry key.
* @readonly
*/
key: string;
/**
* The value name.
* @readonly
*/
name: string;
/**
* The value type.
* @readonly
*/
type: string;
/**
* The value.
* @readonly
*/
value: string;
/**
* The hive architecture.
* @readonly
*/
arch: string;
}
}
declare module "winreg" {
export = Winreg;
}
+457
View File
@@ -0,0 +1,457 @@
/**
* @license MIT
*
* This contains the type declarations for the xterm.js library. Note that
* some interfaces differ between this file and the actual implementation in
* src/, that's because this file declares the *public* API which is intended
* to be stable and consumed by external programs.
*/
/**
* An object containing start up options for the terminal.
*/
interface ITerminalOptions {
/**
* A data uri of the sound to use for the bell (needs bellStyle = 'sound').
*/
bellSound?: string;
/**
* The type of the bell notification the terminal will use.
*/
bellStyle?: 'none' | 'visual' | 'sound' | 'both';
/**
* The number of columns in the terminal.
*/
cols?: number;
/**
* Whether the cursor blinks.
*/
cursorBlink?: boolean;
/**
* The style of the cursor.
*/
cursorStyle?: 'block' | 'underline' | 'bar';
/**
* Whether input should be disabled.
*/
disableStdin?: boolean;
/**
* The number of rows in the terminal.
*/
rows?: number;
/**
* The amount of scrollback in the terminal. Scrollback is the amount of rows
* that are retained when lines are scrolled beyond the initial viewport.
*/
scrollback?: number;
/**
* The size of tab stops in the terminal.
*/
tabStopWidth?: number;
}
/**
* An object containing options for a link matcher.
*/
interface ILinkMatcherOptions {
/**
* The index of the link from the regex.match(text) call. This defaults to 0
* (for regular expressions without capture groups).
*/
matchIndex?: number;
/**
* A callback that validates an individual link, returning true if valid and
* false if invalid.
*/
validationCallback?: (uri: string, element: HTMLElement, callback: (isValid: boolean) => void) => void;
/**
* The priority of the link matcher, this defines the order in which the link
* matcher is evaluated relative to others, from highest to lowest. The
* default value is 0.
*/
priority?: number;
}
declare module 'xterm' {
/**
* The class that represents an xterm.js terminal.
*/
export class Terminal {
/**
* The element containing the terminal.
*/
element: HTMLElement;
/**
* The textarea that accepts input for the terminal.
*/
textarea: HTMLTextAreaElement;
/**
* The number of rows in the terminal's viewport.
*/
rows: number;
/**
* The number of columns in the terminal's viewport.
*/
cols: number;
/**
* Creates a new `Terminal` object.
*
* @param options An object containing a set of options.
*/
constructor(options?: ITerminalOptions);
/**
* Unfocus the terminal.
*/
blur(): void;
/**
* Focus the terminal.
*/
focus(): void;
/**
* Registers an event listener.
* @param type The type of the event.
* @param listener The listener.
*/
on(type: 'blur' | 'focus' | 'lineFeed', listener: () => void): void;
/**
* Registers an event listener.
* @param type The type of the event.
* @param listener The listener.
*/
on(type: 'data', listener: (data?: string) => void): void;
/**
* Registers an event listener.
* @param type The type of the event.
* @param listener The listener.
*/
on(type: 'key', listener: (key?: string, event?: KeyboardEvent) => void): void;
/**
* Registers an event listener.
* @param type The type of the event.
* @param listener The listener.
*/
on(type: 'keypress' | 'keydown', listener: (event?: KeyboardEvent) => void): void;
/**
* Registers an event listener.
* @param type The type of the event.
* @param listener The listener.
*/
on(type: 'refresh', listener: (data?: {start: number, end: number}) => void): void;
/**
* Registers an event listener.
* @param type The type of the event.
* @param listener The listener.
*/
on(type: 'resize', listener: (data?: {cols: number, rows: number}) => void): void;
/**
* Registers an event listener.
* @param type The type of the event.
* @param listener The listener.
*/
on(type: 'scroll', listener: (ydisp?: number) => void): void;
/**
* Registers an event listener.
* @param type The type of the event.
* @param listener The listener.
*/
on(type: 'title', listener: (title?: string) => void): void;
/**
* Registers an event listener.
* @param type The type of the event.
* @param listener The listener.
*/
on(type: string, listener: (...args: any[]) => void): void;
/**
* Deregisters an event listener.
* @param type The type of the event.
* @param listener The listener.
*/
off(type: 'blur' | 'focus' | 'lineFeed' | 'data' | 'key' | 'keypress' | 'keydown' | 'refresh' | 'resize' | 'scroll' | 'title' | string, listener: (...args: any[]) => void): void;
/**
* Resizes the terminal.
* @param x The number of columns to resize to.
* @param y The number of rows to resize to.
*/
resize(columns: number, rows: number): void;
/**
* Writes text to the terminal, followed by a break line character (\n).
* @param data The text to write to the terminal.
*/
writeln(data: string): void;
/**
* Opens the terminal within an element.
* @param parent The element to create the terminal within.
*/
open(parent: HTMLElement): void;
/**
* Attaches a custom key event handler which is run before keys are
* processed, giving consumers of xterm.js ultimate control as to what keys
* should be processed by the terminal and what keys should not.
* @param customKeyEventHandler The custom KeyboardEvent handler to attach.
* This is a function that takes a KeyboardEvent, allowing consumers to stop
* propogation and/or prevent the default action. The function returns
* whether the event should be processed by xterm.js.
*/
attachCustomKeyEventHandler(customKeyEventHandler: (event: KeyboardEvent) => boolean): void;
/**
* (EXPERIMENTAL) Registers a link matcher, allowing custom link patterns to
* be matched and handled.
* @param regex The regular expression to search for, specifically this
* searches the textContent of the rows. You will want to use \s to match a
* space ' ' character for example.
* @param handler The callback when the link is called.
* @param options Options for the link matcher.
* @return The ID of the new matcher, this can be used to deregister.
*/
registerLinkMatcher(regex: RegExp, handler: (event: MouseEvent, uri: string) => boolean | void , options?: ILinkMatcherOptions): number;
/**
* (EXPERIMENTAL) Deregisters a link matcher if it has been registered.
* @param matcherId The link matcher's ID (returned after register)
*/
deregisterLinkMatcher(matcherId: number): void;
/**
* Gets whether the terminal has an active selection.
*/
hasSelection(): boolean;
/**
* Gets the terminal's current selection, this is useful for implementing
* copy behavior outside of xterm.js.
*/
getSelection(): string;
/**
* Clears the current terminal selection.
*/
clearSelection(): void;
/**
* Selects all text within the terminal.
*/
selectAll(): void;
// /**
// * Find the next instance of the term, then scroll to and select it. If it
// * doesn't exist, do nothing.
// * @param term Tne search term.
// * @return Whether a result was found.
// */
// findNext(term: string): boolean;
// /**
// * Find the previous instance of the term, then scroll to and select it. If it
// * doesn't exist, do nothing.
// * @param term Tne search term.
// * @return Whether a result was found.
// */
// findPrevious(term: string): boolean;
/**
* Destroys the terminal and detaches it from the DOM.
*/
destroy(): void;
/**
* Scroll the display of the terminal
* @param amount The number of lines to scroll down (negative scroll up).
*/
scrollDisp(amount: number): void;
/**
* Scroll the display of the terminal by a number of pages.
* @param pageCount The number of pages to scroll (negative scrolls up).
*/
scrollPages(pageCount: number): void;
/**
* Scrolls the display of the terminal to the top.
*/
scrollToTop(): void;
/**
* Scrolls the display of the terminal to the bottom.
*/
scrollToBottom(): void;
/**
* Clear the entire buffer, making the prompt line the new first line.
*/
clear(): void;
/**
* Writes text to the terminal.
* @param data The text to write to the terminal.
*/
write(data: string): void;
/**
* Retrieves an option's value from the terminal.
* @param key The option key.
*/
getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'termName'): string;
/**
* Retrieves an option's value from the terminal.
* @param key The option key.
*/
getOption(key: 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell'): boolean;
/**
* Retrieves an option's value from the terminal.
* @param key The option key.
*/
getOption(key: 'colors'): string[];
/**
* Retrieves an option's value from the terminal.
* @param key The option key.
*/
getOption(key: 'cols' | 'rows' | 'tabStopWidth' | 'scrollback'): number;
/**
* Retrieves an option's value from the terminal.
* @param key The option key.
*/
getOption(key: 'geometry'): [number, number];
/**
* Retrieves an option's value from the terminal.
* @param key The option key.
*/
getOption(key: 'handler'): (data: string) => void;
/**
* Retrieves an option's value from the terminal.
* @param key The option key.
*/
getOption(key: string): any;
/**
* Sets an option on the terminal.
* @param key The option key.
* @param value The option value.
*/
setOption(key: 'termName' | 'bellSound', value: string): void;
/**
* Sets an option on the terminal.
* @param key The option key.
* @param value The option value.
*/
setOption(key: 'bellStyle', value: null | 'none' | 'visual' | 'sound' | 'both'): void;
/**
* Sets an option on the terminal.
* @param key The option key.
* @param value The option value.
*/
setOption(key: 'cursorStyle', value: null | 'block' | 'underline' | 'bar'): void;
/**
* Sets an option on the terminal.
* @param key The option key.
* @param value The option value.
*/
setOption(key: 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell', value: boolean): void;
/**
* Sets an option on the terminal.
* @param key The option key.
* @param value The option value.
*/
setOption(key: 'colors', value: string[]): void;
/**
* Sets an option on the terminal.
* @param key The option key.
* @param value The option value.
*/
setOption(key: 'cols' | 'rows' | 'tabStopWidth' | 'scrollback', value: number): void;
/**
* Sets an option on the terminal.
* @param key The option key.
* @param value The option value.
*/
setOption(key: 'geometry', value: [number, number]): void;
/**
* Sets an option on the terminal.
* @param key The option key.
* @param value The option value.
*/
setOption(key: 'handler', value: (data: string) => void): void;
/**
* Sets an option on the terminal.
* @param key The option key.
* @param value The option value.
*/
setOption(key: string, value: any): void;
/**
* Tells the renderer to refresh terminal content between two rows
* (inclusive) at the next opportunity.
* @param start The row to start from (between 0 and this.rows - 1).
* @param end The row to end at (between start and this.rows - 1).
*/
refresh(start: number, end: number): void;
/**
* Perform a full reset (RIS, aka '\x1bc').
*/
reset(): void
/**
* Loads an addon, attaching it to the Terminal prototype and making it
* available to all newly created Terminals.
* @param addon The addon to load.
*/
static loadAddon(addon: 'attach' | 'fit' | 'fullscreen' | 'search' | 'terminado'): void;
// Moficiations to official .d.ts below
buffer: {
/**
* The viewport position.
*/
ydisp: number;
};
/**
* Emit an event on the terminal.
*/
emit(type: string, data: any): void;
/**
* Find the next instance of the term, then scroll to and select it. If it
* doesn't exist, do nothing.
* @param term Tne search term.
* @return Whether a result was found.
*/
findNext(term: string): boolean;
/**
* Find the previous instance of the term, then scroll to and select it. If it
* doesn't exist, do nothing.
* @param term Tne search term.
* @return Whether a result was found.
*/
findPrevious(term: string): boolean;
}
}
+47
View File
@@ -0,0 +1,47 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'yauzl' {
import { EventEmitter } from 'events';
import { Readable } from 'stream';
export class Entry {
fileName: string;
extraFields: { id: number; data: Buffer; }[];
comment: string;
versionMadeBy: number;
versionNeededToExtract: number;
generalPurposeBitFlag: number;
compressionMethod: number;
lastModFileTime: number;
lastModFileDate: number;
crc32: number;
compressedSize: number;
uncompressedSize: number;
fileNameLength: number;
extraFieldLength: number;
fileCommentLength: number;
internalFileAttributes: number;
externalFileAttributes: number;
relativeOffsetOfLocalHeader: number;
getLastModDate(): Date;
}
export class ZipFile extends EventEmitter {
openReadStream(entry: Entry, callback: (err?: Error, stream?: Readable) => void);
close();
isOpen: boolean;
entryCount: number;
comment: string;
}
export interface IOptions {
autoClose: boolean;
}
export function open(path: string, callback: (err?: Error, zipfile?: ZipFile) => void): void;
export function open(path: string, options: IOptions, callback: (err?: Error, zipfile?: ZipFile) => void): void;
}